Update Account
Select
This API is used to update account details (like name, website etc), admin contact details (like admin contact first name, last name, email) or address of an account.
Updating account is an asynchronous process - status changes to updating once update is initiated. If update succeeds then status becomes active, otherwise status becomes update_failure.
To update the admin contact, you must specify the firstName, lastName and email. If all three admin contact fields (firstName, lastName and email) are ommitted then admin contact is not updated.
To update address, you must specify the address section. If address section is entirely omitted from the request, then address is not updated. To set a null value for a specific address attribute, explicitly set it to null.
Request Body
Field | Description | Type | Required | Notes |
---|---|---|---|---|
externalId | Account id in Partner system | String / UUID | True | Needs to be unique in Partner system. |
name | Account name | String | True | Needs to be unique in Partner system. |
website | Account website | String | False | Explicitly set this to null if this field needs to be removed. |
contacts | Account contacts | Contact Objects Array | True | See - Contact Object |
Contact Object
Field | Description | Type | Required | Notes |
---|---|---|---|---|
Contact email | String | True | Required while updating admin contact | |
firstName | Contact firstname | String | True | Required while updating admin contact |
lastName | Contact lastname | String | True | Required while updating admin contact |
address | Contact address | Address Object | False | See - Address Object. Explicitly set this to null if this field needs to be removed. |
phone | Contact phone number | String | False | Explicitly set this to null if this field needs to be removed. |
Address Object
Field | Description | Type | Required | Notes |
---|---|---|---|---|
addressLine1 | Address line 1 | String | False | Explicitly set this to null if this field needs to be removed. |
addressLine2 | Address line 2 | String | False | Explicitly set this to null if this field needs to be removed. |
city | Address city | String | False | Explicitly set this to null if this field needs to be removed. |
state | Address state | String | False | Explicitly set this to null if this field needs to be removed. |
country | Address country | String | False | Explicitly set this to null if this field needs to be removed. |
postalCode | Address postal code | String | False | Explicitly set this to null if this field needs to be removed. |
Response Body
Same as 'Get Account by Id - Response Body (Account Object)'
Path Parameters
- id string required
- application/json
Request Body required
- 200
OK
- application/json
- Schema
- Example (from schema)
- Example
Schema
data object
id stringstatus stringinsertTs stringupdateTs stringexternalId stringname stringwebsite stringprovisionCountry stringcontacts object[]
type stringemail stringfirstName stringlastName stringaddress object
addressLine1 stringaddressLine2 stringcity stringstate stringcountry stringpostalCode stringtype string
{
"data": {
"id": "7194af6f-1285-4295-94aa-ceed7ea2d792",
"status": "updating",
"insertTs": "2021-06-07T21:16:48",
"updateTs": "2021-06-07T21:16:48",
"externalId": "XSP1234",
"name": "Acme ltd",
"website": "www.acme.com",
"provisionCountry": "United States",
"contacts": [
{
"type": "admin",
"email": "john.doe@acme.com",
"firstName": "John",
"lastName": "Doe",
"address": {
"addressLine1": "1 Ave",
"addressLine2": "Suite 204",
"city": "Sunnyvale",
"state": "California",
"country": "United States",
"postalCode": "94086"
}
}
],
"type": "Production"
}
}
{
"data": {
"id": "7194af6f-1285-4295-94aa-ceed7ea2d792",
"status": "updating",
"insertTs": "2021-06-07T21:16:48",
"updateTs": "2021-06-07T21:16:48",
"externalId": "XSP1234",
"name": "Acme ltd",
"website": "www.acme.com",
"provisionCountry": "United States",
"contacts": [
{
"type": "admin",
"email": "john.doe@acme.com",
"firstName": "John",
"lastName": "Doe",
"address": {
"addressLine1": "1 Ave",
"addressLine2": "Suite 204",
"city": "Sunnyvale",
"state": "California",
"country": "United States",
"postalCode": "94086"
}
}
],
"type": "Production"
}
}