Skip to main content

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_COMPANY or READ_WRITE_COMPANY

Path Parameters​

ParameterTypeDescription
idStringThe 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​

FieldTypeDescription
idStringUnique identifier of the address.
companyStringID of the company the address belongs to, for company addresses.
customerStringID of the customer the address belongs to, for customer addresses.
typeStringshipping or billing.
companyNameStringCompany name shown on the address.
companyEmailStringEmail address for the address.
firstNameStringFirst name of the contact.
lastNameStringLast name of the contact.
address1StringAddress line 1.
address2StringAddress line 2.
phoneNumberStringPhone number of the contact.
cityStringCity.
stateObjectState name and code.
countryObjectCountry name and code.
zipcodeStringPostal code.
isDefaultAddressBooleanWhether this is the default address of its type. Default is false.
statusBooleanWhether the address is active. Default is true.
budgetObjectBudget settings (enabled, amount, period), when a budget is set.
metaFieldsArrayCustom field values. See Metafields.
createdAtStringDate and time the address was created (ISO 8601).
updatedAtStringDate and time the address was last updated (ISO 8601).