For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • Introduction
    • Welcome to Monite
    • Monite account structure
    • Postman collections
    • Support
  • Get started
    • Step 1. Get your credentials
    • Step 2. Implement server side
        • Overview
        • Addresses
        • Bank accounts
        • Contacts
        • VAT IDs
      • Tags
      • Metadata
      • Payment terms
      • Payment records
      • Projects
LogoLogo
API StatusPartner Portal
On this page
  • Overview
  • Add an address to a counterpart
  • Set the default address
  • List all addresses
  • Retrieve an address
  • Edit an address
  • Delete an address
Common objectsCounterparts

Counterpart addresses

Was this page helpful?
Previous

Counterpart bank accounts

Next
Built with

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:

1curl -X POST 'https://api.sandbox.monite.com/v1/counterparts/{counterpart_id}/addresses' \
2 -H 'X-Monite-Version: 2023-09-01' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \
5 -H 'Content-Type: application/json' \
6 -d '{
7 "country": "DE",
8 "city": "Berlin",
9 "postal_code": "10115",
10 "state": "BE",
11 "line1": "Flughafenstrasse 52",
12 "line2": "Additional information"
13 }'

The successful response returns the information about the address including the ID:

1{
2 "country": "DE",
3 "city": "Berlin",
4 "postal_code": "10115",
5 "state": "BE",
6 "line1": "Flughafenstrasse 52",
7 "line2": "Addition information",
8 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
9 "counterpart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
10}

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:

1curl -X POST 'https://api.sandbox.monite.com/v1/counterparts/3fa8...f66afa6/addresses/9d2b4c8f...83c49a4/make_default' \
2 -H 'X-Monite-Version: 2023-09-01' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN'

The successful response contains information about the address marked as default:

1{
2 "country": "DE",
3 "city": "Berlin",
4 "postal_code": "10115",
5 "state": "BE",
6 "line1": "Flughafenstrasse 52",
7 "line2": "Additional information",
8 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
9 "is_default": true,
10 "counterpart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
11}

List all addresses

To get information about all addresses associated with the specified counterpart, call
GET /counterparts/{counterpart_id}/addresses as shown:

1curl -X GET 'https://api.sandbox.monite.com/v1/counterparts/{counterpart_id}/addresses' \
2 -H 'X-Monite-Version: 2023-09-01' \
3 -H 'X-Monite-Entity-Id: ENTITY_ID' \
4 -H 'Authorization: Bearer ACCESS_TOKEN' \

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.