Address
BigCommerce B2B Edition Address
Get Countries
GET https://api-b2b.bigcommerce.com/api/v3/io/countriesRequest
Get a country's info from its code/name.
Authentication
- authToken in header
Parameters
- searchType in query with default of 0 - stringrequiredThe 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 - stringrequiredInput country name/codeExample: 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
codenumber
requireddataobject
required
example-1
{
"code": 200,
"data": {
"countryCode": "US",
"countryName": "United States"
},
"meta": {
"message": "SUCCESS"
}
}
Get States
GET https://api-b2b.bigcommerce.com/api/v3/io/statesRequest
Get a state's info from its code/name.
Authentication
- authToken in header
Parameters
- searchType in query with default of 0 - stringrequiredThe 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 - stringrequiredInput state name/codeExample: TX (the searchType should be 1); Texas (the searchType should be 0)
- country in query with default of US / United States - stringCountry 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
codenumber
requireddataobject
required
Get states success
{
"code": 200,
"data": {
"stateCode": "TX",
"stateName": "Texas"
},
"meta": {
"message": "SUCCESS"
}
}
Get Addresses
GET https://api-b2b.bigcommerce.com/api/v3/io/addressesRequest
Get an addresses
Authentication
- authToken in header
Parameters
- limit in query with default of 10 - integerPagination limit default: 10
- offset in query - integerPagination offset default: 0
- minModified in query - numberMinimum modified timestamp
- maxModified in query - numberMaximum modified timestamp
- minCreated in query - numberMinimum created timestamp
- maxCreated in query - numberMaximum created timestamp
- companyId in query - integerCompany IDExample: 12
- isBilling in query - boolean
- isShipping in query - boolean
- isIncludeExtraFields in query with default of 0 - stringIs show extra fields in the response.
Allowed: 0 | 1
- firstName in query - stringAddress first name filter
- lastName in query - stringAddress last name filter
- address in query - stringAddress address filter
- city in query - stringAddress city filter
- country in query - stringAddress country filter
- state in query - stringAddress state filter
- zipCode in query - stringAddress zip code filter
- phoneNumber in query - stringAddress phone number filter
- externalId[] in query - stringExternal 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
codenumber
requireddataarray[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 https://api-b2b.bigcommerce.com/api/v3/io/addressesRequest
Create a company's address
Authentication
- authToken in header
Body
object | application/json
idinteger
read-onlyUnique numeric ID of this Address.Example: 1addressLine1string
requiredAddress line 1 of the Address Model.>= 1 characters<= 200 charactersExample: 1600 Pennsylvania Avenue NWaddressLine2string
Address line 2 of the Address Model.>= 1 characters<= 200 charactersExample: Washington, DC 22202citystring
requiredCity of the Address Model.>= 1 characters<= 100 charactersExample: AustinfirstNamestring
requiredFirst name of the Address Model.>= 1 characters<= 50 charactersExample: JanelastNamestring
requiredLast name of the Address Model.>= 1 characters<= 50 charactersExample: DoeisBillingboolean
Is this address used for billing?isDefaultBillingboolean
Is this the default billing address of the company?isDefaultShippingboolean
Is this the default shipping address of the company?isShippingboolean
Is this address used for shipping?phoneNumberstring
Contact phone number of this address.>= 1 characters<= 50 charactersExample: 11111111111zipCodestring
Zip code>= 1 characters<= 50 charactersExample: 78751companyIdstring
requiredThe company ID of this address owner.Example: 1840countryNamestring
requiredCountry 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 charactersExample: United StatescountryCodestring
requiredCountry 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 charactersExample: USstateCodestring
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 charactersExample: TXstateNamestring
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 charactersExample: Texaslabelstring
Label of the Address ModelextraFieldsarray[object]
Extra fields of the addressexternalIdstring
Response
OK
Body
object | application/json
codeinteger
requireddataobject
required
example-1
{
"code": 200,
"data": {
"addressId": "147340"
},
"meta": {
"message": "SUCCESS"
}
}
Get an Address
GET https://api-b2b.bigcommerce.com/api/v3/io/addresses/{addressId}Request
Get an address detail info
Authentication
- authToken in header
Parameters
- addressId in path - stringrequired
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
codenumber
requireddataobject
required
Update an Address
PUT https://api-b2b.bigcommerce.com/api/v3/io/addresses/{addressId}Request
Update an address attributes
Authentication
- authToken in header
Parameters
- addressId in path - stringrequired
Body
object | application/json
idinteger
read-onlyUnique numeric ID of this Address.Example: 1addressLine1string
Address line 1 of the Address Model.>= 1 characters<= 200 charactersExample: 1600 Pennsylvania Avenue NWaddressLine2string
Address line 2 of the Address Model.>= 1 characters<= 200 charactersExample: Washington, DC 22202citystring
City of the Address Model.>= 1 characters<= 100 charactersExample: AustinfirstNamestring
First name of the Address Model.>= 1 characters<= 100 charactersExample: JanelastNamestring
Last name of the Address Model.>= 1 characters<= 100 charactersExample: DoeisBillingboolean
Is this address use for billingisDefaultBillingboolean
Is default billing address of companyisDefaultShippingboolean
Is default shipping address of companyisShippingboolean
Is this address use for shippingphoneNumberstring
Contact phone number of this address>= 1 characters<= 50 charactersExample: 11111111111zipCodestring
Zip code>= 1 characters<= 50 charactersExample: 78751companyIdinteger
The company ID of this address ownerExample: 1840countryNamestring
Country name of the Address Model.>= 1 characters<= 150 charactersExample: United StatescountryCodestring
Country code of the Address Model.>= 1 characters<= 50 charactersExample: USstateCodestring
State code of the Address Model.>= 1 characters<= 50 charactersExample: TXstateNamestring
State name of the Address Model.>= 1 characters<= 150 charactersExample: Texaslabelstring
Label of the Address ModelextraFieldsarray[object]
Extra fields of the addressexternalIdstring
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
codenumber
requireddataobject
required
example-1
{
"code": 200,
"data": {
"addressId": "147340"
},
"meta": {
"message": "SUCCESS"
}
}
Delete an Address
DELETE https://api-b2b.bigcommerce.com/api/v3/io/addresses/{addressId}Request
Delete an address
Authentication
- authToken in header
Parameters
- addressId in path - stringrequired
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
codenumber
requireddataobject
required
example-1
{
"code": 200,
"data": {
"addressId": "147340"
},
"meta": {
"message": "SUCCESS"
}
}
Bulk Create Addresses
POST https://api-b2b.bigcommerce.com/api/v3/io/addresses/bulkRequest
Bulk create addresses
Authentication
- authToken in header
Body
array | application/json
idinteger
read-onlyUnique numeric ID of this Address.Example: 1addressLine1string
requiredAddress line 1 of the Address Model.>= 1 characters<= 200 charactersExample: 1600 Pennsylvania Avenue NWaddressLine2string
Address line 2 of the Address Model.>= 1 characters<= 200 charactersExample: Washington, DC 22202citystring
requiredCity of the Address Model.>= 1 characters<= 100 charactersExample: AustinfirstNamestring
requiredFirst name of the Address Model.>= 1 characters<= 50 charactersExample: JanelastNamestring
requiredLast name of the Address Model.>= 1 characters<= 50 charactersExample: DoeisBillingboolean
Is this address used for billing?isDefaultBillingboolean
Is this the default billing address of the company?isDefaultShippingboolean
Is this the default shipping address of the company?isShippingboolean
Is this address used for shipping?phoneNumberstring
Contact phone number of this address.>= 1 characters<= 50 charactersExample: 11111111111zipCodestring
Zip code>= 1 characters<= 50 charactersExample: 78751companyIdstring
requiredThe company ID of this address owner.Example: 1840countryNamestring
requiredCountry 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 charactersExample: United StatescountryCodestring
requiredCountry 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 charactersExample: USstateCodestring
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 charactersExample: TXstateNamestring
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 charactersExample: Texaslabelstring
Label of the Address ModelextraFieldsarray[object]
Extra fields of the addressexternalIdstring
Response
OK
Body
object | application/json
codenumber
requireddataobject
required
example-1
{
"code": 0,
"data": {},
"meta": {
"message": "string"
}
}
Get Address Extra Field Configs
GET https://api-b2b.bigcommerce.com/api/v3/io/addresses/extra-fieldsRequest
Get address extra fields configs
Authentication
- authToken in header
Parameters
- offset in query - integerPagination offset default: 0
- limit in query with default of 10 - integerPagination 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
codeinteger
Response code of success request.Example: 200dataarray[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?