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

curl --request GET \
--url 'https://api.bigcommerce.com/stores/[store_hash]/v3/customers/[customerId]/consent' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: {{token}}'

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

{
"allow": [
"essential",
"targeting",
"functional"
],
"deny": [
"analytics"
],
"updated_at": "2019-08-24T14:15:22Z"
}

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

{
"allow": [
"essential",
"targeting",
"functional"
],
"deny": [
"analytics"
]
}

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

{
"allow": [
"essential",
"targeting",
"functional"
],
"deny": [
"analytics"
],
"updated_at": "2019-08-24T14:15:22Z"
}
Did you find what you were looking for?