Authentication
Getting An Access Token
This API uses basic Auth. You need an access token in order to use this API.
For example:
Authorization: Bearer alEw85xBVY83owVraNwNxzsfmpXu
The token is valid for 59 minutes and 59 seconds. It can be used for multiple requests.
The bearer tokens can only be used for a specific country. For example: If you generate a token for a UK mobile number, you cannot use it to query a German mobile number.
For more information on using Authorization Basic, see RFC 6749.
If the request is valid, the API returns an access_token, along with expiry and scope information.
This access token can then be used in one or more requests for as long as the token remains valid.
If the request is not valid, the APIs returns an error message.
This API retrieves usage data for a specific IMSI. Requires a valid Bearer Token for authorization.
- Make a request to Vodafone’s “/usage/{id}” endpoint.
- Vodafone's API validates the Path Parameter id (IMSI or encrypted IMSI) provided.
- Vodafone provides a response with user roaming usage data.
API Request example
curl -X 'GET' \
'https://api-sandbox.vf-dmp.engineering.vodafone.com/tmf-api/usageManagement/v4/usage/104047497196379' \
-H 'accept: application/json;charset=utf-8' \
-H 'X-Correlator: 9e765f76-8037-4e5f-ba5d-e0c87c09a320'API Response example
HTTP/1.1 200 OK
{
"@type": "Usage",
"@baseType": "Usage",
"id": "932c-8823e4866e",
"href": "/usage/932c-8823e4866e",
"usageDate": "2020-11-20T18:07:00Z",
"usageType": "Network Usage Event",
"status": "Accepted",
"usageSpecification": [
{
"id": "93c2-683ea281589",
"name": "Network Usage Event",
"usageSpecCharacteristic": [
{
"name": "begin_period",
"description": "Usage Begin Period",
"valueType": "string"
},
{
"name": "download_active_ms_total",
"description": "Download Active Miliseconds",
"valueType": "string"
},
{
"name": "downloaded_bytes",
"description": "Download bytes",
"valueType": "string"
},
{
"name": "download_max_throughput_kbps",
"description": "Download througput kbps",
"valueType": "string"
},
{
"name": "download_throughput_mbps",
"description": "Download throughput in Mbps",
"valueType": "string"
},
{
"name": "upload_active_ms_total",
"description": "Upload Active Miliseconds",
"valueType": "string"
},
{
"name": "uploaded_bytes",
"description": "Upload bytes",
"valueType": "string"
},
{
"name": "upload_max_throughput_kbps",
"description": "Upload throughput kbps",
"valueType": "string"
},
{
"name": "upload_throughput_mbps",
"description": "Upload throughput in Mbps",
"valueType": "string"
},
{
"name": "hcountry",
"description": "Home Country",
"valueType": "string"
},
{
"name": "hmcc",
"description": "Home Mobile Country Code",
"valueType": "string"
},
{
"name": "hmnc",
"description": "Home Mobile Network Code",
"valueType": "string"
},
{
"name": "hnet",
"description": "Home Network",
"valueType": "string"
},
{
"name": "msidsntac",
"description": "MSISDN TAC",
"valueType": "string"
},
{
"name": "vcountry",
"description": "Visited Country",
"valueType": "string"
},
{
"name": "vmcc",
"description": "Visited Mobile Country Code",
"valueType": "string"
},
{
"name": "vmnc",
"description": "Visited Mobile Network Code",
"valueType": "string"
},
{
"name": "vplmn_tag",
"description": "Visited Public Land Mobile Network",
"valueType": "string"
},
{
"name": "vtadig",
"description": "Visted TADIG",
"valueType": "string"
},
{
"name": "imeitac",
"description": "IMEI TAC",
"valueType": "integer"
},
{
"name": "ratname",
"description": "Radio Access Technology",
"valueType": "string"
},
{
"name": "imsitac",
"description": "IMSI TAC",
"valueType": "integer"
},
{
"name": "data_used",
"description": "Data used in current session if the consumer has an active session on",
"valueType": "integer"
}
]
}
],
"usageCharacteristic": [
{
"name": "apnname",
"value": "web.vodafone.de.mnc002.mcc262.gprs"
},
{
"name": "celltype",
"value": "4G"
},
{
"name": "handset_manufacturer",
"value": "Apple"
},
{
"name": "handset_model",
"value": "Apple iphone 15(A3090)"
},
{
"name": "handset_os",
"value": "iOS"
},
{
"name": "begin_period",
"value": "2025-09-10T14:12:30Z"
},
{
"name": "download_active_ms_total",
"value": "2659"
},
{
"name": "downloaded_bytes",
"value": "19301"
},
{
"name": "download_max_throughput_kbps",
"value": "12000"
},
{
"name": "download_throughput_mbps",
"value": "12"
},
{
"name": "upload_active_ms_total",
"value": "5510"
},
{
"name": "uploaded_bytes",
"value": "7792"
},
{
"name": "upload_max_throughput_kbps",
"value": "2800"
},
{
"name": "upload_throughput_mbps",
"value": "2.8"
},
{
"name": "hcountry",
"value": "Germany"
},
{
"name": "hmcc",
"value": "262"
},
{
"name": "hmnc",
"value": "002"
},
{
"name": "hnet",
"value": "Vodafone GmbH"
},
{
"name": "msidsntac",
"value": "491755"
},
{
"name": "vcountry",
"value": "Italy"
},
{
"name": "vmcc",
"value": "222"
},
{
"name": "vmnc",
"value": "010"
},
{
"name": "vplmn_tag",
"value": "222/010 Italy Vodafone Italia S.p.A"
},
{
"name": "vtadig",
"value": "ITAOM"
},
{
"name": "ratname",
"value": "EUTRAN"
},
{
"name": "imeitac",
"value": 35106958
},
{
"name": "imsitac",
"value": 27291271282
},
{
"name": "data_used",
"value": 107126
}
]
}API Error Codes and Responses
| HTTP Code | Error Code | Description |
| 200 | - | Success. Returns usage data. |
| 204 | - | No Content. No usage data available for the IMSI. |
| 302 | - | Found. Redirect to another resource. |
| 400 | missingParameter | Required parameter (e.g., X-Customer-ID) is missing. |
| 400 | invalidValue | Parameter type mismatch (e.g., IMSI must be string). |
| 401 | missingToken | Authentication token is missing or invalid. |
| 403 | accessForbidden | IMSI not in user’s allowed range. |
| 404 | notFound | Resource with specified ID does not exist. |
| 422 | invalidValue | IMSI format is invalid. |
| 429 | tooManyRequests | API rate limit exceeded. |
| 500 | internalError | Internal server error occurred. |