Counterpart addresses
Overview
Counterparts that represent an entity’s vendors or suppliers must have their address information associated with them. Monite allows you to create multiple addresses for a counterpart.
Add an address to a counterpart
To add an address to a counterpart, call POST /counterparts/{counterpart_id}/addresses
:
The successful response returns the information about the address including the ID:
After creating a new counterpart address, Monite stores all available counterpart addresses in array. You can also update the counterpart’s default billing and shipping addresses using the counterpart address ID issued after creating a counterpart. For more information, see Edit a counterpart.
Counterparts can use the same counterpart address for the default_shipping_address_id
and default_billing_address_id
fields.
Set the default address
Once the addresses are added to the counterpart, select a default address by calling POST /counterparts/{counterpart_id}/addresses/{address_id}/make_default
:
The successful response contains information about the address marked as default:
List all addresses
To get information about all addresses associated with the specified counterpart, call
GET /counterparts/{counterpart_id}/addresses
as shown:
The successful response returns an array of all counterpart addresses.
Retrieve an address
To get information about a specific address associated with the specified counterpart, call
GET /counterparts/{counterpart_id}/addresses/{address_id}
.
Edit an address
To edit an existing address of the specified counterpart, call
PATCH /counterparts/{counterpart_id}/addresses/{address_id}
.
Delete an address
Only non-default addresses can be deleted. To delete an existing address from the list of addresses associated with the specified counterpart, call
DELETE /counterparts/{counterpart_id}/addresses/{addresses_id}
.
The default billing and shipping addresses of a counterpart cannot be deleted. Attempts to delete these addresses will return an error.