Cookie Consent Manager
Store API & Events
All logic lives in Shopware routes. The storefront controller only calls those routes — which makes the plugin headless ready.
Store API routes
Log a consent
POST /store-api/prems-cookie-consent/log
{
"consentId": "c0ffee00-…",
"acceptedGroups": ["necessary", "statistics"],
"rejectedGroups": ["marketing"],
"previousGroups": [],
"consentType": "individual"
}
consentType is one of accept_all, reject_all, individual or update. The IP address is hashed server-side — it is never stored in clear text.
Query the consent status
GET /store-api/prems-cookie-consent/status/{consentId}
Returns whether valid consent exists for the consent ID, which groups were accepted and when. This is the basis of Multi-Domain Synchronisation.
Storefront routes
| Route | Purpose |
|---|---|
POST /prems-cookie-consent/log |
Used by the banner to log the decision |
GET /prems-cookie-consent/sync/{consentId} |
Cross-domain adoption of a consent |
Admin API
For your own integrations and reports:
| Route | Purpose |
|---|---|
GET /api/_action/prems-cookie-consent/statistics/overview |
Key figures for a period |
GET /api/_action/prems-cookie-consent/statistics/timeline |
Timeline |
GET /api/_action/prems-cookie-consent/statistics/groups |
Acceptance per group |
GET /api/_action/prems-cookie-consent/statistics/devices |
Acceptance per device type |
GET /api/_action/prems-cookie-consent/export |
Consent log as CSV |
POST /api/_action/prems-cookie-consent/scanner/scan |
Start a scan |
GET /api/_action/prems-cookie-consent/scanner/last-result |
Last scan result |
GET /api/_action/prems-cookie-consent/presets |
Available third-party presets |
POST /api/_action/prems-cookie-consent/gtm/generate |
Generate a GTM container |
GET /api/_action/prems-cookie-consent/design/templates |
Design templates |
Cookie groups, cookies, the consent log and A/B tests are additionally available as regular DAL entities through the Admin API (prems_cookie_group, prems_cookie, prems_consent_log, prems_cookie_consent_ab_test).
Flow Builder
Two business events are available in the Flow Builder:
| Event | When |
|---|---|
prems_cookie_consent.consent.accepted |
Consent was granted or extended |
prems_cookie_consent.consent.revoked |
Consent was revoked entirely or in part |
Use them to trigger your own webhooks or to update customer data in a CRM, for example.
Running headless
If you build your own storefront you essentially need two things from the plugin: the cookie groups including their cookies (through the Admin API or a route of your own) and the two Store API routes for logging and querying. Blocking the scripts is then the responsibility of your frontend.