Term
POST/api/v1/term/bundles
Authorization
bearer_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
Authorization
bearer_token In: header
Query Parameters
User to evaluate
Action being attempted (e.g. commercial.use)
Locale for language-specific evaluation
Region for availability evaluation
Age context for age-gate evaluation
int320 <= valueResponse 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
Authorization
bearer_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
Authorization
bearer_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
Authorization
bearer_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
Authorization
bearer_token In: header
Query Parameters
Filter by document name
Filter by language
Filter by status (draft, published, superseded, withdrawn, archived)
Filter by mandatory flag
Filter by required action
1-indexed page number
int640 <= valuePage size
int640 <= valueSort field
Sort order (asc or desc)
Value in
- "asc"
- "desc"
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" } ], "pagination": { "has_more": true, "page": 0, "page_size": 0, "total": 0 }}POST/api/v1/term/documents
Authorization
bearer_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}
Authorization
bearer_token In: header
Path Parameters
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
Authorization
bearer_token In: header
Query Parameters
User to scope the export to
Document name to scope the export to
Bundle id to scope the export to
Inclusive lower bound for event creation time
date-timeInclusive upper bound for event creation time
date-timeResponse 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
Authorization
bearer_token In: header
Query Parameters
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
Authorization
bearer_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}
Authorization
bearer_token In: header
Path Parameters
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"}