States
Get All Countryʼs States
GET https://api.bigcommerce.com/stores/{store_hash}/v2/countries/{country_id}/statesRequest
Returns a list of States belonging to a Country. A state or province, identifiable by an ISO 3166 subdivision code.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- country_id in path - integerrequiredId of the country
- Accept in header with default of application/json - stringrequired
- Content-Type in header with default of application/json - stringrequired
- state in query - stringName of the state/province.
- state_abbreviation in query - stringAbbreviation for the state/province.
- page in query - numberNumber of pages.
- limit in query - numberCount per page.
example
Response
Body
array | application/json
idinteger
Numeric ID of the state/province.Example: 208statestring
Name of the state/province.Example: Australian Capital Territorystate_abbreviationstring
Abbreviation for the state/province.Example: ACTcountry_idinteger
Numeric ID of the state’s/province’s associated country.Example: 13
example
Get a Countryʼs State
GET https://api.bigcommerce.com/stores/{store_hash}/v2/countries/{country_id}/states/{id}Request
Returns a State. A state or province, identifiable by an ISO 3166 subdivision code.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- country_id in path - integerrequiredId of the country
- id in path - integerrequiredId of the states
- Accept in header with default of application/json - stringrequired
- Content-Type in header with default of application/json - stringrequired
example
Response
Body
object | application/json
Refers to the state returned in
GET
states requests. idinteger
Numeric ID of the state/province.Example: 208statestring
Name of the state/province.Example: Australian Capital Territorystate_abbreviationstring
Abbreviation for the state/province.Example: ACTcountry_idinteger
Numeric ID of the state’s/province’s associated country.Example: 13
example
Get a Count of All States
GET https://api.bigcommerce.com/stores/{store_hash}/v2/countries/states/countRequest
Returns a count of all states.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
example
Response
Body
object | application/json
countinteger
Min: 1
response
Get All States
GET https://api.bigcommerce.com/stores/{store_hash}/v2/countries/statesRequest
Returns a list of all states.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- limit in query - integerThe number of results to return per request.
- page in query - integerThe ordered grouping of results to return.
example
Response
Body
array | application/json
idinteger
Numeric ID of the state/province.Example: 208statestring
Name of the state/province.Example: Australian Capital Territorystate_abbreviationstring
Abbreviation for the state/province.Example: ACTcountry_idinteger
Numeric ID of the state’s/province’s associated country.Example: 13
example
Get a Count of Country’s States
GET https://api.bigcommerce.com/stores/{store_hash}/v2/countries/{country_id}/states/countRequest
Returns a count of a countryʼs states.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- country_id in path - integerrequired
example
Response
Body
object | application/json
countinteger
Min: 1
response
Did you find what you were looking for?