Server to Server Management APIs
Address

Address

BigCommerce B2B Edition Address

Get Countries

GET /countries

Request

Get a country's info from its code/name.

Authentication

  • authToken in header

Parameters

  • searchType in query with default of 0 - string
    required
    The search type, 0: Get the country code from the input country name; 1: Get the country name from the input country code.
    Example: 0

    Allowed: 0 | 1

  • q in query - string
    required
    Input country name/code
    Example: US (the searchType should be 1); United States (the searchType should be 0)

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/countries \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": {
"countryCode": "US",
"countryName": "United States"
},
"meta": {
"message": "SUCCESS"
}
}

Get States

GET /states

Request

Get a state's info from its code/name.

Authentication

  • authToken in header

Parameters

  • searchType in query with default of 0 - string
    required
    The search type, 0: Get the state code from the input state name; 1: Get the state name from the input state code.
    Example: 0

    Allowed: 0 | 1

  • q in query - string
    required
    Input state name/code
    Example: TX (the searchType should be 1); Texas (the searchType should be 0)
  • country in query with default of US / United States - string
    Country code or name,it should correspond to the search type you have chosen.
    Example: US(the searchType should be 1), United States(the searchType should be 0)

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/states \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

Get states success

{
"code": 200,
"data": {
"stateCode": "TX",
"stateName": "Texas"
},
"meta": {
"message": "SUCCESS"
}
}

Get Addresses

GET /addresses

Request

Get an addresses

Authentication

  • authToken in header

Parameters

  • limit in query with default of 10 - integer
    Pagination limit default: 10
  • offset in query - integer
    Pagination offset default: 0
  • minModified in query - number
    Minimum modified timestamp
  • maxModified in query - number
    Maximum modified timestamp
  • minCreated in query - number
    Minimum created timestamp
  • maxCreated in query - number
    Maximum created timestamp
  • companyId in query - integer
    Company ID
    Example: 12
  • isBilling in query - boolean
  • isShipping in query - boolean
  • isIncludeExtraFields in query with default of 0 - string
    Is show extra fields in the response.

    Allowed: 0 | 1

  • firstName in query - string
    Address first name filter
  • lastName in query - string
    Address last name filter
  • address in query - string
    Address address filter
  • city in query - string
    Address city filter
  • country in query - string
    Address country filter
  • state in query - string
    Address state filter
  • zipCode in query - string
    Address zip code filter
  • phoneNumber in query - string
    Address phone number filter
  • externalId[] in query - string
    External ID filter

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/addresses \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    array[object]
    required

  • meta
    object
    required

example

{
"code": 200,
"data": [
{
"addressId": "6",
"addressLine1": "123 Main Street",
"addressLine2": "Blvd",
"city": "Austin",
"country": {
"countryCode": "US",
"countryName": "United States"
},
"firstName": "Jane",
"isBilling": true,
"isDefaultBilling": true,
"isDefaultShipping": true,
"isShipping": true,
"lastName": "Doe",
"phoneNumber": "11111111111",
"state": {
"stateCode": "TX",
"stateName": "Texas"
},
"zipCode": "78751"
}
],
"meta": {
"message": "SUCCESS",
"pagination": {

Create a Company Address

POST /addresses

Request

Create a company's address

Authentication

  • authToken in header

Body

object | application/json
  • id
    integer
    read-only

    Unique numeric ID of this Address.
    Example: 1
  • addressLine1
    string
    required

    Address line 1 of the Address Model.
    >= 1 characters<= 200 characters
    Example: 1600 Pennsylvania Avenue NW
  • addressLine2
    string

    Address line 2 of the Address Model.
    >= 1 characters<= 200 characters
    Example: Washington, DC 22202
  • city
    string
    required

    City of the Address Model.
    >= 1 characters<= 100 characters
    Example: Austin
  • firstName
    string
    required

    First name of the Address Model.
    >= 1 characters<= 50 characters
    Example: Jane
  • lastName
    string
    required

    Last name of the Address Model.
    >= 1 characters<= 50 characters
    Example: Doe
  • isBilling
    boolean

    Is this address used for billing?
  • isDefaultBilling
    boolean

    Is this the default billing address of the company?
  • isDefaultShipping
    boolean

    Is this the default shipping address of the company?
  • isShipping
    boolean

    Is this address used for shipping?
  • phoneNumber
    string

    Contact phone number of this address.
    >= 1 characters<= 50 characters
    Example: 11111111111
  • zipCode
    string

    Zip code
    >= 1 characters<= 50 characters
    Example: 78751
  • companyId
    string
    required

    The company ID of this address owner.
    Example: 1840
  • countryName
    string
    required

    Country name of the Address Model. You can pass only one of the country names and country code, but when you pass both, either error will be corrected automatically when the other is right.
    >= 1 characters<= 150 characters
    Example: United States
  • countryCode
    string
    required

    Country code of the Address Model. You can pass only one of the country names and country code, but when you pass both, either error will be corrected automatically when the other is right
    >= 1 characters<= 50 characters
    Example: US
  • stateCode
    string

    State code of the Address Model. State code and State name can not be required, but whether it is required will be determined according to the country.
    >= 1 characters<= 50 characters
    Example: TX
  • stateName
    string

    State name of the Address Model. State code and state name can not be required, but whether it is required will be determined according to the country.
    >= 1 characters<= 150 characters
    Example: Texas
  • label
    string

    Label of the Address Model
  • extraFields
    array[object]

    Extra fields of the address
  • externalId
    string

Response

OK

Body

object | application/json
  • code
    integer
    required

  • data
    object
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": {
"addressId": "147340"
},
"meta": {
"message": "SUCCESS"
}
}

Get an Address

GET /addresses/{addressId}

Request

Get an address detail info

Authentication

  • authToken in header

Parameters

  • addressId in path - string
    required

example

curl --request GET \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/addresses/[addressId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

Update an Address

PUT /addresses/{addressId}

Request

Update an address attributes

Authentication

  • authToken in header

Parameters

  • addressId in path - string
    required

Body

object | application/json
  • id
    integer
    read-only

    Unique numeric ID of this Address.
    Example: 1
  • addressLine1
    string

    Address line 1 of the Address Model.
    >= 1 characters<= 200 characters
    Example: 1600 Pennsylvania Avenue NW
  • addressLine2
    string

    Address line 2 of the Address Model.
    >= 1 characters<= 200 characters
    Example: Washington, DC 22202
  • city
    string

    City of the Address Model.
    >= 1 characters<= 100 characters
    Example: Austin
  • firstName
    string

    First name of the Address Model.
    >= 1 characters<= 100 characters
    Example: Jane
  • lastName
    string

    Last name of the Address Model.
    >= 1 characters<= 100 characters
    Example: Doe
  • isBilling
    boolean

    Is this address use for billing
  • isDefaultBilling
    boolean

    Is default billing address of company
  • isDefaultShipping
    boolean

    Is default shipping address of company
  • isShipping
    boolean

    Is this address use for shipping
  • phoneNumber
    string

    Contact phone number of this address
    >= 1 characters<= 50 characters
    Example: 11111111111
  • zipCode
    string

    Zip code
    >= 1 characters<= 50 characters
    Example: 78751
  • companyId
    integer

    The company ID of this address owner
    Example: 1840
  • countryName
    string

    Country name of the Address Model.
    >= 1 characters<= 150 characters
    Example: United States
  • countryCode
    string

    Country code of the Address Model.
    >= 1 characters<= 50 characters
    Example: US
  • stateCode
    string

    State code of the Address Model.
    >= 1 characters<= 50 characters
    Example: TX
  • stateName
    string

    State name of the Address Model.
    >= 1 characters<= 150 characters
    Example: Texas
  • label
    string

    Label of the Address Model
  • extraFields
    array[object]

    Extra fields of the address
  • externalId
    string

example-1

{
"id": 1,
"addressLine1": "string",
"addressLine2": "Washington, DC 22202",
"city": "Austin",
"firstName": "Jane",
"lastName": "Doe",
"isBilling": true,
"isDefaultBilling": true,
"isDefaultShipping": true,
"isShipping": true,
"phoneNumber": "11111111111",
"zipCode": "78751",
"companyId": 1840,
"countryName": "United States",
"countryCode": "US",
"stateCode": "TX",
"stateName": "Texas",
"label": "test",
"extraFields": [],
"externalId": "2"
}

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": {
"addressId": "147340"
},
"meta": {
"message": "SUCCESS"
}
}

Delete an Address

DELETE /addresses/{addressId}

Request

Delete an address

Authentication

  • authToken in header

Parameters

  • addressId in path - string
    required

example

curl --request DELETE \
--url 'https://api-b2b.bigcommerce.com/api/v3/io/addresses/[addressId]' \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

example-1

{
"code": 200,
"data": {
"addressId": "147340"
},
"meta": {
"message": "SUCCESS"
}
}

Bulk Create Addresses

POST /addresses/bulk

Request

Bulk create addresses

Authentication

  • authToken in header

Body

array | application/json
  • id
    integer
    read-only

    Unique numeric ID of this Address.
    Example: 1
  • addressLine1
    string
    required

    Address line 1 of the Address Model.
    >= 1 characters<= 200 characters
    Example: 1600 Pennsylvania Avenue NW
  • addressLine2
    string

    Address line 2 of the Address Model.
    >= 1 characters<= 200 characters
    Example: Washington, DC 22202
  • city
    string
    required

    City of the Address Model.
    >= 1 characters<= 100 characters
    Example: Austin
  • firstName
    string
    required

    First name of the Address Model.
    >= 1 characters<= 50 characters
    Example: Jane
  • lastName
    string
    required

    Last name of the Address Model.
    >= 1 characters<= 50 characters
    Example: Doe
  • isBilling
    boolean

    Is this address used for billing?
  • isDefaultBilling
    boolean

    Is this the default billing address of the company?
  • isDefaultShipping
    boolean

    Is this the default shipping address of the company?
  • isShipping
    boolean

    Is this address used for shipping?
  • phoneNumber
    string

    Contact phone number of this address.
    >= 1 characters<= 50 characters
    Example: 11111111111
  • zipCode
    string

    Zip code
    >= 1 characters<= 50 characters
    Example: 78751
  • companyId
    string
    required

    The company ID of this address owner.
    Example: 1840
  • countryName
    string
    required

    Country name of the Address Model. You can pass only one of the country names and country code, but when you pass both, either error will be corrected automatically when the other is right.
    >= 1 characters<= 150 characters
    Example: United States
  • countryCode
    string
    required

    Country code of the Address Model. You can pass only one of the country names and country code, but when you pass both, either error will be corrected automatically when the other is right
    >= 1 characters<= 50 characters
    Example: US
  • stateCode
    string

    State code of the Address Model. State code and State name can not be required, but whether it is required will be determined according to the country.
    >= 1 characters<= 50 characters
    Example: TX
  • stateName
    string

    State name of the Address Model. State code and state name can not be required, but whether it is required will be determined according to the country.
    >= 1 characters<= 150 characters
    Example: Texas
  • label
    string

    Label of the Address Model
  • extraFields
    array[object]

    Extra fields of the address
  • externalId
    string

Response

OK

Body

object | application/json
  • code
    number
    required

  • data
    object
    required

  • meta
    object
    required

example-1

{
"code": 0,
"data": {},
"meta": {
"message": "string"
}
}

Get Address Extra Field Configs

GET /addresses/extra-fields

Request

Get address extra fields configs

Authentication

  • authToken in header

Parameters

  • offset in query - integer
    Pagination offset default: 0
  • limit in query with default of 10 - integer
    Pagination limit default: 10

example

curl --request GET \
--url https://api-b2b.bigcommerce.com/api/v3/io/addresses/extra-fields \
--header 'Content-Type: application/json' \
--header 'authToken: {{token}}'

Response

OK

Body

object | application/json
Response for successful request
  • code
    integer

    Response code of success request.
    Example: 200
  • meta
    object

    Used to response pagination information
    Example: {"pagination":{"limit":10,"offset":0,"totalCount":1}}
  • data
    array[object]

example-1

{
"code": 200,
"data": [
{
"id": 1,
"uuid": "2af143b0-3a78-4d16-af42-1f0f9a7bc85a",
"fieldName": "fax",
"fieldType": 0,
"isRequired": false,
"isUnique": false
}
],
"meta": {
"message": "Success",
"pagination": {
"limit": 10,
"offset": 0
}
}
}

See something you can improve? Edit this file on GitHub

Did you find what you were looking for?