Skip to main content

ConsentAI API overview

App Proxy endpoints (public, signed)

Storefront traffic uses Shopify’s signed App Proxy at the prefix /apps/pcnaid-tnc. The server verifies the HMAC signature and 10-minute replay window. There are no public unsigned /api/settings or /api/consent endpoints.

Example: read settings

Set STORE_ORIGIN to the store’s HTTPS storefront origin without a trailing slash. Shopify supplies the HMAC signature automatically on the forwarded proxy request.

Embedded admin routes (Shopify Admin authentication)

All admin routes require an authenticated Shopify session with the account-owner guard. Plan-gated endpoints enforce their required plan server-side and with visible badges in the UI.

Public routes

Webhook endpoints (Shopify signed)

Webhooks require HMAC signature verification. The three compliance webhooks (customers/data_request, customers/redact, shop/redact) share a common handler and are processed one at a time per shop. The Advanced-plan CSV export provides one row per recorded consent event. Each row includes the consent text and policy link shown at the time of agreement, a timestamp, the shop domain, the storefront page and cart/session context, and, when an order was later linked, the matching order details. Every export is integrity-checked — if any stored evidence fails verification, the export refuses to produce output.

See also