Consents
API operation of consents.
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'
}"
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"
}
]
}
Parameters
Name
In
Type
Required
Description
org_id
path
string
true
‘none’
body
body
ConsentsCreateRequest
true
‘none’
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'
}"