Validate consents

API operation to validate the consents.


Parameters

Name In Type Required Description
org_id path string true ‘none’
body body ConsentsValidateRequestBody true ‘none’

Request body - instance of ConsentsValidateRequestBody

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "msisdn": "+123456789",
  "application": "youtube",
  "scopes": [
    "SimSwap",
    "NumberVerification",
    "SIMCardChange"
  ],
  "purpose": "FraudPreventionAndDetection"
}
Name Type Required Description
msisdn string false A public identifier addressing a telephone subscription. In mobile networks it corresponds to the MSISDN (Mobile Station International Subscriber Directory Number). In order to be globally unique it has to be formatted in international format, according to E.164 standard, prefixed with ‘+’.
application string false application to validate the consent.
scopes [string] false capabilities to be consumed
purpose string false purpose for which the capability is to be consumed

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15

curl -X POST https://opengateway.masstack.com/v1/orgs/{org_id}/consents/validate \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'msisdn': '+123456789',
  'application': 'youtube',
  'scopes': [
    'SimSwap',
    'NumberVerification',
    'SIMCardChange'
  ],
  'purpose': 'FraudPreventionAndDetection'
}" 

Responses

Code Meaning Description Schema
200 OK OK ConsentsValidateResponse
400 Bad Request Problem with the client request ErrorInfo
401 Unauthorized Unauthorized ErrorInfo
403 Forbidden Client does not have sufficient permission. ErrorInfo
500 Internal Server Error Server error ErrorInfo
503 Service Unavailable Service unavailable. Typically the server is down. ErrorInfo
504 Gateway Time-out Request time exceeded. If it happens repeatedly, consider reducing the request complexity ErrorInfo

Endpoints

Validate consents