Skip to main content

Get Addresses

Retrieves a paginated list of active addresses for companies and customers. You can filter by company, customer, address type, IDs or last update date.

HTTP Request​

  • URL: /address
  • Method: GET
  • Headers:
    • accessToken: Required. Your API access token.
  • Required scope: READ_COMPANY or READ_WRITE_COMPANY

Query Parameters​

ParameterTypeDescription
pageIntegerPage number to retrieve. Default is 1.
limitIntegerNumber of addresses per page. Default is 10.
companyIdStringFilter by company ID.
customerIdStringFilter by customer ID.
typeStringFilter by address type: billing or shipping.
id:inStringComma-separated list of address IDs.
date_modified:minStringAddresses updated on or after this date (ISO 8601).
date_modified:maxStringAddresses updated on or before this date (ISO 8601).

cURL Example​

curl --location '<BASE_URL>/address?companyId=66b9b3b166169eecd60e5ba8&type=billing&page=1&limit=10' \
--header 'accessToken: <ACCESS_TOKEN>'

Response​

  • 200 OK: The addresses were returned successfully.
  • 400 Bad Request: The access token is missing or invalid, or a filter value is not valid.

Sample JSON Response​

{
"success": true,
"data": [
{
"id": "66b9b3b166169eecd60e5ba9",
"company": "66b9b3b166169eecd60e5ba8",
"type": "billing",
"firstName": "John",
"lastName": "Doe",
"address1": "102 East Green Milton Road",
"address2": "",
"phoneNumber": "9085551234",
"city": "Elizabeth",
"state": { "name": "New Jersey", "code": "NJ" },
"country": { "name": "United States", "code": "US" },
"zipcode": "07202",
"isDefaultAddress": true,
"status": true,
"metaFields": [],
"createdAt": "2024-08-12T07:03:13.111Z",
"updatedAt": "2024-08-12T07:03:13.111Z"
}
],
"pagination": {
"page": 1,
"total": 1,
"count": 1
}
}

Response Details​

Address Data​

Each item in data has the same fields as the address returned by Get Address by ID.

Pagination Details​

FieldTypeDescription
pageNumberCurrent page number.
totalNumberTotal number of addresses matching the filters.
countNumberNumber of addresses on this page.