Skip to content

Create a new consent

Request

Headers
apiKeystringrequired
Bodyapplication/json

The content of the consent to create

agreementGroupGuidstring, (uuid)required

Specifies the guid of the agreementGroup

consentGroupGuidstring or null, (uuid)

Specifies the guid of the consentGroup

userIpstring, non-emptyrequired

Specifies the user ip address

Example:"127.0.0.1"
externalIDstring, non-emptyrequired

Specifies the external ID

Example:"2c65cf53-d083-4cab-8f13-402d73b24463"
environmentinteger, (int32)(EnviromentEnum)required
Enum:01
screenshotstring, (byte)required
clausesArray of objects(ClausesViewModel)required
fieldCollectionobjectrequired
curl -i -X POST \
  http://localhost/api/Consent \
  -H 'Content-Type: application/json' \
  -H 'apiKey: string' \
  -d '{
    "agreementGroupGuid": "770963cd-b340-45fc-b4ac-6f58c2b4e58d",
    "consentGroupGuid": "fbcb1e92-2897-4fbc-a84f-cec8496772aa",
    "userIp": "127.0.0.1",
    "externalID": "2c65cf53-d083-4cab-8f13-402d73b24463",
    "environment": 0,
    "screenshot": "string",
    "clauses": [
      {
        "tag": "my_tag",
        "accepted": true
      }
    ],
    "fieldCollection": {
      "property1": [
        []
      ],
      "property2": [
        []
      ]
    }
  }'

Responses

Created

Bodyapplication/json
guidstring, (uuid)
agreementobject(AgreementOutputViewModel)
fieldCollectionstring or null
consentDatestring, (date-time)
platformstring or null
userIdentifierstring or null
clausesArray of objects or null(ClausesViewModel)
agreementHashstring or null
externalIDstring or null
consentGroupGuidstring, (uuid)
screenshotstring or null, (byte)
userIpstring or null
Response
{ "guid": "ee6a7af7-650d-499b-8e32-58a52ffdb7bc", "agreement": { "version": "string", "enviroment": 0, "groupGuid": "57b4a4e2-6452-4a39-a08e-ed582f926ada", "nameOfAgreement": "string" }, "fieldCollection": "string", "consentDate": "2019-08-24T14:15:22Z", "platform": "string", "userIdentifier": "string", "clauses": [ { … } ], "agreementHash": "string", "externalID": "string", "consentGroupGuid": "fbcb1e92-2897-4fbc-a84f-cec8496772aa", "screenshot": "string", "userIp": "string" }