Skip to main content
POST
Redact Customer
Shopify shops receive 403. Continue using Shopify’s customers/redact webhook, which Loop already handles.
Delete Customer only removes the Commerce Data catalog record. It is not a substitute for this GDPR redaction. Redaction anonymizes PII; it is not a hard delete.
The endpoint returns 202 {"accepted": true} and runs asynchronously. After the jobs finish, the matched Commerce Data customer and orders are anonymized, not deleted. Get Customer and Get Order then return the anonymized values. A customer.id or customer.external_id for a deleted customer is accepted (202) and that customer’s data is anonymized. A customer.id or customer.external_id that does not resolve returns 404. An orders_to_redact or orders_to_redact_external value that is unknown or not owned by the supplied customer or email returns 202 {"accepted": true} and is not redacted. An owned deleted order sent by its original external id in orders_to_redact_external is redacted. These identifier rules decide which records are redacted (customer.id or external_id, the email union, and orders_to_redact or orders_to_redact_external, 1–100 ids each). An empty orders_to_redact or orders_to_redact_external array returns 422. orders_to_redact and orders_to_redact_external only redact orders the identified customer owns: a core order whose customer or email matches, or a Commerce Data order belonging to that customer, including when identified by email. Any other customer’s order id in the list is ignored entirely, including its order-edit session data. If nothing in the list is owned, no orders are redacted, and the customer record is still anonymized.
  • Customer: first_name and last_name become gdpr; email becomes {id}_gdpr@loopreturns.com, where {id} is an internal identifier; phone becomes null.
  • Order: browser_ip and client_details_user_agent become null.
  • Shipping and billing address: name, first_name, last_name, address1, city, and postal_code become gdpr; company, address2, and phone become null; region, province_code, country, and country_code are kept.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
customer
object
required

At least one of id, email, or external_id is required. Send id or external_id, not both. id or external_id plus email redacts the union of matching orders.

orders_to_redact
integer<int64>[]

Loop global order ids, 1–100 inclusive. Narrows each customer match to these orders. Do not send with orders_to_redact_external.

Required array length: 1 - 100 elements
orders_to_redact_external
string[]

Merchant order ids, 1–100 inclusive. Narrows each customer match to these orders. Do not send with orders_to_redact. An owned deleted order sent by its original external id is redacted. An unknown or unowned value is not redacted.

Required array length: 1 - 100 elements
Maximum string length: 100

Response

Redaction accepted and queued.

accepted
boolean
required
Example:

true