Skip to content

Term

POST/api/v1/term/bundles
POST
/api/v1/term/bundles

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/term/bundles" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "required_documents": [      "string"    ]  }'
{  "bundle_id": "string",  "mandatory": true,  "name": "string",  "required_documents": [    "string"  ]}
GET/api/v1/term/check
GET
/api/v1/term/check

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

user_id*string

User to evaluate

action*string

Action being attempted (e.g. commercial.use)

locale?string

Locale for language-specific evaluation

region?string

Region for availability evaluation

age?integer

Age context for age-gate evaluation

Formatint32
Range0 <= value

Response Body

application/json

curl -X GET "https://example.com/api/v1/term/check?user_id=string&action=string"
{  "action": "string",  "age_gate": null,  "allowed": true,  "mandatory_update_required": true,  "reason": "string",  "required_documents": [    {      "document_id": "string",      "language": "string",      "name": "string",      "status": "missing",      "version": "string"    }  ],  "route": "string",  "user_id": "string"}
POST/api/v1/term/consents
POST
/api/v1/term/consents

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/term/consents" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string"  }'
{  "accepted_events": [    {      "created_at": "2019-08-24T14:15:22Z",      "document_hash": "string",      "document_id": "string",      "document_name": "string",      "document_version": "string",      "event_hash": "string",      "event_id": "string",      "event_type": "accepted",      "language": "string",      "user_id": "string"    }  ],  "complete": true,  "remaining_required_documents": [    "string"  ]}
POST/api/v1/term/consents/batch
POST
/api/v1/term/consents/batch

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

A batch of consent records. Each is authorized per-entry by the handler and applied independently and fail-fast; the server enforces a per-batch cap.

Response Body

application/json

curl -X POST "https://example.com/api/v1/term/consents/batch" \  -H "Content-Type: application/json" \  -d '{    "consents": [      {        "user_id": "string"      }    ]  }'
{  "count": 0,  "results": [    {      "accepted_events": [        {          "created_at": "2019-08-24T14:15:22Z",          "document_hash": "string",          "document_id": "string",          "document_name": "string",          "document_version": "string",          "event_hash": "string",          "event_id": "string",          "event_type": "accepted",          "language": "string",          "user_id": "string"        }      ],      "complete": true,      "remaining_required_documents": [        "string"      ]    }  ]}
POST/api/v1/term/consents/revoke
POST
/api/v1/term/consents/revoke

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/term/consents/revoke" \  -H "Content-Type: application/json" \  -d '{    "user_id": "string"  }'
{  "cleared_bits": 0,  "revoked_events": [    {      "created_at": "2019-08-24T14:15:22Z",      "document_hash": "string",      "document_id": "string",      "document_name": "string",      "document_version": "string",      "event_hash": "string",      "event_id": "string",      "event_type": "accepted",      "language": "string",      "user_id": "string"    }  ]}
GET/api/v1/term/documents
GET
/api/v1/term/documents

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

filter?

Conditions as filter[][]=. Conditions on different fields all apply. in (any of) and all (every one of, on fields holding several values) take a comma-separated list (\, for a literal comma). exists takes true or false. Datetimes are RFC 3339, now, or a time before now such as -30m, -6h or -7d.

q?string

Full-text search over this list's searchable fields.

Length1 <= length <= 200
sort?string

Comma-separated sort keys, - for descending, at most 1. Keys: name, version, effective_at, published_at. Default: -published_at.

limit?integer

Rows per page, 1 to 100 (default 25).

Range1 <= value <= 100
cursor?string

The page.next_cursor of the previous page. Cannot be combined with page.

page?integer

A 1-based page number, for jumping. Cannot be combined with cursor.

Range1 <= value
total?boolean

Set to true to include the number of matching rows in page.total.

action?string

Only documents whose machine constraints require acceptance for this action

Response Body

application/json

curl -X GET "https://example.com/api/v1/term/documents"
{  "documents": [    {      "content_hash": "string",      "content_uri": "string",      "created_at": "2019-08-24T14:15:22Z",      "document_id": "string",      "effective_at": "2019-08-24T14:15:22Z",      "expires_at": "2019-08-24T14:15:22Z",      "language": "string",      "machine_constraints": {        "bundle_id": "string",        "commercial_use_required": true,        "minimum_age": 0,        "regions": [          "string"        ],        "requires_acceptance_for": [          "string"        ]      },      "mandatory": true,      "name": "string",      "published_at": "2019-08-24T14:15:22Z",      "published_by": "string",      "status": "draft",      "supersedes_document_id": "string",      "title": "string",      "updated_at": "2019-08-24T14:15:22Z",      "version": "string"    }  ],  "page": {    "has_more": true,    "next_cursor": "string",    "page": 0,    "total": 0  }}
POST/api/v1/term/documents
POST
/api/v1/term/documents

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/term/documents" \  -H "Content-Type: application/json" \  -d '{    "content_hash": "string",    "language": "string",    "name": "string",    "title": "string",    "version": "string"  }'
{  "content_hash": "string",  "document_id": "string",  "language": "string",  "mandatory": true,  "name": "string",  "status": "draft",  "version": "string"}
GET/api/v1/term/documents/{document_id}
GET
/api/v1/term/documents/{document_id}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

document_id*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/term/documents/string"
{  "content_hash": "string",  "content_uri": "string",  "created_at": "2019-08-24T14:15:22Z",  "document_id": "string",  "effective_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "language": "string",  "machine_constraints": {    "bundle_id": "string",    "commercial_use_required": true,    "minimum_age": 0,    "regions": [      "string"    ],    "requires_acceptance_for": [      "string"    ]  },  "mandatory": true,  "name": "string",  "published_at": "2019-08-24T14:15:22Z",  "published_by": "string",  "status": "draft",  "supersedes_document_id": "string",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z",  "version": "string"}
GET/api/v1/term/export
GET
/api/v1/term/export

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

user_id?string

User to scope the export to

document_name?string

Document name to scope the export to

bundle_id?string

Bundle id to scope the export to

from?string

Inclusive lower bound for event creation time

Formatdate-time
to?string

Inclusive upper bound for event creation time

Formatdate-time

Response Body

application/json

curl -X GET "https://example.com/api/v1/term/export"
{  "chain": {    "complete_chain": true,    "event_count": 0,    "gaps": [      "string"    ],    "verified": true  },  "documents": {    "property1": 0,    "property2": 0  },  "events": [    {      "created_at": "2019-08-24T14:15:22Z",      "document_hash": "string",      "document_name": "string",      "document_version": "string",      "event_hash": "string",      "event_id": "string",      "event_type": "accepted",      "language": "string",      "previous_event_hash": "string"    }  ],  "export_id": "string",  "report_hash": "string",  "signature": "string",  "signature_algorithm": "string",  "user_id": "string"}
GET/api/v1/term/export/verify
GET
/api/v1/term/export/verify

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Query Parameters

export_id*string

Id of the previously generated export to verify

Response Body

application/json

curl -X GET "https://example.com/api/v1/term/export/verify?export_id=string"
{  "chain": {    "complete_chain": true,    "event_count": 0,    "gaps": [      "string"    ],    "verified": true  },  "event_count": 0,  "export_id": "string",  "recomputed_report_hash": "string",  "report_hash": "string",  "signature_valid": true}
POST/api/v1/term/signatures
POST
/api/v1/term/signatures

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/term/signatures" \  -H "Content-Type: application/json" \  -d '{    "signature_hash": "string",    "user_id": "string"  }'
{  "signature_hash": "string",  "signature_id": "string",  "user_id": "string"}
GET/api/v1/term/status/{user}
GET
/api/v1/term/status/{user}

Authorization

bearer_token
AuthorizationBearer <token>

In: header

Path Parameters

user*string

Response Body

application/json

curl -X GET "https://example.com/api/v1/term/status/string"
{  "active": [    {      "accepted_at": "2019-08-24T14:15:22Z",      "document_hash": "string",      "document_id": "string",      "language": "string",      "name": "string",      "version": "string"    }  ],  "mandatory_update_required": true,  "missing": [    {      "document_id": "string",      "language": "string",      "name": "string",      "status": "missing",      "version": "string"    }  ],  "revoked": [    {      "accepted_at": "2019-08-24T14:15:22Z",      "document_hash": "string",      "document_id": "string",      "language": "string",      "name": "string",      "version": "string"    }  ],  "superseded": [    {      "accepted_at": "2019-08-24T14:15:22Z",      "document_hash": "string",      "document_id": "string",      "language": "string",      "name": "string",      "version": "string"    }  ],  "user_id": "string"}