POST consentRequest

DEPRECATED, redirects to consentRequests

Request Information

Parameters

NameDescriptionAdditional information
consentRequestInput An ConsentRequest object specifying consent request added

Define this parameter in the request body.

Request body formats

application/hal+xml

No sample

application/hal+json

Sample:
{
  "CoveredBy": "999888777",
  "OfferedBy": "999888777",
  "OfferedByName": "bedriftsnavn" 
  "HandledBy": "999888777",
  "RequiredDelegator": "12018211111",
  "RequiredDelegatorName": "olsen"
  "ValidTo": "2019-06-25T13:17:31.495Z",
  "RedirectUrl": "https://example.com/example",
  "RequestResources": [
    {
      "ServiceCode": "x1234",
      "ServiceEditionCode": 1112,
      "Metadata": {
        "inntektsaar": 2019
      }
    }
  ],
  "RequestMessage": {
    "no-nb": "string",
    "no-nn": "string",
    "en": "string"
  }
}
                    

Response body formats

application/hal+xml

No sample

application/hal+json

Sample:
{
  "authorizationCode": "15ef5462-8c90-4e16-a7df-73aabe6c487d",
  "requestStatus": "Unopened",
  "coveredBy": "999888777",
  "offeredBy": "999888777",
  "handledBy": "999888777",
  "requiredDelegator": "12018211111",
  "validTo": "2019-06-25T13:17:31.558Z",
  "redirectUrl": "https://example.com/example",
  "serverNotificationUrl": "https://example.com/example",
  "requestServices": [
    {
      "serviceCode": "x1234",
      "serviceEditionCode": 1112,
      "operations": [
        "read"
      ],
      "metadata": {
        "inntektsaar": 2019
      }
    }
  ],
  "requestMessage": {
    "no-nb": "string",
    "no-nn": "string",
    "en": "string"
  },
  "_links": {
    "self": {
      "href": "https://altinn.no/api/consentRequest/15ef5462-8c90-4e16-a7df-73aabe6c487d"
    },
    "gui": {
      "href": "https://altinn.no/ui/AccessConsent/request?id=15ef5462-8c90-4e16-a7df-73aabe6c487d"
    }
  }
}
                    

Response body errors

application/hal+xml

No sample

application/hal+json

Sample:
{
  "errorCode": "19023",
  "errorDescription": "A human-readable description of the error occurred"
}