Customer Addresses
Get All Customer Addresses
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses⚠️
This endpoint is deprecated.
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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- customer_id in path - integerrequiredUnique numeric ID of the customer.
- page in query - numberNumber of pages.
- limit in query - numberCount 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: {{token}}'
Response
Body
array | application/json
idinteger
read-onlyID of this customer address. Read-Only.Example: 3country_iso2string
read-only2-letter ISO Alpha-2 code for the customer’s country. Read-Only.Example: UScustomer_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
[
{
"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 https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses⚠️
This endpoint is deprecated.
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
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- customer_id in path - integerrequiredUnique numeric ID of the customer.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
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
{
"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
object | application/json
idinteger
read-onlyID of this customer address. Read-Only.Example: 3country_iso2string
read-only2-letter ISO Alpha-2 code for the customer’s country. Read-Only.Example: UScustomer_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
{
"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 https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses⚠️
This endpoint is deprecated.
Request
By default, it deletes all Customer Addresses.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- customer_id in path - integerrequiredUnique numeric ID of the customer.
- page in query - numberNumber of pages.
- limit in query - numberCount 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: {{token}}'
Response
Get a Customer Address
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}⚠️
This endpoint is deprecated.
Request
Returns a Customer Address.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- customer_id in path - integerrequiredUnique numeric ID of the customer.
- customer_address_id in path - integerrequiredID of the customer address.
- page in query - numberNumber of pages.
- limit in query - numberCount 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: {{token}}'
Response
Body
object | application/json
idinteger
read-onlyID of this customer address. Read-Only.Example: 3country_iso2string
read-only2-letter ISO Alpha-2 code for the customer’s country. Read-Only.Example: UScustomer_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
{
"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 https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}⚠️
This endpoint is deprecated.
Request
Updates a Customer Address.
Read Only Fields
- id
- country_iso2
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- customer_id in path - integerrequiredUnique numeric ID of the customer.
- customer_address_id in path - integerrequiredID of the customer address.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
object | application/json
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
{
"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
object | application/json
idinteger
read-onlyID of this customer address. Read-Only.Example: 3country_iso2string
read-only2-letter ISO Alpha-2 code for the customer’s country. Read-Only.Example: UScustomer_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
{
"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 https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/{customer_address_id}⚠️
This endpoint is deprecated.
Request
Deletes a Customer Address.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- customer_id in path - integerrequiredUnique numeric ID of the customer.
- customer_address_id in path - integerrequiredID 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: {{token}}'
Response
Get a Count of Customer Addresses
GET https://api.bigcommerce.com/stores/{store_hash}/v2/customers/{customer_id}/addresses/count⚠️
This endpoint is deprecated.
Request
Returns a count of addresses for a customer.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- customer_id in path - integerrequiredUnique numeric ID of the customer.
- page in query - numberNumber of pages.
- limit in query - numberCount 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: {{token}}'
Response
Body
object | application/json
countnumber
Example: 27
example
{
"count": 27
}
Did you find what you were looking for?