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
          • Authentication
          • Catalog
          • Company
              • GETList Countries
              • GETGet Address Edit Permission
              • GETList Company Addresses
              • POSTCreate Company Address
              • GETSearch Company Addresses
              • POSTSearch Addresses with Multiple Filters
              • GETGet Address
              • PUTUpdate Address Information
              • PUTMark Address as Active or Inactive
              • GETGet Company Default Addresses
          • Orders
          • Request for Quote
          • Sales Rep
          • Shopping List
          • Store Settings
      • Management
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTB2BStorefrontCompanyAddresses

List Countries

GET
https://api-b2b.bigcommerce.com/api/v2/companies/addresses/countries
GET
/api/v2/companies/addresses/countries
$curl -G https://api-b2b.bigcommerce.com/api/v2/companies/addresses/countries \
> -H "Authorization: Bearer <token>" \
> -d storeHash=abc123
200Retrieved
1{
2 "message": "string",
3 "code": 200,
4 "data": {
5 "list": [
6 {
7 "id": 226,
8 "countryName": "United States",
9 "countryCode": "US",
10 "states": [
11 {
12 "stateName": "Texas",
13 "stateCode": "TX"
14 }
15 ]
16 }
17 ]
18 }
19}
Returns a list of **all** countries and, if applicable, their states. The response includes the name and code of each returned element and the id of each country. **NOTE:** Due to the size of the list returned, the results should be cached for continued use, if possible. Equivalent Storefront GraphQL API Query: `countries`. For more information, see the [GraphQL Playground](https://api-b2b.bigcommerce.com/graphql/playground).
Was this page helpful?
Previous

Companies and Users

Next

Get Address Edit Permission

Built with

Returns a list of all countries and, if applicable, their states. The response includes the name and code of each returned element and the id of each country.

NOTE: Due to the size of the list returned, the results should be cached for continued use, if possible.

Equivalent Storefront GraphQL API Query: countries. For more information, see the GraphQL Playground.

Authentication

AuthorizationBearer

Authentication header

HeaderArgumentDescription
AuthorizationBearer {{B2B_JWT_TOKEN}}You can obtain this token using the steps described in the REST Storefront API section[…]

Query parameters

storeHashstringRequired
The unique alphanumeric store hash for the BigCommerce store.

Response

OK
messagestring
codedoubleDefaults to 200
dataobject