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
11
{
  "msisdn": "+123456789",
  "application": "alphabet-xxxxx",
  "client": "youtube",
  "scopes": [
    "SimSwap",
    "NumberVerification",
    "SIMCardChange"
  ],
  "purpose": "FraudPreventionAndDetection"
}
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 ‘+’.
application string true Aggregator and Application Owner combination under which the application making the request is located.
client string true Application that makes the request to consume the capacity.
scopes [string] true capabilities to be consumed
purpose string true 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
16

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': 'alphabet-xxxxx',
  'client': 'youtube',
  'scopes': [
    'SimSwap',
    'NumberVerification',
    'SIMCardChange'
  ],
  'purpose': 'FraudPreventionAndDetection'
}" 

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

Parameters

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

Request body - instance of ConsentsCreateRequest

1
2
3
4
5
6
{
  "application": "alphabet-xxxxx",
  "client": "youtube",
  "scope": "SimSwap",
  "purpose": "FraudPreventionAndDetection"
}
Name Type Required Description
application string true Aggregator and Application Owner combination under which the application making the request is located.
client string true Application that makes the request to consume the capacity.
scope string true capabilities to be consumed
purpose string true purpose for which the capability is to be consumed

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11

curl -X POST https://opengateway.masstack.com/v1/orgs/{org_id}/consents/create \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'application': 'alphabet-xxxxx',
  'client': 'youtube',
  'scope': 'SimSwap',
  'purpose': 'FraudPreventionAndDetection'
}" 

Responses

Code Meaning Description Schema
201 Created CREATED None
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

Endpoints

Consents

    Number Verification

      Sim Swap

        Applications