Ingest Event
POST /cdp/ingest — the public, credential-free ingest proxy the storefront Web Pixel
posts to. The server injects the upstream Unomi credential; the browser sends none. See
Ingest for the full security model.
Request
Section titled “Request”POST /cdp/ingestContent-Type: application/jsonOrigin: https://your-shop.myshopify.com- No credential. Send only
Content-Type(and the browser’sOrigin). AnyAuthorizationheader you send is ignored — the server builds the outgoing credential from scratch. - Body cap: 64 KB. A larger body is rejected
413before it is parsed or forwarded. - Body shape: a JSON object (the Unomi
context.jsonevent envelope). A non-JSON or non-object body is rejected400. - Scope binding: every tenancy-bearing
scopein the payload (source.scope,events[].scope,events[].target.scope) must equal the shop bound to the requestingOrigin, or the request is rejected403.
Body (example envelope)
Section titled “Body (example envelope)”{ "source": { "scope": "your-shop.myshopify.com" }, "events": [ { "scope": "your-shop.myshopify.com", "eventType": "view", "properties": {} } ]}Response
Section titled “Response”Example
Section titled “Example”curl -s -X POST "https://cdp.vyg.app/cdp/ingest" \ -H "Content-Type: application/json" \ -H "Origin: https://your-shop.myshopify.com" \ -d '{ "source": { "scope": "your-shop.myshopify.com" }, "events": [ { "scope": "your-shop.myshopify.com", "eventType": "view", "properties": {} } ] }'CORS is locked to storefront origins — any https://*.myshopify.com host plus configured
custom storefront domains. A disallowed Origin is rejected 403 and never reflected (no
* on this credentialed path). The proxy answers the OPTIONS preflight itself with the
locked, origin-reflecting headers.
Errors
Section titled “Errors”| Status | error code | When |
|---|---|---|
400 | bad_request | Body is not valid JSON, or not a JSON object. |
403 | forbidden | Origin not allowed, or a payload scope does not match the requesting storefront. |
405 | method_not_allowed | Method other than POST / OPTIONS. |
413 | payload_too_large | Body exceeds the 64 KB cap. |
502 | bad_gateway | Ingest target unconfigured, or the upstream forward failed. |
See Errors for the full envelope.