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 Country

GET
https://api-b2b.bigcommerce.com/api/v3/io/countries
GET
/api/v3/io/countries
$curl -G https://api-b2b.bigcommerce.com/api/v3/io/countries \
> -H "X-Auth-Token: <apiKey>" \
> -d searchType=0 \
> --data-urlencode "q=US (the searchType should be 1); United States (the searchType should be 0)"
1{
2 "code": 200,
3 "data": {
4 "countryCode": "US",
5 "countryName": "United States"
6 },
7 "meta": {
8 "message": "SUCCESS"
9 }
10}
Retrieves country information based on the country name or two-letter code entered in the parameters. The response can be used to provide a valid country name or code in Company addresses. Use the `searchType` parameter to specify whether you are searching by a country's name or its two-letter [ISO code](https://www.iso.org/obp/ui/#search), and then add the appropriate value for the country to the `q` parameter. This endpoint only accepts country name values in English, but you can set the `searchBy` paramteter to `1` to retrieve country information with the standard ISO code instead.
Was this page helpful?
Previous

Addresses

Next

Get State

Built with

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

Use the searchType parameter to specify whether you are searching by a country’s name or its two-letter ISO code, and then add the appropriate value for the country to the q parameter. This endpoint only accepts country name values in English, but you can set the searchBy paramteter to 1 to retrieve country information with the standard ISO code instead.

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 country’s name (0) or its two-letter ISO code (1).

Allowed values:
qstringRequired

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