get https://{shopdomain}.myshoplaza.com/openapi/2022-01/customers//addresses
Requires
read_customer
access scope.
Retrieve a paginated list of addresses for a specific customer.
This API is especially useful for:
- Fetching all addresses associated with a customer.
- Displaying customer shipping and billing addresses.
- Managing address lists for customer profiles.
Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain
), ensuring all queries are applied to the correct store.
Request Parameters
Public Request Parameters
Path Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
customer_id | string | Yes | 165618e4-3243-4cd7-abc3-1234567890ab | Unique identifier of the customer. |
Query Parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
limit | int32 | No | 10 | Number of records per page. Default is 10 . Max is 250 . |
page | int32 | No | 1 | Page number to retrieve. Default is 1 . |
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Example | Description |
---|---|---|---|
addresses |
array of objects | Array containing address objects. | |
addresses[].id |
string | 2490dc6a-d511-4e5e-bbcb-d58e913243ad |
Unique identifier for the address. |
addresses[].customer_id |
string | 165618e4-3243-4cd7-abc3-1234567890ab |
Unique identifier of the customer. |
addresses[].first_name |
string | Ryan |
First name of the consignee. |
addresses[].last_name |
string | Zhang |
Last name of the consignee. |
addresses[].gender |
string | male |
Gender of the consignee. |
addresses[].email |
string | test@shoplazza.com |
Email associated with the address. |
addresses[].phone |
string | +86 1231231234 |
Phone number of the consignee. |
addresses[].phone_area_code |
string | +86 |
Area code of the phone number. |
addresses[].address1 |
string | 1 Rue des Carrieres |
Primary street address. |
addresses[].address2 |
string | Suite 1234 |
Secondary street address. |
addresses[].area |
string | Bay area |
Area or region of the address. |
addresses[].city |
string | SAN JOSE |
City of the address. |
addresses[].province |
string | New Mexico |
Province or state of the address. |
addresses[].province_code |
string | NM |
Province code. |
addresses[].country |
string | United States |
Full name of the country. |
addresses[].country_code |
string | US |
ISO country code. |
addresses[].zip |
string | 87036 |
Postal or ZIP code. |
addresses[].company |
string | ABC Limited |
Company associated with the address. |
addresses[].default |
boolean | true |
Whether this is the default address. |
Error Response
Error responses in the API can be represented using two different fields: errors
and error
. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field | Type | Example | Description |
---|---|---|---|
errors | Email or Phone is already taken | [ "Exceeds maximum limit of 250"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Empty or invalid customer's ID | |||
invalid limit input, e.g. 251 | "Exceeds maximum limit of 250" | ||
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
404 | Record not found | The customer's id provided is not found. | "Record not found" |