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_COMPANYorREAD_WRITE_COMPANY
Query Parameters
| Parameter | Type | Description |
|---|---|---|
page | Integer | Page number to retrieve. Default is 1. |
limit | Integer | Number of addresses per page. Default is 10. |
companyId | String | Filter by company ID. |
customerId | String | Filter by customer ID. |
type | String | Filter by address type: billing or shipping. |
id:in | String | Comma-separated list of address IDs. |
date_modified:min | String | Addresses updated on or after this date (ISO 8601). |
date_modified:max | String | Addresses 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
| Field | Type | Description |
|---|---|---|
page | Number | Current page number. |
total | Number | Total number of addresses matching the filters. |
count | Number | Number of addresses on this page. |