For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Storefront
      • Management
        • Overview
          • Addresses
            • GETGet Country
            • GETGet State
            • GETList Addresses
            • POSTCreate Company Address
            • GETGet Address
            • PUTUpdate Address
            • DELDelete Address
            • POSTBulk Create Addresses
            • GETList Address Extra Field Configs
          • Authentication
          • Channels
          • Company
          • Invoice Management
          • Orders
          • Payment
          • Quotes
          • Sales Staff
          • Shopping List
          • Super Admin
          • Users
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTB2BManagementAddresses

Get State

GET
https://api-b2b.bigcommerce.com/api/v3/io/states
GET
/api/v3/io/states
$curl -G https://api-b2b.bigcommerce.com/api/v3/io/states \
> -H "X-Auth-Token: <apiKey>" \
> -d searchType=0 \
> --data-urlencode "q=TX (the searchType should be 1); Texas (the searchType should be 0)"
1{
2 "code": 200,
3 "data": {
4 "stateCode": "TX",
5 "stateName": "Texas"
6 },
7 "meta": {
8 "message": "SUCCESS"
9 }
10}
Retrieves state or province information based on the state name or two-letter code entered in the parameters. The response can be used to provide a valid state name or code in Company addresses. Use the `country` parameter to specify the country associated with the queried state. If left blank, the endpoint uses the United States by default. Note that only the countries listed below will return state or province values. When [creating](#create-a-company-address) or [updating](#update-an-address) addresses in these countries, you must include state information. * Argentina * Australia * Austria * Brazil * Canada * Chile * Germany * India * Indonesia * Ireland * Italy * Japan * Malaysia * Mexico * Myanmar * New Zealand * Philippines * Qatar * Romania * South Africa * Spain * Switzerland * United Arab Emirates * United States (default) Use the `searchType` parameter to specify whether you are searching by a state's name or its two-letter [ISO code](https://www.iso.org/obp/ui/#search), and then add the appropriate value for the state to the `q` parameter.
Was this page helpful?
Previous

Get Country

Next

List Addresses

Built with

Retrieves state or province information based on the state name or two-letter code entered in the parameters. The response can be used to provide a valid state name or code in Company addresses.

Use the country parameter to specify the country associated with the queried state. If left blank, the endpoint uses the United States by default.

Note that only the countries listed below will return state or province values. When creating or updating addresses in these countries, you must include state information.

  • Argentina
  • Australia
  • Austria
  • Brazil
  • Canada
  • Chile
  • Germany
  • India
  • Indonesia
  • Ireland
  • Italy
  • Japan
  • Malaysia
  • Mexico
  • Myanmar
  • New Zealand
  • Philippines
  • Qatar
  • Romania
  • South Africa
  • Spain
  • Switzerland
  • United Arab Emirates
  • United States (default)

Use the searchType parameter to specify whether you are searching by a state’s name or its two-letter ISO code, and then add the appropriate value for the state to the q parameter.

Authentication

X-Auth-Tokenstring
HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

X-Store-Hashstring
HeaderArgumentDescription
X-Store-Hashstore_hashThe unique store hash associated with a BigCommerce store that has B2B Edition enabled.

Query parameters

searchTypeenumRequired

Determines whether you are searching by a state or province’s name (0) or its two-letter ISO code (1). This parameter also defines the value type for the country parameter.

Allowed values:
qstringRequired

The state’s name or its two-letter ISO code, depending on the specified searchType.

Note: The state information entered for the parameter must correspond to the country specified in the country value.

countrystringOptionalDefaults to US / United States

The country’s name or its two-letter ISO code, depending on the specified searchType.

Response

OK
codedoubleDefaults to 200
dataobject
metaobject

Errors

404
Not Found Error