Consumption

Access to Consumption subscription info


Parameters

Name In Type Required Description
orgId path string true organization name
subscriptionId path integer(int64) true subscription identifier

Request example

1
2
3
4
5

curl -X GET https://customers.sta.masstack.com/v2/orgs/telco/subscriptions/214748364/balance \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK successful operation SubscriptionBalance
400 Bad Request Invalid request body ErrorMessage
404 Not Found Resource not found ErrorMessage
405 Method Not Allowed Method not allowed None

200 - instance of SubscriptionBalance

Custom schema example

1
2
3
4
5
6
{
  "msisdn": 12345,
  "balance": 10.74,
  "network": 2,
  "error": "string"
}
Name Type Required Description
msisdn integer(int32) false subscription msisdn
balance number(double) false value returned by mysim-northbound
network number(int32) false subscription network
error string false none

Parameters

Name In Type Required Description
orgId path string true organization name
subscriptionId path integer(int64) true subscription identifier
start_date query string(date) false start date query with format yyyy-mm-dd
end_date query string(date) false end date query with format yyyy-mm-dd

Request example

1
2
3
4
5

curl -X GET https://customers.sta.masstack.com/v2/orgs/telco/subscriptions/214748364/consumption/detail?start_date='1970-01-01'&end_date='1970-01-01' \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK successful operation SubscriptionDetailConsumption
400 Bad Request Invalid request body ErrorMessage
404 Not Found Resource not found ErrorMessage
405 Method Not Allowed Method not allowed None

200 - instance of SubscriptionDetailConsumption

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{
  "id": 214748364,
  "from": 12345,
  "period_date": {
    "start_date": "2020-05-01",
    "end_date": "2020-05-27"
  },
  "events": [
    {
      "to": 12345,
      "initial_date": "2020-05-17T10:59:04Z",
      "end_date": "2020-05-17T12:13:11Z",
      "type": "DATA",
      "sub_type": "DATOS NACIONAL",
      "destination_description": "DATOS GRATIS",
      "unit": "BYTES",
      "value": 229130240,
      "pricing": {
        "cost": 0,
        "in_rate": false,
        "bond": {
          "id": 214748364,
          "value": "INTERNET 8GB TPILI2"
        }
      }
    }
  ]
}
Name Type Required Description
id integer(int64) false identification subscription
from integer(int32) false msisdn or fixed number origin of the event
period_date PeriodDate false none
events [DetailConsumptionEvent] false none

Endpoints

Signups

    Users

      Accounts

        Invoices

          Terms

            Payment info

              Account migrations

                Subscriptions

                  Products

                    Services

                      Bonuses

                        Promotions

                          Barrings

                            Consumption

                              Workorders

                                Penalties