Skip to content
Elara One docs
Consent

Publish the consent banner

PUT
/v1/merchant/consent/banner

Sends the whole banner. Any change to the wording, categories, links or privacy notice version publishes a new, immutable version (201); an identical banner publishes nothing (200, the current version). Shoppers are asked again only when the banner offers a new category or the new privacy notice version is marked notice_purpose_change.

Authorization

tenantKeybearerAuth
headerX-Tenant-Key<token>

The public store key (pk_live_…). Required on every call.

headerAuthorizationBearer <token>

A customer token from POST /v1/auth/login, or a merchant API key, on routes that need one.

Header Parameters

X-Client-IP?string

Optional. IP address of the shopper (one IPv4/IPv6, no port, no list). Honoured only together with a valid X-Tenant-Secret; ignored otherwise. Used for rate limits and recorded with form submissions.

X-Tenant-Secret?string

Optional here. Server secret of the store: server-to-server only, never from a browser. Enables X-Client-IP.

Request Body

application/json
  1. body

PUT /api/v1/merchant/consent/banner. The whole banner, every time (a publish, not a patch).

Reject parity is enforced here, on top of the content shape having no way to express a breach:

  • labels.reject_all is required, like labels.accept_all; reject_all / show_reject_all may only be sent as true ("Reject all" cannot be hidden or switched off);
  • no category may be pre-ticked (preselected, default, checked, enabled may only be sent as false);
  • strictly necessary is explained (strictly_necessary), never offered as a choice;
  • at least one category is offered, each once.
privacy_notice_version*string
Match^[A-Za-z0-9][A-Za-z0-9._\-]{0,31}$
Lengthlength <= 32
notice_purpose_change?boolean
title*string
Lengthlength <= 120
body*string
Lengthlength <= 2000
labels*
links*
strictly_necessary*
categories*array<>
Items1 <= items <= 3
reject_all?unknown
Value in"yes""on""1"1"true"true
show_reject_all?unknown
Value in"yes""on""1"1"true"true
reject_all_enabled?unknown
Value in"yes""on""1"1"true"true

Response Body

response?stringapplication/json
Example Request
curl -X PUT 'https://api.elaraone.app/api/v1/merchant/consent/banner' \  -H 'X-Tenant-Key: pk_live_…' \  -H 'X-Tenant-Secret: your-server-secret' \  -H 'Content-Type: application/json' \  -d '{  "privacy_notice_version": "string",  "title": "string",  "body": "string",  "labels": {    "accept_all": "string",    "reject_all": "string",    "manage": "string",    "save": "string",    "settings_link": "string"  },  "links": {    "privacy_notice": "string"  },  "strictly_necessary": {    "label": "string",    "description": "string"  },  "categories": [    {      "key": "analytics",      "label": "string",      "description": "string"    }  ]}'
Example Response
"string"