Return consent information matching search criteria.

GET https://api.consentgrid.io/v1/consents?queryParameters
Authorization: Bearer apiKey
GET https://api.consentgrid.io/v1/my/consents/{acct}?queryParameters
cookie cgs_{accountURL}: session

Returns consent information for selected or all SmartConsents. The query accepts the following parameters:

consents
A comma-separated list of SmartConsents to list. If omitted, all SmartConsents will be listed.
subject.type
Search for a specific subject type.
subject.id
Search for a specific subject id. If subject.type is not given, user is assumed.
status
A comma-separated list of consent statuses to list. Possible values are active, pending, and canceled. If omitted, consents with all statuses will be listed.
from
0-based offset into the result set.
max
Number of results to return. The maximum number of results that can be returned by a single API call is 100.

type determines the subject type, usually user.

Response

200 Ok

The response contains the total number of records matching the query, and the selected range of records.

{
 "total":120,
 "consents": [{
 {
   "id":"5398fstre4358923",
   "uri": "https://api.consentgrid.io/consent/v1/c?id=5398fstre435892",   
   "version": 2,
   "owners": [{   
      "type": "user",
      "id": "358238768ef490"
      }],
   "timestamp": "2009-11-10T23:00:00Z",
   "choices": { JSON object describing user choices },
   "status": "active",
   "consent": "c1",
   "scopes": [ ... ],
   "value": true
  },...
  ]
}
400 Bad Request

Malformed request, invalid value, etc. The return value is a JSON error object containing diagnostic information.

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

Subject not found.