On this page
cannedConsentPurposes
query · in the family Reading your records
What it does
The canned consent purpose list — each entry is a platform-preset consent purpose you can copy into your group.
The 6 canned consent-purpose templates: copy via copyCannedConsentPurpose. NOT a construct list (bounded 6 — the cannedRoles roster class; untouched). Requires authentication.
What happens
Reads only — changes nothing.
Who may call it
Capability area: Reading your records — Looking up and listing the records of your organization.
- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- An API key whose scope allows
api:cannedConsentPurposes
Returns
CannedConsentPurpose [CannedConsentPurpose!]! — One canned consent-purpose template: usable via copyCannedConsentPurpose → an ordinary EDITABLE group ConsentPurpose (fork semantics — a copy never auto-revs).
Example request
query ExampleCannedConsentPurposes {
cannedConsentPurposes {
key
code
caption
description
consentModel
version
}
}
Example response
{
"data": {
"cannedConsentPurposes": [
{
"key": "marketing_email",
"code": "BJ-001",
"caption": "Blue jeans",
"description": "Straight-cut, mid-rise, five pockets.",
"consentModel": "<consent model>",
"version": 1
}
]
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}
Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. (RATE_LIMIT)