B2B Edition
Address

Address

Convert Country State

GET /addresses/country_state
⚠️
This endpoint is deprecated.

Request

Convert country/state name to their code or code to name

Authentication

  • authToken in header

Parameters

  • authToken in header - string
    required
    Auth token in header
  • country in query - string
    Country code/name
  • state in query - string
    Country code/name
  • search_type in query - string
    Convert type, code means transfer the input country/state name to their code, name means transfer the input country/state code to their name

    Allowed: code | name

example

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

Response

Response success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"countryName": "United States",
"stateName": "New York"
},
"message": "SUCCESS"
}

Get Company Addresses

GET /companies/{companyId}/addresses
⚠️
This endpoint is deprecated.

Request

Get all addresses for a company

Authentication

  • authToken in header

Parameters

  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header.
  • minLastModifiedTime in query - number
    Company filter condition: timestamp string e.g. 01/01/2000
  • maxLastModifiedTime in query - number
    Company filter condition: timestamp string e.g. 01/01/2000
  • minLastCreatedTime in query - number
    Company filter condition: timestamp string e.g. 01/01/2000
  • maxLastCreatedTime in query - number
    Company filter condition: timestamp string e.g. 01/01/2000
  • q in query - string
    Company query string
  • firstName in query - number
    Address first name filter
  • lastName in query - number
    Address first name filter
  • address in query - number
    Address line 1 filter
  • city in query - number
    Address city filter
  • country in query - number
    Address country filter
  • state in query - number
    Address state filter
  • zipCode in query - number
    Address zip code filter
  • phoneNumber in query - number
    Address phone number filter
  • isShipping in query - number
    Address is shipping filter
  • isBilling in query - number
    Address is billing filter
  • externalId[] in query - array
    Address external id filter
  • offset in query - number
    Address pagination offset, default 0
  • limit in query - number
    Address pagination limit, default 4.

example

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

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"addresses": {
"7": {
"addressId": "7",
"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",
"channelId": 1,

Create A Company Address

POST /companies/{companyId}/addresses
⚠️
This endpoint is deprecated.

Request

Creates a new address for a company. You will specify the address fields and the type of address. The address can be billing, shipping, or both. You can also request that this address becomes the new default billing or shipping address for the company.

Authentication

  • authToken in header

Parameters

  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header.

Body

object | application/json
Request body
  • addressLine1
    string
    required

    Typically the street address
  • addressLine2
    string

    More detailed information about where to deliver mail, such as a suite or office number
  • city
    string
    required

  • country
    object
    required

  • firstName
    string
    required

    Address first name
  • isBilling
    boolean

    Indicates whether the address is a billing address
  • isDefaultBilling
    boolean

    Indicates whether the address is the default billing address
  • isDefaultShipping
    boolean

    Indicates whether the address is the default shipping address
  • isShipping
    boolean

    Indicates whether the address is a shipping address
  • label
    string

    Address label
  • lastName
    string
    required

    Address last name
  • phoneNumber
    string

    Address phone number
  • state
    object
    required

  • zipCode
    string
    required

  • externalId
    string

example

{
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"country": {
"countryCode": "string",
"countryName": "string"
},
"firstName": "string",
"isBilling": true,
"isDefaultBilling": true,
"isDefaultShipping": true,
"isShipping": true,
"label": "string",
"lastName": "string",
"phoneNumber": "string",
"state": {
"stateCode": "string",
"stateName": "string"
},
"zipCode": "string",
"externalId": "string"
}

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
    Example: 200
  • data
    object

    Response data
  • meta
    object

example

{
"code": 200,
"data": {
"addressId": 12
},
"meta": {
"message": "Success"
}
}

Get A Company Address

GET /companies/{companyId}/addresses/{addressId}
⚠️
This endpoint is deprecated.

Request

Get an address for a company

Authentication

  • authToken in header

Parameters

  • addressId in path - string
    required
  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header.

example

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

Response

Response success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

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",
"channelId": 1,
"channelName": "test"
},
"message": "SUCCESS"
}

Update A Company Address

PUT /companies/{companyId}/addresses/{addressId}
⚠️
This endpoint is deprecated.

Request

Updates an address for a company. You can change whether the address is for billing, shipping, or both. You can also update the address to be the default billing or shipping address for the company.

Authentication

  • authToken in header

Parameters

  • addressId in path - string
    required
  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header.

Body

object | application/json
Request body
  • addressLine1
    string

    Typically the street address
  • addressLine2
    string

    More detailed information about where to deliver mail, such as a suite or office number
  • city
    string

  • country
    object

  • firstName
    string

    Address first name
  • isBilling
    boolean

    Indicates whether the address is a billing address
  • isDefaultBilling
    boolean

    Indicates whether the address is the default billing address
  • isDefaultShipping
    boolean

    Indicates whether the address is the default shipping address
  • isShipping
    boolean

    Indicates whether the address is a shipping address
  • label
    string

    Address label
  • lastName
    string

    Address last name
  • phoneNumber
    string

    Address phone number
  • state
    object

  • zipCode
    string

  • externalId
    string

example

{
"addressLine1": "string",
"addressLine2": "string",
"city": "string",
"country": {
"countryCode": "string",
"countryName": "string"
},
"firstName": "string",
"isBilling": true,
"isDefaultBilling": true,
"isDefaultShipping": true,
"isShipping": true,
"label": "string",
"lastName": "string",
"phoneNumber": "string",
"state": {
"stateCode": "string",
"stateName": "string"
},
"zipCode": "string",
"externalId": "string"
}

Response

Response Success

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"addressId": 4
},
"message": "Success"
}

Delete A Company Address

DELETE /companies/{companyId}/addresses/{addressId}
⚠️
This endpoint is deprecated.

Request

Deletes an address from a company.

Authentication

  • authToken in header

Parameters

  • addressId in path - string
    required
  • companyId in path - string
    required
  • authToken in header - string
    required
    Auth token in header

example

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

Response

Deleted successful

Body

object | application/json
  • code
    number

    Response status code
  • data
    object

    Response data
  • message
    string

    Response message

example

{
"code": 200,
"data": {
"addressId": 2
},
"message": "Success"
}
Did you find what you were looking for?