Account contacts
In addition to the account holder, an account may have any number of additional contacts.
Querying for account contacts
Use the following endpoints to retrieve information about contacts for a specific account:
- GET
/accounts/{accountId}/contacts
- GET
/accounts/{accountId}/contacts/{contactId}
Creating account contacts
Use the following endpoint to create an AccountContact for a given account:
- POST
/accounts/{accountId}/contacts
Minimum creation criteria
At a minimum, you must specify the following information:
contactSubtype
(typically set to eitherPerson
orCompany
)firstName
andlastName
(forPerson
contacts)companyName
(forCompany
contacts)primaryAddress
, with at least:addressLine1
city
state
postalCode
For example, the following request creates a new contact for account pc:202.
POST /account/v1/accounts/pc:202/contacts
{
"data": {
"attributes": {
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
}
}
}
Modifying account contacts
Use the following endpoints to modify or delete an account contact:
- PATCH
/accounts/{accountId}/contacts/{contactId}
- DELETE
/accounts/{accountId}/contacts/{contactId}
For example, the following request assigns an email for account contact pc:444 on account pc:202.
PATCH /account/v1/accounts/pc:202/contacts/pc:444
{
"data": {
"attributes": {
"emailAddress1": "sstewart@email.com"
}
}
}
The following request deletes account contact pc:444 on account pc:202.
DELETE /account/v1/accounts/pc:202/contacts/pc:444
<no request body>