Get Address by ID
Retrieves the details of a single active address. The address can be a billing or shipping address of a company or a customer.
HTTP Request
- URL:
/address/{id} - Method:
GET - Headers:
accessToken: Required. Your API access token.
- Required scope:
READ_COMPANYorREAD_WRITE_COMPANY
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | String | The ID of the address to retrieve. |
cURL Example
curl --location '<BASE_URL>/address/66b9b3b166169eecd60e5baa' \
--header 'accessToken: <ACCESS_TOKEN>'
Response
- 200 OK: The address was returned successfully.
- 400 Bad Request: The access token is missing or invalid, or the address ID is not valid.
- 404 Not Found: No active address matches the ID.
Sample JSON Response
{
"success": true,
"data": {
"id": "66b9b3b166169eecd60e5baa",
"company": "66b9b3b166169eecd60e5ba8",
"type": "shipping",
"companyName": "Keystone Building Supply",
"companyEmail": "receiving@keystonebuild.com",
"firstName": "John",
"lastName": "Doe",
"address1": "3700 Old Seward Hwy",
"address2": "Dock 4",
"phoneNumber": "9075615173",
"city": "Anchorage",
"state": { "name": "Alaska", "code": "AK" },
"country": { "name": "United States", "code": "US" },
"zipcode": "99503",
"isDefaultAddress": true,
"status": true,
"metaFields": [
{
"id": "66b9b3b166169eecd60e5bb0",
"metaFieldId": "6643a1f2e4b0a1b2c3d4e601",
"code": "erp_shipto_id",
"label": "ERP Ship-To ID",
"displayStorefront": false,
"value": "100",
"valueType": "text"
}
],
"createdAt": "2024-08-23T13:27:13.715Z",
"updatedAt": "2024-08-23T13:27:13.715Z"
}
}
Response Details
Address Data
| Field | Type | Description |
|---|---|---|
id | String | Unique identifier of the address. |
company | String | ID of the company the address belongs to, for company addresses. |
customer | String | ID of the customer the address belongs to, for customer addresses. |
type | String | shipping or billing. |
companyName | String | Company name shown on the address. |
companyEmail | String | Email address for the address. |
firstName | String | First name of the contact. |
lastName | String | Last name of the contact. |
address1 | String | Address line 1. |
address2 | String | Address line 2. |
phoneNumber | String | Phone number of the contact. |
city | String | City. |
state | Object | State name and code. |
country | Object | Country name and code. |
zipcode | String | Postal code. |
isDefaultAddress | Boolean | Whether this is the default address of its type. Default is false. |
status | Boolean | Whether the address is active. Default is true. |
budget | Object | Budget settings (enabled, amount, period), when a budget is set. |
metaFields | Array | Custom field values. See Metafields. |
createdAt | String | Date and time the address was created (ISO 8601). |
updatedAt | String | Date and time the address was last updated (ISO 8601). |