Get All Shipping Addresses
Retrieves a paginated list of all active shipping addresses. To get the shipping addresses of one company, use Get Shipping Address.
HTTP Request
- URL:
/shippingAddress/all - 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. |
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>/shippingAddress/all?page=1&limit=50' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The shipping 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": "66b9b3b166169eecd60e5baa",
"company": "66b9b3b166169eecd60e5ba8",
"type": "shipping",
"firstName": "John",
"lastName": "Doe",
"address1": "3700 Old Seward Hwy",
"city": "Anchorage",
"state": { "name": "Alaska", "code": "AK" },
"country": { "name": "United States", "code": "US" },
"zipcode": "99503",
"isDefaultAddress": true,
"status": true,
"metaFields": [],
"createdAt": "2024-08-23T13:27:13.715Z",
"updatedAt": "2024-09-14T08:41:27.502Z"
}
],
"pagination": {
"page": 1,
"total": 1,
"count": 1
}
}
Response Details
Shipping 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 shipping addresses. |
count | Number | Number of shipping addresses on this page. |