Subscriptions Reports
1GLOBAL Connect supports reporting using the Subscriptions API so that our users can extract their own subscription reports using a single API. The endpoint supports the following filters in order to tailor the reports a variety of use-cases.
Available Filters​
Status | Description |
---|---|
iccid | filter for a specific iccid |
filter for a specific email | |
product-id | filter for subscriptions with a specific product id |
before | subscriptions before a certain date (in the yyyy-MM-dd’T’HH:mm:ssZ format) |
after | subscriptions after a certain date (in the yyyy-MM-dd’T’HH:mm:ssZ format) |
page_size | page size to be used |
page | page number |
Example Request​
curl -X GET \
https://services.truphone.com/connect-api/v2/subscriptions?before=2020-04-24T15:39:02.002Z&page_size=10&page=2 \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'X-Correlation-ID: unique-id-from-requester-123'
Example Response​
{
"data": [
{
"id": "__bPIjtY8e5xdjn36DwUCwslKkZABh1D2HzyaZdpdTg=",
"name": "5GB 30-Day Data Bundle",
"sim_id": "8944477100000000086",
"created_date": "2020-12-04T17:20:38Z",
"expiry_date": "2021-12-04T17:20:38Z",
"status": "ACTIVE",
"spend_balance": "0",
"initial_balance": "1073741824",
"current_balance": "1073741824",
"balance_units": "Bytes",
"_metadata": {
"links": {
"_self": "/v2/subscriptions/__bPIjtY8e5xdjn36DwUCwslKkZABh1D2HzyaZdpdTg="
}
}
}
],
"_metadata": {
"page": 1,
"page_size": 1,
"page_count": 1,
"links": {
"_prev": "/v2/subscriptions?page=1&page_size=10",
"_self": "/v2/subscriptions?page=2&page_size=10"
}
}
}