BigCommerce States API

The States API from BigCommerce — 5 operation(s) for states.

Documentation

📖
Documentation
https://developer.bigcommerce.com/
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/abandoned-carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/brands
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/categories
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/category-trees
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-modifiers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-variant-options
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/product-variants
📖
APIReference
https://developer.bigcommerce.com/docs/rest-catalog/products
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/channels
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/checkouts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/store-content
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/currencies
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/customers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/email-templates
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/geography
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/orders
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/pages
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/tokens
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/methods-deprecated
📖
APIReference
https://developer.bigcommerce.com/docs/rest-payments/processing
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/settings
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/shipping-v2
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/channels/site
📖
APIReference
https://developer.bigcommerce.com/docs/rest-management/store-information
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/carts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/checkouts
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/customers
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/orders
📖
APIReference
https://developer.bigcommerce.com/docs/rest-storefront/subscriptions
📖
APIReference
https://developer.bigcommerce.com/docs/integrations/webhooks
📖
APIReference
https://developer.bigcommerce.com/docs/rest-content/widgets

Specifications

Other Resources

OpenAPI Specification

bigcommerce-states-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: BigCommerce Abandoned Cart Emails States API
  version: 3.0.0
  termsOfService: https://www.bigcommerce.com/terms
  description: Abandoned Cart Emails V3 API managing Handlebars-based emails.
  contact:
    name: BigCommerce
    url: https://www.bigcommerce.com
    email: support@bigcommerce.com
servers:
- url: https://api.bigcommerce.com/stores/{store_hash}/v3
  variables:
    store_hash:
      default: store_hash
      description: Permanent ID of the BigCommerce store.
  description: BigCommerce API Gateway
security:
- X-Auth-Token: []
tags:
- name: States
paths:
  /countries/{country_id}/states:
    parameters:
    - name: country_id
      in: path
      required: true
      schema:
        type: string
    get:
      description: "Returns a list of *States* belonging to a *Country*. \nA state or province, identifiable by an ISO 3166 subdivision code."
      summary: BigCommerce Get All Countryʼs States
      operationId: getCountryStates
      parameters:
      - name: country_id
        in: path
        required: true
        description: Id of the country
        schema:
          type: integer
          exclusiveMinimum: false
          exclusiveMaximum: false
      - name: Accept
        in: header
        required: true
        description: ''
        schema:
          type: string
      - name: Content-Type
        in: header
        required: true
        description: ''
        schema:
          type: string
      - name: state
        in: query
        required: false
        description: Name of the state/province.
        schema:
          type: string
      - name: state_abbreviation
        in: query
        required: false
        description: Abbreviation for the state/province.
        schema:
          type: string
      - name: page
        in: query
        required: false
        description: Number of pages
        schema:
          type: number
          exclusiveMinimum: false
          exclusiveMaximum: false
      - name: limit
        in: query
        required: false
        description: Count per page
        schema:
          type: number
          exclusiveMinimum: false
          exclusiveMaximum: false
      responses:
        '200':
          $ref: '#/components/responses/countriesStatesCollectionResponse'
      tags:
      - States
  /countries/{country_id}/states/{id}:
    parameters:
    - name: country_id
      in: path
      required: true
      schema:
        type: string
    - schema:
        type: string
      name: id
      in: path
      required: true
    get:
      operationId: getCountryState
      description: "Returns a *State*. \nA state or province, identifiable by an ISO 3166 subdivision code."
      summary: BigCommerce Get a Countryʼs State
      parameters:
      - name: country_id
        in: path
        required: true
        description: Id of the country
        schema:
          type: integer
          exclusiveMinimum: false
          exclusiveMaximum: false
      - name: id
        in: path
        required: true
        description: Id of the states
        schema:
          type: integer
          exclusiveMinimum: false
          exclusiveMaximum: false
      - name: Accept
        in: header
        required: true
        description: ''
        schema:
          type: string
          default: application/json
      - name: Content-Type
        in: header
        required: true
        description: ''
        schema:
          type: string
          default: application/json
      responses:
        '200':
          $ref: '#/components/responses/countriesStatesResponse'
      x-unitTests: []
      x-operation-settings:
        CollectParameters: false
        AllowDynamicQueryParameters: false
        AllowDynamicFormParameters: false
        IsMultiContentStreaming: false
      tags:
      - States
  /countries/states/count:
    get:
      operationId: getStatesCount
      responses:
        '200':
          $ref: '#/components/responses/countResponse'
      summary: BigCommerce Get a Count of All States
      tags:
      - States
      description: Returns a count of all states.
  /countries/states:
    get:
      responses:
        '200':
          $ref: '#/components/responses/countriesStatesCollectionResponse'
      summary: BigCommerce Get All States
      tags:
      - States
      description: Returns a list of all states.
      operationId: getStates
      parameters:
      - schema:
          type: integer
        in: query
        name: limit
        description: The number of results to return per request.
      - schema:
          type: integer
        in: query
        name: page
        description: The ordered grouping of results to return.
  /countries/{country_id}/states/count:
    parameters:
    - name: country_id
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: getCountryStatesCount
      responses:
        '200':
          $ref: '#/components/responses/countResponse'
      summary: BigCommerce Get a Count of Country’s States
      tags:
      - States
      description: Returns a count of a countryʼs states.
components:
  responses:
    countriesStatesResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/countriesState_Full'
    countriesStatesCollectionResponse:
      description: ''
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '#/components/schemas/countriesState_Full'
    countResponse:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/count_Full'
          examples:
            response:
              value:
                count: 241
  schemas:
    countriesState_Full:
      title: countriesState_Full
      example:
        id: 208
        state: Australian Capital Territory
        state_abbreviation: ACT
        country_id: 13
      type: object
      properties:
        id:
          description: Numeric ID of the state/province.
          example: 208
          type: integer
        state:
          description: Name of the state/province.
          example: Australian Capital Territory
          type: string
        state_abbreviation:
          description: Abbreviation for the state/province.
          example: ACT
          type: string
        country_id:
          description: Numeric ID of the state’s/province’s associated country.
          example: 13
          type: integer
      description: 'Refers to the state returned in `GET` states requests. '
      x-internal: false
    count_Full:
      type: object
      properties:
        count:
          type: integer
          minimum: 1
      x-internal: false
  securitySchemes:
    X-Auth-Token:
      name: X-Auth-Token
      description: '### OAuth scopes


        | UI Name | Permission | Parameter |

        |:--|:--|:-|

        | Information & Settings  | read-only  | `store_v2_information_read_only`|

        | Information & Settings  | modify     | `store_v2_information`          |


        ### Authentication header


        | Header | Argument | Description |

        |:-|:|:|

        | `X-Auth-Token` | `access_token` | For more about API accounts that generate `access_token`s, see our [Guide to API Accounts](/docs/start/authentication/api-accounts). |


        ### Further reading


        For example requests and more information about authenticating BigCommerce APIs, see [Authentication and Example Requests](/docs/start/authentication#x-auth-token-header-example-requests).


        For more about BigCommerce OAuth scopes, see our [Guide to API Accounts](/docs/start/authentication/api-accounts#oauth-scopes).


        For a list of API status codes, see [API Status Codes](/docs/start/about/status-codes).'
      type: apiKey
      in: header