Update Address

Update the details of an existing address using its unique identifier.

🔒

Requires write_customer access scope.

The Update Address API allows update the details of a specific address for a given customer.

This API is especially useful for:

  1. Modifying a customer's address details.
  2. Updating shipping and billing addresses for orders.
  3. 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

ParameterTypeRequiredDescriptionExample
customer_idstringYesUnique identifier of the customer.165618e4-3243-4cd7-abc3-1234567890ab
address_idstringYesUnique identifier of the address.2490dc6a-d511-4e5e-bbcb-d58e913243ad

Body Parameters

FieldTypeRequiredExampleDescription
address.countrystringNo"United States"Country name of the address, required at least 1 character. e.g., "China".
address.country_codestringNoUSISO country code, required at least 1 character, e.g., "CN" for China.
address.first_namestringNoJohn"The first name of the person receiving the shipment or package.
address.last_namestringNo"Doe"The last name of the person receiving the shipment or package.
address.address1stringNo"123 Main St"This field represents the main address line, such as the house number and street name. It is used to specify the primary location of the address.
address.address2stringNo"Suite 200"This field represents an additional address line, such as an apartment number or suite number. It is used to provide more specific information about the location of the address.
address.areastringNo"Manhattan"Area or region of the address.
address.citystringNo"New York"City of the address. This field specifies the name of the city or town where the address is located.
address.provincestringNo"New York"Province or state of the address. This field specifies the administrative division or region within a country.
address.province_codestringNoUS-NMProvince code of the address. This field specifies the abbreviated or standardized code representing the province or state.
address.companystringNoCompany name associated with the address.
address.phonestringNo1231231234Phone number associated with the consignee.
address.phone_area_codestringNo1Area code for the phone number. This field specifies the code used to identify a specific geographic area for telephone calls.
address.zipstringNoPostal or ZIP code of the address. This field specifies the code used to identify a specific geographic area for mail delivery.
address.genderstringNo"male"Gender of the person, optional field. Acceptable values are "male" and "female".
address.emailstringNo"[email protected]"Email address for the consignee. This field is used to specify the email address of the person receiving the shipment or package.
address.defaultbooleanNotrueIndicates if this is the default address. "true" if this is the first address created for the user, otherwise "false".

Response Explanation

Public Response Parameters

📘

Successful Response

FieldTypeExampleDescription
codestring"success"Response status code
messagestring"Addresses retrieved"Descriptive message of the response
data.cursorstring"cursor_123"Pagination token
data.has_morebooleantrueMore results available
data.addressesList of addresses
data.addresses.idstring"addr_123"Unique address ID
data.addresses.customer_idstring"cust_456"Owning customer ID
data.addresses.first_namestring"John"Recipient first name
data.addresses.last_namestring"Doe"Recipient last name
data.addresses.companystring"ACME Inc"Company name
data.addresses.address1string"123 Main St"Primary address line
data.addresses.address2string"Suite 200"Secondary address line
data.addresses.citystring"New York"City name
data.addresses.provincestring"New York"State/province
data.addresses.countrystring"United States"Country name
data.addresses.zipstring"10001"Postal code
data.addresses.province_codestring"NY"Province abbreviation
data.addresses.country_codestring"US"ISO country code
data.addresses.genderstring"male"Recipient gender
data.addresses.phonestring"+12125551234"Contact number
data.addresses.phone_area_codestring"212"Phone area code
data.addresses.areastring"Manhattan"District/region
data.addresses.emailstring"[email protected]"Contact email
data.addresses.namestring"John Doe"Full recipient name
data.addresses.country_namestring"United States"Official country name
data.addresses.defaultbooleantrueDefault address flag

Error Response

FieldTypeExampleDescription
codestringInvalidParameterError http message
messagestring``Error message

API Structure Overview

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!