Skip to Content

ConsentRecord

A recorded customer consent such as a policy acceptance, marketing permission, cookie policy, or custom type.

Type Definition

type ConsentRecord { id: ID! type: String! accepted: Boolean! text: String locale: String source: String metafields: [Metafield]! createdAt: String }

Fields

FieldTypeDescription
idID!The consent record ID.
typeString!Consent type identifier (e.g. privacy_policy, marketing, cookie_policy, or a custom slug).
acceptedBoolean!Whether the consent was accepted.
textStringAgreed wording stored with the consent.
localeStringLocale of the agreed wording.
sourceStringHow the consent was recorded (e.g. store_account, store_register, store_cookie_policy).
metafields[Metafield]!Metafields stored on this consent.
createdAtStringWhen the consent was agreed, in ISO 8601 format.

Relationships

ConsentRecord represents a customer consent event and maintains a relationship with Metafield objects through the metafields field, allowing additional custom data to be stored and associated with each consent record.

Example

{ id type accepted text locale source metafields { id key value } createdAt }

Implements

This type does not implement any interfaces.