BigCommerce Consent API

The Consent API from BigCommerce — 2 operation(s) for consent.

Operations 3

GET /customers/{customerId}/consent BigCommerce Get Customer Consent #
PUT /customers/{customerId}/consent BigCommerce Update Customer Consent #
POST /consent BigCommerce Set Cookie Consent Preferences #

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

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bigcommerce-consent-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bigcommerce-consent-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bigcommerce Consent API
  version: '1.0'
  description: 'Operations tagged Consent across 2 of this provider''s published API definitions: customers-openapi-original.yml, storefront-cookie-consent-openapi-original.yml. Each path carries the servers of the definition it was published in.'
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
- url: https://{store_domain}/api/storefront
  variables:
    store_domain:
      default: your_store.example.com
      description: The [URL authority](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#authority) of the storefront.
tags:
- name: Consent
paths:
  /customers/{customerId}/consent:
    parameters:
    - $ref: '#/components/parameters/customerId'
    get:
      description: Gets the status of a customerʼs consent to allow data collection by cookies and scripts while shopping on a storefront.
      summary: BigCommerce Get Customer Consent
      tags:
      - Consent
      operationId: getCustomerConsent
      deprecated: false
      responses:
        '200':
          $ref: '#/components/responses/consent_Resp'
        '401':
          description: Unauthorized - the v3 Auth client ID or token in the request are not a valid combination for this store.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Missing scope - the v3 Auth token is valid but does not have proper permissions to access this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid JSON request body - missing or invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - X-Auth-Token: []
    put:
      description: Updates the status of a customerʼs consent to allow data collection by cookies and scripts while shopping on a storefront.
      summary: BigCommerce Update Customer Consent
      tags:
      - Consent
      operationId: updateCustomerConsent
      deprecated: false
      parameters:
      - name: Content-Type
        in: header
        required: false
        description: ''
        schema:
          type: string
          default: application/json
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeclareCustomerConsentRequest'
        x-examples:
          application/json:
            allow:
            - essential
            deny: []
      responses:
        '200':
          $ref: '#/components/responses/consent_Resp'
        '401':
          description: Unauthorized - the v3 Auth client ID or token in the request are not a valid combination for this store.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Missing scope - the v3 Auth token is valid but does not have proper permissions to access this endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Invalid JSON request body - missing or invalid data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - X-Auth-Token: []
    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
  /consent:
    parameters: []
    post:
      summary: BigCommerce Set Cookie Consent Preferences
      tags:
      - Consent
      responses:
        '200':
          description: Consent Settings Saved
        '400':
          description: Invalid input
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsentPreferences'
            examples:
              Example:
                value:
                  allow:
                  - 2
                  - 3
                  deny:
                  - 4
        description: Data sent to the [Update customer consent](/docs/rest-management/customers/customer-consent#update-customer-consent) endpoint when creating a customer during checkout.
        required: true
      description: "Sets the status of a customer's consent to allow data collection by cookies and scripts according to the following consent categories:\n\n\n  2. Analytics — These cookies provide statistical information on site usage so the store owner can improve the website over time.  \n  3. Functional — These cookies enable enhanced functionality, such as videos and live chat. If a shopper does not allow these, then some or all of these functions may not work properly. \n  4. Targeting; Advertising — These cookies allow merchants to create profiles or personalize content to enhance users' shopping experience.\n  \n  \nThis endpoint only works if the cookie consent feature is enabled. It is assumed the shopper has not consented to anything until a value is explicitly set. The request body must be populated with a complete set of allowed and denied categories.\n\nOnce set, consent preferences will be saved as a cookie for guest shoppers. Consent preferences will be persisted to a shopper's account to be used for future sessions once they have logged in. Consent preferences can also be managed using the [Update customer consent](/docs/rest-management/customers/customer-consent#update-customer-consent) endpoint.   \n\n> #### Note\n> * Substitute your storefront domain for `yourstore.example.com`. \n"
      operationId: postCookieConsent
    servers:
    - url: https://{store_domain}/api/storefront
      variables:
        store_domain:
          default: your_store.example.com
          description: The [URL authority](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_URL#authority) of the storefront.
components:
  schemas:
    consentAllow:
      title: consentAllow
      type: array
      uniqueItems: true
      minItems: 0
      example:
      - essential
      - targeting
      - functional
      items:
        type: string
        enum:
        - essential
        - functional
        - analytics
        - targeting
      x-internal: false
    DeclareCustomerConsentRequest:
      title: DeclareCustomerConsentRequest
      description: Request payload for the BigCommerce API.
      type: object
      properties:
        allow:
          $ref: '#/components/schemas/consentAllow'
        deny:
          $ref: '#/components/schemas/Deny'
      x-internal: false
    ErrorResponse:
      title: Error Response
      type: object
      properties:
        status:
          description: The HTTP status code.
          type: integer
          format: int32
        title:
          description: The error title describing the particular error.
          type: string
        type:
          description: A link to a list of BigCommerce API status codes.
          type: string
        instance:
          type: string
        errors:
          type: object
          additionalProperties:
            type: string
      x-internal: false
    Deny:
      title: Deny
      type: array
      uniqueItems: true
      minItems: 0
      example:
      - analytics
      items:
        type: string
        enum:
        - essential
        - functional
        - analytics
        - targeting
      x-internal: false
    consent_Full:
      title: consent_Full
      description: Response payload for the BigCommerce API.
      type: object
      properties:
        allow:
          $ref: '#/components/schemas/consentAllow'
        deny:
          $ref: '#/components/schemas/Deny'
        updated_at:
          description: The date of which the customer consent was last updated.
          type: string
          format: date-time
      x-internal: false
    ConsentPreferences:
      type: object
      title: ConsentPreferences
      description: 'List of allowed and denied consent categories. Must be populated with a complete set of allowed and denied categories.


        Configurable categories are:


        2 - Functional

        3 - Analytics

        4 - Targeting; Advertising


        For further definition of these categories, see [Scripts API](/docs/integrations/scripts).'
      properties:
        allow:
          type: array
          description: Explicitly allowed consent categories. Allowed values are 2, 3, 4.
          items:
            type: integer
            enum:
            - 2
            - 3
            - 4
            example: 3
        deny:
          type: array
          description: Denied consent categories. Allowed values are 2, 3, 4.
          items:
            type: integer
            enum:
            - 2
            - 3
            - 4
            example: 4
      required:
      - allow
      - deny
      x-internal: false
  responses:
    consent_Resp:
      description: ''
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/consent_Full'
  parameters:
    customerId:
      name: customerId
      in: path
      required: true
      description: The ID of the customer.
      schema:
        type: integer
  securitySchemes:
    X-Auth-Token:
      name: X-Auth-Token
      description: '### OAuth scopes


        | UI Name | Permission | Parameter |

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

        | Customers | modify | `store_v2_customers` |

        | Customers | read-only | `store_v2_customers_read_only` |

        | Stored Payment Instruments | modify | `store_stored_payment_instruments` |

        | Stored Payment Instruments | read-only | `store_stored_payment_instruments_read_only` |


        ### 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
x-refined-from:
- customers-openapi-original.yml
- storefront-cookie-consent-openapi-original.yml