put https://{shopdomain}.myshoplaza.com/openapi/2022-01/customers//addresses/
Requires
write_customer
access scope.
Update the details of a specific address for a given customer.
This API is especially useful for:
- Modifying a customer's address details.
- Updating shipping and billing addresses for orders.
- Managing customer profile address information.
Note: The operation is scoped to a specific shop, identified by its unique domain prefix (shopdomain
), ensuring all updates are applied to the correct store.
Request Parameters
Public Request Parameters
Path Parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
customer_id | string | Yes | Unique identifier of the customer. | 165618e4-3243-4cd7-abc3-1234567890ab |
address_id | string | Yes | Unique identifier of the address. | 2490dc6a-d511-4e5e-bbcb-d58e913243ad |
Body Parameters
Field | Type | Required | Example | Description |
---|---|---|---|---|
first_name | string | No | Ryan | First name of the consignee. |
last_name | string | No | Zhang | Last name of the consignee. |
gender | string | No | male | Gender of the consignee. Acceptable values: male , female . |
email | string | No | [email protected] | Email associated with the address. |
phone | string | No | +86 150 1447 1143 | Phone number of the consignee. |
phone_area_code | string | No | +86 | Area code of the phone number. |
address1 | string | No | 1 Rue des Carrieres | Primary street address. |
address2 | string | No | Suite 1234 | Secondary street address. |
area | string | No | Bay area | Area or region of the address. |
city | string | No | SAN JOSE | City of the address. |
province | string | No | New Mexico | Province or state of the address. |
province_code | string | No | NM | Province code. |
country | string | No | United States | Full name of the country. |
country_code | string | No | US | ISO code of the country. |
zip | string | No | 87036 | Postal or ZIP code. |
company | string | No | ABC Limited | Company associated with the address. |
default | boolean | No | true | Whether this is the default address. |
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Example | Description |
---|---|---|---|
address | object | The newly created address object. | |
address.id | string | 2490dc6a-d511-4e5e-bbcb-d58e913243ad | Unique identifier for the address. |
address.customer_id | string | 2dd957e3-2051-4cdf-8584-9c0046b4d1ae | Unique identifier of the customer. |
address.first_name | string | Ryan | First name of the consignee. |
address.last_name | string | Zhang | Last name of the consignee. |
address.company | string | ABC Limited | Company associated with the address. |
address.city | string | SAN JOSE | City of the address. |
address.province | string | New Mexico | Province or state of the address. |
address.province_code | string | NM | Province code. |
address.country | string | United States | Full name of the country. |
address.country_code | string | US | ISO code of the country. |
address.zip | string | 87036 | Postal or ZIP code. |
address.gender | string | male | Gender of the consignee. |
address.phone | string | +8615015570043 | Phone number of the consignee. |
address.phone_area_code | string | +86 | Area code of the phone number. |
address.area | string | Bay area | Area or region of the address. |
address.email | string | [email protected] | Email associated with the address. |
address.name | string | Ryan Zhang | Full name of the consignee. |
address.address1 | string | 1 Rue des Carrieres | Primary street address. |
address.address2 | string | Suite 1234 | Secondary street address. |
address.country_name | string | United States | Full name of the country. |
address.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 | ["Record not found"] | 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 |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized | |
422 | Email is invalid | Provided id is not existed. | Email is invalid |
Gender is not included in the list | invalid gender input | Gender is not included in the list | |
404 | Record Not Found | The customer_id and address_id provided is not found | Record Not Found |