Statistics¶
Get usage by label¶
You can get the account usage for a specific date range, subdivided by label and country. This can e.g. be used for billing your own customers (specified by label). Even if you do not use the label feature, this can still be used to get statistics about your SMS traffic. Everything will just have the label null
.
POST /api/usage/labels
¶
Request JSON Object:
- from (string) - The from date, in YYYY-MM-DD format. Required
- to (string) - The to date, in YYYY-MM-DD format. Required
- label (string) - Optional label you want to look for.
Response JSON Array of Objects:
- amount (float) - Amount of SMS messages
- cost (float) - Cost of the SMS messages
- country (string) - The country the SMS messages were sent to
- currency (string) - Either DKK or EUR
- label (string) - The label specified when the SMS messages were sent
- messageclass_id (string) - The class specified when the SMS messages were sent
Status Codes:
- 200 OK - Returns an array with an object containing usage info
- 401 Unauthorized - i.e. invalid API key or signature
- 403 Forbidden - i.e. unauthorized IP address
- 500 Internal Server Error - If the request cannot be processed due to an exception. The exception details is returned in the JSON body
Request example
1 2 3 4 5 6 7 8 9 |
|
Response example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|