Address
Convert Country State
GET https://api-b2b.bigcommerce.com/api/v2/io/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 - stringrequiredAuth token in header
- country in query - stringCountry code/name
- state in query - stringCountry code/name
- search_type in query - stringConvert 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
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"countryName": "United States",
"stateName": "New York"
},
"message": "SUCCESS"
}
Get Company Addresses
GET https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/addresses⚠️
This endpoint is deprecated.
Request
Get all addresses for a company
Authentication
- authToken in header
Parameters
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth token in header.
- minLastModifiedTime in query - numberCompany filter condition: timestamp string e.g. 01/01/2000
- maxLastModifiedTime in query - numberCompany filter condition: timestamp string e.g. 01/01/2000
- minLastCreatedTime in query - numberCompany filter condition: timestamp string e.g. 01/01/2000
- maxLastCreatedTime in query - numberCompany filter condition: timestamp string e.g. 01/01/2000
- q in query - stringCompany query string
- firstName in query - numberAddress first name filter
- lastName in query - numberAddress first name filter
- address in query - numberAddress line 1 filter
- city in query - numberAddress city filter
- country in query - numberAddress country filter
- state in query - numberAddress state filter
- zipCode in query - numberAddress zip code filter
- phoneNumber in query - numberAddress phone number filter
- isShipping in query - numberAddress is shipping filter
- isBilling in query - numberAddress is billing filter
- externalId[] in query - arrayAddress external id filter
- offset in query - numberAddress pagination offset, default 0
- limit in query - numberAddress 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
codenumber
Response status codedataobject
Response data
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 https://api-b2b.bigcommerce.com/api/v2/io/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 - stringrequired
- authToken in header - stringrequiredAuth token in header.
Body
object | application/json
Request body
addressLine1string
requiredTypically the street addressaddressLine2string
More detailed information about where to deliver mail, such as a suite or office numbercitystring
requiredcountryobject
requiredfirstNamestring
requiredAddress first nameisBillingboolean
Indicates whether the address is a billing addressisDefaultBillingboolean
Indicates whether the address is the default billing addressisDefaultShippingboolean
Indicates whether the address is the default shipping addressisShippingboolean
Indicates whether the address is a shipping addresslabelstring
Address labellastNamestring
requiredAddress last namephoneNumberstring
Address phone numberstateobject
requiredzipCodestring
requiredexternalIdstring
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
codenumber
Response status codeExample: 200dataobject
Response data
example
{
"code": 200,
"data": {
"addressId": 12
},
"meta": {
"message": "Success"
}
}
Get A Company Address
GET https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/addresses/{addressId}⚠️
This endpoint is deprecated.
Request
Get an address for a company
Authentication
- authToken in header
Parameters
- addressId in path - stringrequired
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth 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
codenumber
Response status codedataobject
Response data
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 https://api-b2b.bigcommerce.com/api/v2/io/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 - stringrequired
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth token in header.
Body
object | application/json
Request body
addressLine1string
Typically the street addressaddressLine2string
More detailed information about where to deliver mail, such as a suite or office numbercitystring
countryobject
firstNamestring
Address first nameisBillingboolean
Indicates whether the address is a billing addressisDefaultBillingboolean
Indicates whether the address is the default billing addressisDefaultShippingboolean
Indicates whether the address is the default shipping addressisShippingboolean
Indicates whether the address is a shipping addresslabelstring
Address labellastNamestring
Address last namephoneNumberstring
Address phone numberstateobject
zipCodestring
externalIdstring
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
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"addressId": 4
},
"message": "Success"
}
Delete A Company Address
DELETE https://api-b2b.bigcommerce.com/api/v2/io/companies/{companyId}/addresses/{addressId}⚠️
This endpoint is deprecated.
Request
Deletes an address from a company.
Authentication
- authToken in header
Parameters
- addressId in path - stringrequired
- companyId in path - stringrequired
- authToken in header - stringrequiredAuth 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
codenumber
Response status codedataobject
Response data
example
{
"code": 200,
"data": {
"addressId": 2
},
"message": "Success"
}
Did you find what you were looking for?