Customer Addresses

Get All Customer Addresses

GET /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 - 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: {{token}}'

Response

Body

array | application/json
  • id
    integer
    read-only

    ID of this customer address. Read-Only.
    Example: 3
  • country_iso2
    string
    read-only

    2-letter ISO Alpha-2 code for the customer’s country. Read-Only.
    Example: US
  • customer_id
    integer

    ID of the associated customer.
    Example: 5
  • first_name
    string
    required

    The customer’s first name.
    Example: Jane
  • last_name
    string
    required

    The customer’s last name.
    Example: Doe
  • company
    string

    The customer’s company name.
    Example: BigCommerce
  • street_1
    string
    required

    The customer’s street address, line 1.
    Example: 123 Main Street
  • street_2
    string

    The customer’s street address, line 2.
  • city
    string
    required

    The customer’s city/town/suburb.
    Example: Austin
  • state
    string
    required

    The 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: Texas
  • zip
    string
    required

    The customer’s ZIP or postal code.
    Example: 78726
  • country
    string
    required

    The customer’s country. Must be the full country name.
    Example: United States
  • phone
    string
    required

    The customer’s phone number.
    Example: 123-345-7890
  • address_type
    string

    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 /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 - string
    required
    The MIME type of the response body.
  • customer_id in path - integer
    required
    Unique numeric ID of the customer.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • customer_id
    integer

    ID of the associated customer.
    Example: 5
  • first_name
    string
    required

    The customer’s first name.
    Example: Jane
  • last_name
    string
    required

    The customer’s last name.
    Example: Doe
  • company
    string

    The customer’s company name.
    Example: BigCommerce
  • street_1
    string
    required

    The customer’s street address, line 1.
    Example: 123 Main Street
  • street_2
    string

    The customer’s street address, line 2.
  • city
    string
    required

    The customer’s city/town/suburb.
    Example: Austin
  • state
    string
    required

    The 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: Texas
  • zip
    string
    required

    The customer’s ZIP or postal code.
    Example: 78726
  • country
    string
    required

    The customer’s country. Must be the full country name.
    Example: United States
  • phone
    string
    required

    The customer’s phone number.
    Example: 123-345-7890
  • address_type
    string

    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
  • id
    integer
    read-only

    ID of this customer address. Read-Only.
    Example: 3
  • country_iso2
    string
    read-only

    2-letter ISO Alpha-2 code for the customer’s country. Read-Only.
    Example: US
  • customer_id
    integer

    ID of the associated customer.
    Example: 5
  • first_name
    string
    required

    The customer’s first name.
    Example: Jane
  • last_name
    string
    required

    The customer’s last name.
    Example: Doe
  • company
    string

    The customer’s company name.
    Example: BigCommerce
  • street_1
    string
    required

    The customer’s street address, line 1.
    Example: 123 Main Street
  • street_2
    string

    The customer’s street address, line 2.
  • city
    string
    required

    The customer’s city/town/suburb.
    Example: Austin
  • state
    string
    required

    The 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: Texas
  • zip
    string
    required

    The customer’s ZIP or postal code.
    Example: 78726
  • country
    string
    required

    The customer’s country. Must be the full country name.
    Example: United States
  • phone
    string
    required

    The customer’s phone number.
    Example: 123-345-7890
  • address_type
    string

    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 /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 - 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: {{token}}'

Response

Get a Customer Address

GET /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 - 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: {{token}}'

Response

Body

object | application/json
  • id
    integer
    read-only

    ID of this customer address. Read-Only.
    Example: 3
  • country_iso2
    string
    read-only

    2-letter ISO Alpha-2 code for the customer’s country. Read-Only.
    Example: US
  • customer_id
    integer

    ID of the associated customer.
    Example: 5
  • first_name
    string
    required

    The customer’s first name.
    Example: Jane
  • last_name
    string
    required

    The customer’s last name.
    Example: Doe
  • company
    string

    The customer’s company name.
    Example: BigCommerce
  • street_1
    string
    required

    The customer’s street address, line 1.
    Example: 123 Main Street
  • street_2
    string

    The customer’s street address, line 2.
  • city
    string
    required

    The customer’s city/town/suburb.
    Example: Austin
  • state
    string
    required

    The 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: Texas
  • zip
    string
    required

    The customer’s ZIP or postal code.
    Example: 78726
  • country
    string
    required

    The customer’s country. Must be the full country name.
    Example: United States
  • phone
    string
    required

    The customer’s phone number.
    Example: 123-345-7890
  • address_type
    string

    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 /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 - 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.
  • Content-Type in header with default of application/json - string
    required
    The MIME type of the request body.

Body

object | application/json
  • id
    integer
    read-only

    ID of this customer address. Read-Only.
    Example: 3
  • customer_id
    integer

    ID of the associated customer.
    Example: 5
  • first_name
    string
    required

    The customer’s first name.
    Example: Jane
  • last_name
    string
    required

    The customer’s last name.
    Example: Doe
  • company
    string

    The customer’s company name.
    Example: BigCommerce
  • street_1
    string
    required

    The customer’s street address, line 1.
    Example: 123 Main Street
  • street_2
    string

    The customer’s street address, line 2.
  • city
    string
    required

    The customer’s city/town/suburb.
    Example: Austin
  • state
    string
    required

    The 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: Texas
  • zip
    string
    required

    The customer’s ZIP or postal code.
    Example: 78726
  • country
    string
    required

    The customer’s country. Must be the full country name.
    Example: United States
  • country_iso2
    string
    read-only

    2-letter ISO Alpha-2 code for the customer’s country. Read-Only.
    Example: US
  • phone
    string
    required

    The customer’s phone number.
    Example: 123-345-7890
  • address_type
    string

    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
  • id
    integer
    read-only

    ID of this customer address. Read-Only.
    Example: 3
  • country_iso2
    string
    read-only

    2-letter ISO Alpha-2 code for the customer’s country. Read-Only.
    Example: US
  • customer_id
    integer

    ID of the associated customer.
    Example: 5
  • first_name
    string
    required

    The customer’s first name.
    Example: Jane
  • last_name
    string
    required

    The customer’s last name.
    Example: Doe
  • company
    string

    The customer’s company name.
    Example: BigCommerce
  • street_1
    string
    required

    The customer’s street address, line 1.
    Example: 123 Main Street
  • street_2
    string

    The customer’s street address, line 2.
  • city
    string
    required

    The customer’s city/town/suburb.
    Example: Austin
  • state
    string
    required

    The 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: Texas
  • zip
    string
    required

    The customer’s ZIP or postal code.
    Example: 78726
  • country
    string
    required

    The customer’s country. Must be the full country name.
    Example: United States
  • phone
    string
    required

    The customer’s phone number.
    Example: 123-345-7890
  • address_type
    string

    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 /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 - 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: {{token}}'

Response

Get a Count of Customer Addresses

GET /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 - 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: {{token}}'

Response

Body

object | application/json
  • count
    number

    Example: 27

example

{
"count": 27
}
Did you find what you were looking for?