Consents

API operation of consents.


Parameters

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

Request body - instance of ConsentsValidateRequest

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
{
  "msisdn": "+123456789",
  "client": "youtube",
  "purpose": "dpv:Advertising",
  "scopes": [
    "sim-swap",
    "number-verification:verify",
    "kyc-match:match"
  ]
}
Name Type Required Description
msisdn string true 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 ‘+’.
client string true Application that makes the request to consume the capacity.
purpose string true Purpose for which the capability is to be consumed. Typically this will start with ‘dpv:’ followed by a value from the Data Privacy Vocabulary (DPV) ontology.
scopes [string] true Capabilities 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',
  'client': 'youtube',
  'purpose': 'dpv:Advertising',
  'scopes': [
    'sim-swap',
    'number-verification:verify',
    'kyc-match:match'
  ]
}" 

Responses

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

200 - JsonObject

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
{
  "purpose": "dpv:FraudPreventionAndDetection",
  "consents": [
    {
      "id": "SimSwap_FraudPreventionAndDetection_Agregador1App1",
      "scope": "sim-swap",
      "status": "ACCEPTED"
    },
    {
      "id": "NumberVerification_FraudPreventionAndDetection_Agregador2App2",
      "scope": "number-verification:verify",
      "status": "PENDING"
    }
  ]
}
None

Endpoints

Consents

    Number Verification

      Sim Swap

        Applications