Get All Customer Addresses
GET /stores/{store_hash}/v2/customers/{customer_id}/addresses
Request
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 header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- customer_id in path - integer - required
Unique numeric ID of the customer.
- page in query - number
Number of pages
- limit in query - number
Count per page
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/customers/[customer_id]/addresses' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
example
[ { "id": 3, "country_iso2": "US", "customer_id": 5, "first_name": "Jane", "last_name": "Doe", "company": "BigCommerce", "street_1": "123 Main Street", "street_2": "string", "city": "Austin", "state": "Texas", "zip": "78726", "country": "United States", "phone": "123-345-7890", "address_type": "residential" } ]
Create a Customer Address
POST /stores/{store_hash}/v2/customers/{customer_id}/addresses
Request
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 header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
customer_idinteger
ID of the associated customer.
Example: 5
first_namestring
requiredThe customer’s first name.
Example: Jane
last_namestring
requiredThe customer’s last name.
Example: Doe
companystring
The customer’s company name.
Example: BigCommerce
street_1string
requiredThe customer’s street address, line 1.
Example: 123 Main Street
street_2string
The customer’s street address, line 2.
citystring
requiredThe customer’s city/town/suburb.
Example: Austin
statestring
requiredThe customer’s state/province. Do not abbreviate the state; spell out the entire word, e.g.: California. (Cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Example: Texas
zipstring
requiredThe customer’s ZIP or postal code.
Example: 78726
countrystring
requiredThe customer’s country. Must be the full country name.
Example: United States
phonestring
requiredThe customer’s phone number.
Example: 123-345-7890
address_typestring
Allowed: residential | commercial
Example: residential
example
{ "customer_id": 5, "first_name": "Jane", "last_name": "Doe", "company": "BigCommerce", "street_1": "123 Main Street", "street_2": "string", "city": "Austin", "state": "Texas", "zip": "78726", "country": "United States", "phone": "123-345-7890", "address_type": "residential" }
Response
Body
idinteger
ID of this customer address. READ-ONLY
Example: 3
country_iso2string
2-letter ISO Alpha-2 code for the customer’s country. READ-ONLY
Example: US
customer_idinteger
ID of the associated customer.
Example: 5
first_namestring
requiredThe customer’s first name.
Example: Jane
last_namestring
requiredThe customer’s last name.
Example: Doe
companystring
The customer’s company name.
Example: BigCommerce
street_1string
requiredThe customer’s street address, line 1.
Example: 123 Main Street
street_2string
The customer’s street address, line 2.
citystring
requiredThe customer’s city/town/suburb.
Example: Austin
statestring
requiredThe customer’s state/province. Do not abbreviate the state; spell out the entire word, e.g.: California. (Cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Example: Texas
zipstring
requiredThe customer’s ZIP or postal code.
Example: 78726
countrystring
requiredThe customer’s country. Must be the full country name.
Example: United States
phonestring
requiredThe customer’s phone number.
Example: 123-345-7890
address_typestring
Allowed: residential | commercial
Example: residential
example
{ "id": 3, "country_iso2": "US", "customer_id": 5, "first_name": "Jane", "last_name": "Doe", "company": "BigCommerce", "street_1": "123 Main Street", "street_2": "string", "city": "Austin", "state": "Texas", "zip": "78726", "country": "United States", "phone": "123-345-7890", "address_type": "residential" }
Delete Customer Address
DELETE /stores/{store_hash}/v2/customers/{customer_id}/addresses
Request
By default, it deletes all Customer Addresses.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- customer_id in path - integer - required
Unique numeric ID of the customer.
- page in query - number
Number of pages
- limit in query - number
Count per page
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/customers/[customer_id]/addresses' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Get a Customer Address
GET /stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}
Request
Returns a Customer Address.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- customer_id in path - integer - required
Unique numeric ID of the customer.
- customer_address_id in path - integer - required
ID of the customer address.
- page in query - number
Number of pages
- limit in query - number
Count per page
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/customers/[customer_id]/addresses/[customer_address_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
idinteger
ID of this customer address. READ-ONLY
Example: 3
country_iso2string
2-letter ISO Alpha-2 code for the customer’s country. READ-ONLY
Example: US
customer_idinteger
ID of the associated customer.
Example: 5
first_namestring
requiredThe customer’s first name.
Example: Jane
last_namestring
requiredThe customer’s last name.
Example: Doe
companystring
The customer’s company name.
Example: BigCommerce
street_1string
requiredThe customer’s street address, line 1.
Example: 123 Main Street
street_2string
The customer’s street address, line 2.
citystring
requiredThe customer’s city/town/suburb.
Example: Austin
statestring
requiredThe customer’s state/province. Do not abbreviate the state; spell out the entire word, e.g.: California. (Cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Example: Texas
zipstring
requiredThe customer’s ZIP or postal code.
Example: 78726
countrystring
requiredThe customer’s country. Must be the full country name.
Example: United States
phonestring
requiredThe customer’s phone number.
Example: 123-345-7890
address_typestring
Allowed: residential | commercial
Example: residential
example
{ "id": 3, "country_iso2": "US", "customer_id": 5, "first_name": "Jane", "last_name": "Doe", "company": "BigCommerce", "street_1": "123 Main Street", "street_2": "string", "city": "Austin", "state": "Texas", "zip": "78726", "country": "United States", "phone": "123-345-7890", "address_type": "residential" }
Update a Customer Address
PUT /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 header - required
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - string - required
The MIME type of the request body.
Body
idinteger
ID of this customer address. READ-ONLY
Example: 3
customer_idinteger
ID of the associated customer.
Example: 5
first_namestring
requiredThe customer’s first name.
Example: Jane
last_namestring
requiredThe customer’s last name.
Example: Doe
companystring
The customer’s company name.
Example: BigCommerce
street_1string
requiredThe customer’s street address, line 1.
Example: 123 Main Street
street_2string
The customer’s street address, line 2.
citystring
requiredThe customer’s city/town/suburb.
Example: Austin
statestring
requiredThe customer’s state/province. Do not abbreviate the state; spell out the entire word, e.g.: California. (Cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Example: Texas
zipstring
requiredThe customer’s ZIP or postal code.
Example: 78726
countrystring
requiredThe customer’s country. Must be the full country name.
Example: United States
country_iso2string
2-letter ISO Alpha-2 code for the customer’s country. READ-ONLY
Example: US
phonestring
requiredThe customer’s phone number.
Example: 123-345-7890
address_typestring
Allowed: residential | commercial
Example: residential
example
{ "id": 3, "customer_id": 5, "first_name": "Jane", "last_name": "Doe", "company": "BigCommerce", "street_1": "123 Main Street", "street_2": "", "city": "Austin", "state": "Texas", "zip": "78726", "country": "United States", "country_iso2": "US", "phone": "123-345-7890", "address_type": "residential" }
Response
Body
idinteger
ID of this customer address. READ-ONLY
Example: 3
country_iso2string
2-letter ISO Alpha-2 code for the customer’s country. READ-ONLY
Example: US
customer_idinteger
ID of the associated customer.
Example: 5
first_namestring
requiredThe customer’s first name.
Example: Jane
last_namestring
requiredThe customer’s last name.
Example: Doe
companystring
The customer’s company name.
Example: BigCommerce
street_1string
requiredThe customer’s street address, line 1.
Example: 123 Main Street
street_2string
The customer’s street address, line 2.
citystring
requiredThe customer’s city/town/suburb.
Example: Austin
statestring
requiredThe customer’s state/province. Do not abbreviate the state; spell out the entire word, e.g.: California. (Cannot be null. As a workaround for addresses that include no state/province string, pass a space as the “state” value.)
Example: Texas
zipstring
requiredThe customer’s ZIP or postal code.
Example: 78726
countrystring
requiredThe customer’s country. Must be the full country name.
Example: United States
phonestring
requiredThe customer’s phone number.
Example: 123-345-7890
address_typestring
Allowed: residential | commercial
Example: residential
example
{ "id": 3, "country_iso2": "US", "customer_id": 5, "first_name": "Jane", "last_name": "Doe", "company": "BigCommerce", "street_1": "123 Main Street", "street_2": "string", "city": "Austin", "state": "Texas", "zip": "78726", "country": "United States", "phone": "123-345-7890", "address_type": "residential" }
Delete a Customer Address
DELETE /stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}
Request
Deletes a Customer Address.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- customer_id in path - integer - required
Unique numeric ID of the customer.
- customer_address_id in path - integer - required
ID of the customer address.
example
curl --request DELETE \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/customers/[customer_id]/addresses/[customer_address_id]' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Get a Count of Customer Addresses
GET /stores/{store_hash}/v2/customers/{customer_id}/addresses/count
Request
Returns a count of addresses for a customer.
Authentication
- X-Auth-Token in header - required
Parameters
- store_hash in path - string
- Accept in header with default of application/json - string - required
The MIME type of the response body.
- customer_id in path - integer - required
Unique numeric ID of the customer.
- page in query - number
Number of pages
- limit in query - number
Count per page
example
curl --request GET \ --url 'https://api.bigcommerce.com/stores/[store_hash]/v2/customers/[customer_id]/addresses/count' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'X-Auth-Token: xxxxxxxxxxxxxxxxx'
Response
Body
countnumber
Example: 27
example
{ "count": 27 }