Product documentation
Consent
The Consent resource.
Consent
The Consent resource.
Base URL: https://api.stg.thoryn.org
Operations
| Method | Path | Summary | Scopes |
|---|---|---|---|
GET | /api/v1/consents | Consent List | tenant:compliance.read |
POST | /api/v1/consents | Consent Grant | tenant:compliance.write |
GET | /api/v1/consents/check | Consent Check | tenant:compliance.read |
GET | /api/v1/consents/{consentId} | Consent Get | tenant:compliance.read |
POST | /api/v1/consents/{consentId}/change | Consent Change | tenant:compliance.write |
GET | /api/v1/consents/{consentId}/receipt | Consent Receipt | tenant:compliance.read |
POST | /api/v1/consents/{consentId}/withdraw | Consent Withdraw | tenant:compliance.write |
Operation details
GET /api/v1/consents
Consent List
- Operation ID:
consentList - Required scopes:
tenant:compliance.read
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
subjectId | query | no | string | |
needsReconsent | query | no | boolean |
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |
POST /api/v1/consents
Consent Grant
- Operation ID:
consentGrant - Required scopes:
tenant:compliance.write
Request body (required): application/json → CreateConsentRequest
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |
GET /api/v1/consents/check
Consent Check
- Operation ID:
consentCheck - Required scopes:
tenant:compliance.read
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
subjectId | query | yes | string | |
purposeKey | query | yes | string | |
version | query | no | integer |
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |
GET /api/v1/consents/{consentId}
Consent Get
- Operation ID:
consentGet - Required scopes:
tenant:compliance.read
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
consentId | path | yes | string |
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |
POST /api/v1/consents/{consentId}/change
Consent Change
- Operation ID:
consentChange - Required scopes:
tenant:compliance.write
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
consentId | path | yes | string |
Request body (required): application/json → ChangeConsentRequest
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |
GET /api/v1/consents/{consentId}/receipt
Consent Receipt
- Operation ID:
consentReceipt - Required scopes:
tenant:compliance.read
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
consentId | path | yes | string |
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |
POST /api/v1/consents/{consentId}/withdraw
Consent Withdraw
- Operation ID:
consentWithdraw - Required scopes:
tenant:compliance.write
Parameters:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
consentId | path | yes | string |
Request body: application/json → WithdrawConsentRequest
Responses:
| Status | Description | Body |
|---|---|---|
200 | OK | object |
401 | Unauthorized — bearer token missing, expired, signed by an untrusted issuer, or missing the tnt tenant claim. | Problem (problem+json) |
403 | Forbidden — token lacks a required tenant:* scope, or the tnt claim does not match the tenant addressed by the request path. | Problem (problem+json) |