Device Roaming Status
Query the roaming status of a mobile device
This playground version provides responses for:
- predefined phone numbers associated with the unassigned country code +990 (e.g +99012345678)
- user-defined phone numbers added using the Network APIs Playground - Admin
Introduction
The CAMARA Device Roaming Status API provides a standardized mechanism for getting mobile equipment Roaming status.
API Authentication
HTTPS requests to the REST API are protected with 2-Legged OAuth. To learn more about how Orange Developer handles authentication, please refer to our documentation.
In short, you will use your Orange Developer Authorization header as authorization_header for the Basic authentication with Orange Developer.
You get the Authorization header credentials when you register your application on the Orange Developer Console.
curl -X POST \
-H "Authorization: {{ authorization_header }}" \
-d "grant_type=client_credentials" \
https://api.orange.com/openidconnect/playground/v1.0/token
In response, you will get an access_token.
{
"token_type": "Bearer",
"access_token": "66AeYJF8eJQ...2SjkFg9LB1LePC",
"expires_in": 3600
}
API Description
Summary of resources
This API has one resource retrieve. In the response, the roaming status is provided but also information of the last status time and country of presence in case of roaming situation.
Summary of methods and URL
| Use case of operation | URL method |
|---|---|
| I want to get roaming information of a device from a MSISDN number, an external identifier or an IP (+port) | POST "https://api.orange.com/camara/playground/api/device-roaming-status/v0.6/retrieve" |
Device Roaming Status - Retrieval
Summary of request body parameters
| Name | Description | Type | Mandatory |
|---|---|---|---|
| device | An object with four fields, each of them make possible to pass device identifier in different format: externalId , msisdn, ipv4Addr and ipv6Addr | See below information on device | No |
The following table provides details about the device:
| Name | Type | Description |
|---|---|---|
| externalId | string | External Identifier format of the GPSI. Not managed in our implementation |
| phoneNumber | string | Subscriber number in E.164 format (starting with country code). Must be prefixed with '+' |
| Ipv4Addr | string | IPv4 address may be specified in form <address/mask>. If address we expect an IPv4 number in dotted-quad form 1.2.3.4. Only this exact IP number will match the flow control rule. If address/mask - an IP number as above with a mask width of the form 1.2.3.4/24. Not managed in our implementation |
| Ipv6Addr | string | IPv6 address, following IETF 5952 format, may be specified in form <address/mask>. If address, the /128 subnet is optional for single address (2001:db8:85a3:8d3:1319:8a2e:370:7344 or 2001:db8:85a3:8d3:1319:8a2e:370:7344/128). If address/mask, an IP v6 number with a mask (2001:db8:85a3:8d3::0/64 or 2001:db8:85a3:8d3::/64 ). Not managed in our implementation |
You can also create test phone numbers using the Network APIs Playground - Admin API
| Phone Number |
|---|
| +99012345678 |
| +990111222333 |
{
"device": {
"phoneNumber": "+33699901032"
}
}
Request
curl -X POST "https://api.orange.com/camara/playground/api/device-roaming-status/v0.6/retrieve"
-H "Authorization: Bearer {your access token}"
-H "Cache-Control: no-cache"
-H 'accept: application/json'
-H 'Content-Type: application/json'
-d '{
"device": {
"phoneNumber": "+33699901032"
}
}
Response
200 OK
Content-Type: application/json
{
"lastStatusTime": "2024-07-22T12:23:21.112125501Z",
"roaming": false,
"countryName": []
}
Fields description
In the response following attributes are provided:
| Name | Type | Description | Mandatory |
|---|---|---|---|
| lastStatusTime | string(datetime) | Last time that the associated device roaming status was updated | No |
| roaming | boolean | Roaming status. True, if it is roaming | Yes |
| countryCode | string | The Mobile country code (MCC) as an geographic region identifier for the country and the dependent areas. | No |
| countryName | string | The ISO 3166 ALPHA-2 country-codes of mapped to mobile country code(MCC). If there is mapping of one MCC to multiple countries, then we have list of countries. If there is no mapping of MCC to any country, then an empty array shall be returned. | No |
Most frequent errors
If invalid input are provided in particular for the ueId a 400 error is triggered.
HTTP/1.1 400 Invalid input
Content-Type: application/json
{
"code": "INVALID_ARGUMENT",
"status": 400,
"message": "Invalid input"
}
if a non-managed msisdn is provided a 500 error is triggered.
HTTP/1.1 500 Internal Server Error
Content-Type: application/json
{
"status": 500,
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal Server Error, status code 500"
}
There are some cases where your client application will no longer gain access to API resources, and get an error back.
Please check the following points:
- Here, you attempt to use an expired or revoked access_token and you get an invalid token error. You will have to request a new access_token. As an example:
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"code": "UNAUTHENTICATED",
"status": 401,
"message": "Authorization failed: ..."
}
- Here, you removed your subscription to the API so that the capability to generate an access_token is not allowed anymore. As an example:
HTTP/1.1 403 Forbidden
Content-Type: application/json
{
"code": "PERMISSION_DENIED",
"status": 403,
"message": "Operation not allowed: ..."
}