DoctavianDoctavian
ClickwrapConsents

Consent Get

GET
/consents/{sessionId}/get

This endpoint retrieves the details of a specific consent using the provided session Id. This includes information such as the session metadata (start and expiration times), consent status (accepted or not), external user identifier, and any associated data like environment or custom metadata.

Authorization

X-Subscription-Key<token>

In: header

Path Parameters

sessionId*

Header Parameters

Authorization*string

JWT token to authenticate the request on behalf of a specific Microsoft user or a backend service principal.

X-Subscription-Key*string

Unique API key used to identify and authorize access to a specific environment

Response Body

application/json

curl -X GET "https://example.com/consents//get" \  -H "Authorization: Bearer {{authToken}}" \  -H "X-Subscription-Key: {{apiKey}}"
"{\n  \"result\": {\n    \"statusCode\": 200,\n    \"message\": \"OK\",\n    \"data\": [\n      {\n        \"consent\": {\n          \"ipAddress\": \"{{userIpAddress}}\",\n          \"termDefinitionId\": \"{{termDefinitionId}}\",\n          \"sessionId\": \"{{sessionId}}\",\n          \"sessionStartDatetime\": \"{{sessionStartDatetime}}\",\n          \"sessionExpirationDatetime\": \"{{sessionExpirationDatetime}}\",\n          \"environmentData\": \"{{environmentDescription}}\",\n          \"additionalData\": \"{{customConsentMetadata}}\",\n          \"externalUserId\": \"{{externalUserIdentifier}}\",\n          \"accepted\": true, //false\n          \"acceptedDatetime\": \"{{acceptedTimestamp}}\"\n        }\n      }\n    ]\n  },\n  \"origin\": \"{{originEnvironment}}\",\n  \"dateTime\": \"{{responseTimestamp}}\",\n  \"userId\": \"{{userId}}\"\n}"