Return details about a consent record and its versions.

GET /v1/consents/{id}?version=n

Returns consent information by consent identifier. If version is omitted, the last version of the consent is returned. If version query parameter is provided, that version of the consent record is returned. The earliest version of a consent record is version 1.

The result contains the requested consent data:

Response

200 Ok

The response contains the consent information.

{
   "id":"5398fstre4358923",
   "uri": "https://consentgrid.io/v1/consents/5398fstre435892",   
   "version": 2,
   "owners": [{   
      "type": "user",
      "id": "358238768ef490"
      }],
   "timestamp": "2009-11-10T23:00:00Z",
   "choices": { JSON object describing user choices },
   "status": "active",
   "granule": "granule1",
   "scopes": [ ... ],
   "value": true
  },...]
}
403 Forbidden

The authenticated key does not have the privileges for this operation. The return value is a JSON error object containing diagnostic information.

404 Not Found

Consent record not found.