Consent
Get Customer Consent
GET https://api.bigcommerce.com/stores/{store_hash}/v3/customers/{customerId}/consentRequest
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 - integerrequiredThe 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.
allowarray[string]
Allowed: essential | functional | analytics | targeting
Type: array[string]Example: ["essential","targeting","functional"]denyarray[string]
Allowed: essential | functional | analytics | targeting
Type: array[string]Example: ["analytics"]updated_atstring
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 https://api.bigcommerce.com/stores/{store_hash}/v3/customers/{customerId}/consentRequest
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 - integerrequiredThe ID of the customer.
- Content-Type in header with default of application/json - string
Body
object | application/json
Request payload for the BigCommerce API.
allowarray[string]
Allowed: essential | functional | analytics | targeting
Type: array[string]Example: ["essential","targeting","functional"]denyarray[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.
allowarray[string]
Allowed: essential | functional | analytics | targeting
Type: array[string]Example: ["essential","targeting","functional"]denyarray[string]
Allowed: essential | functional | analytics | targeting
Type: array[string]Example: ["analytics"]updated_atstring
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?