Customer Addresses
Get All Customer Addresses
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addressesRequest
Returns a list of Customer Addresses. Returns the addresses belonging to a customer. Default sorting is by address id, from lowest to highest.
The maximum limit is 250. If a limit isn’t provided, up to 50 customer_addresses
are returned by default.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- page in query - number
Number of pages.
- limit in query - number
Count per page.
example
Response
Body
example
Create a Customer Address
POST https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addressesRequest
Creates a new Customer Address. (Note: The “state” property cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Required Fields
- first_name
- last_name
- phone
- street_1
- city
- state
- zip
- country
Read Only Fields
- id
- country_iso2
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
customer_idinteger
ID of the associated customer.
Example: 5first_namestring
requiredThe customer’s first name.
Example: Janelast_namestring
requiredThe customer’s last name.
Example: Doecompanystring
The customer’s company name.
Example: BigCommercestreet_1string
requiredThe customer’s street address, line 1.
Example: 123 Main Streetstreet_2string
The customer’s street address, line 2.
citystring
requiredThe customer’s city/town/suburb.
Example: Austinstatestring
requiredThe customer’s state/province. Do not abbreviate the state; spell out the entire word. For example, California. (Cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Example: Texaszipstring
requiredThe customer’s ZIP or postal code.
Example: 78726countrystring
requiredThe customer’s country. Must be the full country name.
Example: United Statesphonestring
requiredThe customer’s phone number.
Example: 123-345-7890address_typestring
Allowed: residential | commercial
Example: residential
example
Response
Body
example
Delete Customer Address
DELETE https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addressesRequest
By default, it deletes all Customer Addresses.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- page in query - number
Number of pages.
- limit in query - number
Count per page.
example
Response
Get a Customer Address
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}Request
Returns a Customer Address.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- page in query - number
Number of pages.
- limit in query - number
Count per page.
example
Response
Body
example
Update a Customer Address
PUT https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}Request
Updates a Customer Address.
Read Only Fields
- id
- country_iso2
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
idinteger
read-onlyID of this customer address. Read-Only.
Example: 3customer_idinteger
ID of the associated customer.
Example: 5first_namestring
requiredThe customer’s first name.
Example: Janelast_namestring
requiredThe customer’s last name.
Example: Doecompanystring
The customer’s company name.
Example: BigCommercestreet_1string
requiredThe customer’s street address, line 1.
Example: 123 Main Streetstreet_2string
The customer’s street address, line 2.
citystring
requiredThe customer’s city/town/suburb.
Example: Austinstatestring
requiredThe customer’s state/province. Do not abbreviate the state; spell out the entire word. For example, California. (Cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Example: Texaszipstring
requiredThe customer’s ZIP or postal code.
Example: 78726countrystring
requiredThe customer’s country. Must be the full country name.
Example: United Statescountry_iso2string
read-only2-letter ISO Alpha-2 code for the customer’s country. Read-Only.
Example: USphonestring
requiredThe customer’s phone number.
Example: 123-345-7890address_typestring
Allowed: residential | commercial
Example: residential
example
Response
Body
example
Delete a Customer Address
DELETE https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}Request
Deletes a Customer Address.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Get a Count of Customer Addresses
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/countRequest
Returns a count of addresses for a customer.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- page in query - number
Number of pages.
- limit in query - number
Count per page.
example
Response
Body
countnumber
Example: 27