Device Swap

API operation of device API.


Parameters

Name In Type Required Description
org_id path string true ‘none’
body body DeviceSwapCreateDeviceSwapDate true Create a device swap date request for a phone number.

Request body - instance of DeviceSwapCreateDeviceSwapDate

1
2
3
{
  "phoneNumber": "+34666111333"
}
Name Type Required Description
phoneNumber DeviceSwapPhoneNumber 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 ‘+’.

Request example

1
2
3
4
5
6
7
8

curl -X POST https://opengateway.masstack.com/v0/orgs/{org_id}/device-swap/retrieve-date \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'phoneNumber': '+34666111333'
}" 

Responses

Code Meaning Description Schema
200 OK Contains information about Device swap change DeviceSwapDeviceSwapInfo
400 Bad Request Bad Request DeviceSwapApiError
401 Unauthorized Unauthorized DeviceSwapApiError
403 Forbidden Forbidden DeviceSwapApiError
404 Not Found Not found DeviceSwapApiError
422 Unprocessable Entity Unprocessable Content DeviceSwapApiError
500 Internal Server Error Internal Server Error DeviceSwapApiError
503 Service Unavailable Service Unavailable DeviceSwapApiError
504 Gateway Time-out Gateway Timeout DeviceSwapApiError

Parameters

Name In Type Required Description
org_id path string true ‘none’
body body DeviceSwapCreateCheckDeviceSwap true Create a check device swap request for a phone number.

Request body - instance of DeviceSwapCreateCheckDeviceSwap

1
2
3
4
{
  "phoneNumber": "+34666111333",
  "maxAge": 240
}
Name Type Required Description
phoneNumber DeviceSwapPhoneNumber 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 ‘+’.
maxAge integer(int32) false Period in hours to be checked for device swap.

Request example

1
2
3
4
5
6
7
8
9

curl -X POST https://opengateway.masstack.com/v0/orgs/{org_id}/device-swap/check \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
 --data-raw "{
  'phoneNumber': '+34666111333',
  'maxAge': 240
}" 

Responses

Code Meaning Description Schema
200 OK Returns whether a device swap has been performed during a past period DeviceSwapCheckDeviceSwapInfo
400 Bad Request Bad Request DeviceSwapApiError
401 Unauthorized Unauthorized DeviceSwapApiError
403 Forbidden Forbidden DeviceSwapApiError
404 Not Found Not found DeviceSwapApiError
422 Unprocessable Entity Unprocessable Content DeviceSwapApiError
500 Internal Server Error Internal Server Error DeviceSwapApiError
503 Service Unavailable Service Unavailable DeviceSwapApiError
504 Gateway Time-out Gateway Timeout DeviceSwapApiError

Endpoints

Device Swap

    KycMatch