Skip to content

Raise a GDPR Request ​

About ​

The createGdprRequest mutation raises a new GDPR data request for the authenticated customer. A new request is created with status pending and is tied to the logged-in customer. The result carries a one-time successMessage confirming the request was raised.

Authentication ​

This mutation requires an authenticated customer — send the storefront key and a customer Bearer token. See the Authentication page.

GDPR must be enabled ​

If GDPR data requests are disabled in the store's admin configuration, the mutation fails with the message "GDPR data requests are disabled. Please enable GDPR from the admin configuration." in errors[]. The feature has been turned off on the admin side.

Input Fields ​

FieldTypeRequiredDescription
typeString✅ YesRequest type — delete (delete account data) or update (update personal data). Optional in the schema but rejected when absent, so treat it as required.
messageString✅ YesA message describing what the customer is requesting. Optional in the schema but rejected when absent.
clientMutationIdString❌ NoArbitrary string echoed back in the payload, for correlating a response with its request.

Possible Returns ​

FieldTypeDescription
gdprRequest._idInt!Numeric request ID.
gdprRequest.typeString!Request type: delete or update.
gdprRequest.statusString!Request status — pending for a freshly raised request.
gdprRequest.messageString!The message supplied in the request.
gdprRequest.emailString!Email address tied to the request.
gdprRequest.revokedAtStringTimestamp when the request was revoked, or null.
gdprRequest.createdAtStringRequest creation timestamp.
gdprRequest.updatedAtStringRequest last update timestamp.
gdprRequest.successMessageStringConfirmation message — present on create / revoke / delete results.
gdprRequest.customerCustomerThe customer who owns the request.
gdprRequest.customer._idInt!Numeric customer ID of the owner.

Released under the MIT License.