Consent

Get Customer Consent

GET /customers/{customerId}/consent

Request

Gets the status of a customerʼs consent to allow data collection by cookies and scripts while shopping on a storefront.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • customerId in path - integer
    required
    The ID of the customer.

example

Response

Body

object | application/json
Response payload for the BigCommerce API.
  • allow
    array[string]

    Allowed: essential | functional | analytics | targeting

    Type: array[string]
    Example: ["essential","targeting","functional"]
  • deny
    array[string]

    Allowed: essential | functional | analytics | targeting

    Type: array[string]
    Example: ["analytics"]
  • updated_at
    string

    The date of which the customer consent was last updated.

example

Update Customer Consent

PUT /customers/{customerId}/consent

Request

Updates the status of a customerʼs consent to allow data collection by cookies and scripts while shopping on a storefront.

Authentication

  • X-Auth-Token in header

Parameters

  • store_hash in path - string
  • customerId in path - integer
    required
    The ID of the customer.
  • Content-Type in header with default of application/json - string

Body

object | application/json
Request payload for the BigCommerce API.
  • allow
    array[string]

    Allowed: essential | functional | analytics | targeting

    Type: array[string]
    Example: ["essential","targeting","functional"]
  • deny
    array[string]

    Allowed: essential | functional | analytics | targeting

    Type: array[string]
    Example: ["analytics"]

example

Response

Body

object | application/json
Response payload for the BigCommerce API.
  • allow
    array[string]

    Allowed: essential | functional | analytics | targeting

    Type: array[string]
    Example: ["essential","targeting","functional"]
  • deny
    array[string]

    Allowed: essential | functional | analytics | targeting

    Type: array[string]
    Example: ["analytics"]
  • updated_at
    string

    The date of which the customer consent was last updated.

example

Did you find what you were looking for?