Consent Docs

Runtime files

The endpoints that serve the browser runtime, its manifest, exact builds and the installable SDK packages, and the calls the runtime makes itself.

Reference2 min readFor developers calling the REST API

These endpoints serve the browser runtime and the SDK packages. None needs a key. Paths are relative to https://console.dpconsent.com/consent/sdk/v1. To add the script to a page, see Install on a website.

Endpoints#

GET /loader.js#

Returns the current version of the browser runtime.

Key Scope Idempotency-Key Webhook sent
None None Ignored None

Parameters

None.

Request

Script tagHTML
<script
  src="https://console.dpconsent.com/consent/sdk/v1/loader.js"
  data-piedap-key="pk_…"></script>
cURLShell
curl -sI https://console.dpconsent.com/consent/sdk/v1/loader.js

Response

200 with JavaScript, or 304 when the If-None-Match header matches.

Response header Value
X-Piedap-Runtime-Version The version served, such as 1.0.7
Cache-Control public, max-age=300, stale-while-revalidate=86400. Browsers check for a newer file every five minutes.
ETag A hash of the file

Errors

Status Code When
503 None The deployment has no runtime build.

GET /runtime/manifest.json#

Returns the current version, its file, its size and its Subresource Integrity hash, with the extension files and the installable packages.

Key Scope Idempotency-Key Webhook sent
None None Ignored None

Parameters

None.

Request

Shell
curl https://console.dpconsent.com/consent/sdk/v1/runtime/manifest.json

Response

200, trimmed:

JSON
{
  "name": "@piedap/consent",
  "version": "1.0.7",
  "file": "piedap-consent.min.js",
  "bytes": 107598,
  "gzipBytes": 33771,
  "integrity": "sha384-…",
  "extensions": {
    "tcf": {
      "file": "piedap-consent-tcf.min.js",
      "integrity": "sha384-…",
      "bytes": 42610
    },
    "gpp": {
      "file": "piedap-consent-gpp.min.js",
      "integrity": "sha384-…",
      "bytes": 144493
    }
  },
  "builtOn": "2026-09-25T07:15:54.549Z",
  "url":
    "https://console.dpconsent.com/consent/sdk/v1/runtime/1.0.7/piedap-consent.min.js",
  "packages": [
    {
      "name": "piedap-consent-1.0.7.tgz",
      "url":
        "https://console.dpconsent.com/consent/sdk/v1/packages/piedap-consent-1.0.7.tgz"
    }
  ]
}
Field Type Description
version string The current runtime version.
file, bytes, gzipBytes string, integer, integer The runtime file and its size.
integrity string The hash for the integrity attribute of a pinned script tag.
extensions object The TCF and GPP extension files, each with its own hash.
preview object The preview file the console uses, with its hash and url.
url string The address of this exact build.
packages array Every installable package, with its name and url.

Errors

Status Code When
404 None The deployment has no runtime build.

GET /runtime/{version}/{file}#

Returns one file of an exact build. It never changes, so it is cached for a year.

Key Scope Idempotency-Key Webhook sent
None None Ignored None

Parameters

Name Type Required Description
version string Yes Path parameter. A released version, such as 1.0.7.
file string Yes Path parameter. piedap-consent.min.js, piedap-consent-tcf.min.js, piedap-consent-gpp.min.js or piedap-consent-preview.min.js. Add .map for a source map.

Request

HTML
<script
  src="https://console.dpconsent.com/consent/sdk/v1/runtime/1.0.7/piedap-consent.min.js"
  integrity="sha384-…"
  crossorigin="anonymous"
  data-piedap-key="pk_…"
  data-piedap-api="https://console.dpconsent.com/consent"></script>

Response

200 with the file, sent with Cache-Control: public, max-age=31536000, immutable.

Errors

Status Code When
404 None The version or the file name is not known.

GET /packages/{name}#

Returns an installable SDK package.

Key Scope Idempotency-Key Webhook sent
None None Ignored None

Parameters

Name Type Required Description
name string Yes Path parameter. piedap-consent-1.0.7.tgz for npm, or piedap_consent-1.0.4-py3-none-any.whl for pip.

Request

npmShell
PACKAGES=https://console.dpconsent.com/consent/sdk/v1/packages
npm install $PACKAGES/piedap-consent-1.0.7.tgz
pipShell
PACKAGES=https://console.dpconsent.com/consent/sdk/v1/packages
pip install $PACKAGES/piedap_consent-1.0.4-py3-none-any.whl

Response

200 with the file as an attachment.

Errors

Status Code When
404 None No package has this name.

Endpoints the runtime uses#

The browser runtime calls these with the publishable key. You do not need to call them yourself.

Method and path Purpose
POST /impressions Counts that a form was shown. Carries nothing about the visitor.
POST /discovery Reports cookie names and third-party hosts seen on a small sample of page views. Names only, never values.
GET /cookie-declaration The cookie list that fills an element marked data-piedap-cookie-declaration.
GET /tcf/vendor-list.json The IAB vendor list for forms that use TCF.

↑↓ to move, Enter to open