The Get Customer Address API returns the address details of a certain customer, if the Address ID is known. The Address ID is often part of the data returned by most Get Order and Get Shipment, designated within the data block for shipping address information.
However, it’s important to note that the IDs returned from those calls apply only to the particular shipment. The Customer Address API allows a customer’s usual address to be obtained without relying on a particular shipment. If the Address ID is not known, then an Address Search can be used instead with the Customer ID as a parameter.
Note that the parameter schemas outlined in this guide are the exact same as in the previous version of OMS, as the Unified Commerce platform supports backwards compatibility for this API. The only change to this request is the format of the base endpoint, as shown in the below table. Remember to provide the x-vol-tenant key for authentication in the headers.
Production URL | https://{tenantId}-translation.mozu.com/api/v2/customerAddress/?{parameters} |
Sandbox URL | https://{tenantId}-translation.sandbox.mozu.com/api/v2/customerAddress/?{parameters} |
Supported Formats | JSON |
HTTP Method | GET |
Example
In this example, the customer details includes these particular properties:
- Address ID 0123456
- Both a valid billing and shipping address for Customer 000000
General Information
The response returns the following information about a customer address:
- Identification (address ID, customer ID and names)
- Contact Information (phone)
- Street Address
- Account Activity Flag (active, inactive, or frozen and fraudlock status)
- Address Type (billing or shipping)
The Full Request
Using the URL format as outlined in the table above, the entire call is simple to put together.
https://integration.shopatron.com/api/v2/customerAddress/0123456
The Full Response
This is the full response returned by the API.
{ "addressID": "0123456", "customerID": "000000", "firstName": "test", "lastName": "customer", "addressLine1": "000 TEST LN", "phone": "0000000000", "city": "DALLAS", "state": "TX", "postalCode": "75201", "countryCode": "US", "fraudLock": false, "active": true, "latitude": 38.6329, "longitude": -119.826, "isBilling": true, "isShipping": true }