Vai al contenuto

Create a new consent

Richiesta

Intestazioni
apiKeystringobbligatorio
Corpoapplication/json

The content of the consent to create

agreementGroupGuidstring, (uuid)obbligatorio

Specifies the guid of the agreementGroup

consentGroupGuidstring or null, (uuid)

Specifies the guid of the consentGroup

userIpstring, non-emptyobbligatorio

Specifies the user ip address

Esempio:"127.0.0.1"
externalIDstring, non-emptyobbligatorio

Specifies the external ID

Esempio:"2c65cf53-d083-4cab-8f13-402d73b24463"
environmentinteger, (int32)(EnviromentEnum)obbligatorio
Enum:01
screenshotstring, (byte)obbligatorio
clausesArray of objects(ClausesViewModel)obbligatorio
fieldCollectionobjectobbligatorio
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": [
        []
      ]
    }
  }'

Risposte

Created

Corpoapplication/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
Risposta
{ "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" }