Contact Postal Address PUT
URI
https://{DATACENTER}.brightpearlconnect.com/public-api/{ACCOUNT}
/contact-service/contact/{ID}/postal-address
Refer to our documentation on URI syntax for more information on how to construct URIs.
Description
This method allows you to associate postal addresses with contacts. This association is subject to the following constraints:
- the postal address must not be associated with another contact;
- you may not associate BIL (billing) or DEF (default) addresses with secondary contacts (see contact POST for more details on contact organisations). These addresses are inherited from the primary contact.
Multiple associations may be specified in the request. All associations are validated before being applied; the associations will only be applied if all are valid and successful.
Each association comprises of a contact ID (in the request URI), and address ID, and an optional type. The possible address association types are the same as for contact POST:
- DEF: the default address for a contact
- BIL: the billing address for a contact
- DEL: the delivery address for a contact
If no type is provided (or type is null) then the address will be associated, but will not be a default address type for this contact.
Example
Request URI
/contact/209/postal-address
Request body
[
{
"postalAddressId": 220,
"type": "DEL"
},
{
"postalAddressId": 221
}
]
Response
{
}