Get Shipping Address
Retrieves all active shipping addresses of a company. The ID in the URL is the company ID.
HTTP Request
- URL:
/shippingAddress/{companyId} - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_COMPANYorREAD_WRITE_COMPANY
Path Parameters
| Parameter | Type | Description |
|---|---|---|
companyId | String | The ID of the company. |
cURL Example
curl --location '<BASE_URL>/shippingAddress/66b9b3b166169eecd60e5ba8' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The shipping addresses were returned successfully.
- 400 Bad Request: The access token is missing or invalid, or the company ID 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-08-23T13:27:13.715Z"
}
]
}
Response Details
Shipping Address Data
Each item in data has the same fields as the address returned by Get Address by ID.
Notes
- If the company has no shipping addresses,
datais an empty array. - To get a single address by its own ID, use Get Address by ID.