Skip to main content

GET /consent/v1/:ledgerId/state/:recordId - read a record back

Returns the existing written consent record by ID. Since writes are asynchronous this may return 404 Not Found when called too soon after the POST. Retry with a short backoff.

Path parameters

Name

Type

Notes

ledgerId

UUID string

Your ledger UUID.

recordId

UUID string

The record's ID: metadata.id in the response to the write (see "POST /consent/v1/:ledgerId/state - record consent").

Authentication

  • Send a bearer token: Authorization: Bearer <token>.

  • The token must belong to the ledger's owner. A token of another owner, or a ledgerId that does not exist, is rejected with 403 Forbidden.

  • The token must carry the ledger:read scope. A token without it is rejected with 403 Forbidden, whose detail names the missing scope.

Responses

Status

Body

Meaning

200 OK

ConsentStateResource

The submitted record, split in two. metadata holds the ledgerId, the record's id, recordedAt, the submitted metadata fields (user, settings, and so on), and country / region derived at the edge from the caller's IP. spec holds the submitted surface, categories, and action.

400 Bad Request

application/problem+json

A path parameter is not valid, for instance not a valid UUID

401 Unauthorized

application/problem+json

Bearer token is missing, malformed, expired, or revoked

403 Forbidden

application/problem+json

The token belongs to another owner, the ledger does not exist, or the token lacks the ledger:read scope.

404 Not Found

application/problem+json

No such record, or it is not readable yet. Writes are asynchronous, so retry with a short backoff.

4xx

application/problem+json

Other client errors (see "Errors").

Example (illustrative values)

GET https://ledger.enzuzo.com/consent/v1/5ae66dc4-2a1a-4c84-b559-c7959100bb24/state/353fabdf-d4fc-4c7d-9e00-ff0c54879f2e
Authorization: Bearer <token>
HTTP/1.1 200 OK
{
  "apiVersion": "v1",
  "kind": "ConsentState",
  "metadata": {
    "ledgerId": "5ae66dc4-2a1a-4c84-b559-c7959100bb24",
    "id": "353fabdf-d4fc-4c7d-9e00-ff0c54879f2e",
    "recordedAt": "2026-10-20T17:22:05Z",
    "country": "CA",
    "region": "Ontario"
  },
  "spec": {
    "surface": { "kind": "web" },
    "categories": ["necessary", "analytics"],
    "action": "accept"
  }
}
Did this answer your question?