Approve Consent Using POST

Approve Consent Using POST

Approve or reject the consent.

Access Policy

Role User Accounts Service Accounts (Client Credentials Applications)
Organization Admin ✔️
Organization Owner ✔️
Request
URI
POST
https://{api_host}/csp/gateway/am/api/orgs/{orgId}/consents/{consentId}
COPY
Path Parameters
string
orgId
Required

Unique identifier (GUID) of the organization.

string
consentId
Required

The unique identifier of the CONSENT.

Query Parameters
string
action
Required

Action taken by Customer on consent request. It can have only two values APPROVE|REJECT.

Possible values are : APPROVE, REJECT,

Request Body
ConsentApproval of type(s) application/json
Required
"ConsentApproval Object"
string As date-time As date-time
expiry
Optional

The timestamp the consent expires at (provided in ISO 8601 format, yyyy-MM-dd'T'HH:mm:ss.SSSXXX e.g. 2004-07-25T06:18:20.541Z).

Authentication
This operation uses the following authentication methods.
Responses
200

Valid consent approval contract.

Returns ConsentDto of type(s) application/json
{
    "target": {
        "orgOwnerEmail": "string",
        "orgId": "string"
    },
    "consentId": "string",
    "source": {
        "userId": "string"
    },
    "status": "string"
}
object
target
Required

Target organization metadata

string
consentId
Optional

The unique identifier of the CONSENT.

object
source
Optional

Source organization metadata

string
status
Optional

status

Possible values are : ACTIVE, REQUESTED, REJECTED,

401

The user is not authorized to use the API

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


403

The user is forbidden to use the API

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


404

Consent is not present.

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


409

The request could not be processed due to a conflict

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


429

The user has sent too many requests

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


500

An unexpected error has occurred while processing the request

Returns CspErrorResponse of type(s) application/json
"CspErrorResponse Object"
string
cspErrorCode
Optional

cspErrorCode

string
message
Optional

message

string
errorCode
Optional

errorCode

string
requestId
Optional

requestId

integer As int32 As int32
moduleCode
Optional

moduleCode

integer As int32 As int32
statusCode
Optional

statusCode


Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/csp/gateway/am/api/orgs/{orgId}/consents/{consentId}