Bonuses

Access to bonuses (Free Unit Packages)


Parameters

Name In Type Required Description
orgId path string true organization name
subscriptionId path integer(int64) true subscription identifier
query query Query false Filter array can be used to show ‘active’ (without scheduled), ‘actual’ or ‘inactive’ bonuses.

Request example

1
2
3
4
5

curl -X GET https://customers.sta.masstack.com/v2/orgs/telco/subscriptions/214748364/bonuses?query={"filter":["string"],"include":["string"]} \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

Code Meaning Description Schema
200 OK successful operation SubscriptionBonus
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 SubscriptionBonus

Custom schema example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{
  "id": 214748364,
  "items": [
    {
      "id": 214748364,
      "value": "INTERNET 3GB TPILI",
      "start_date": "2017-09-15T22:00:00Z",
      "end_date": "2017-09-15T22:00:00Z"
    }
  ]
}
Name Type Required Description
id integer(int64) false identification subscription
items [Bonus] false none

Parameters

Name In Type Required Description
orgId path string true organization name
subscriptionId path integer(int64) true subscription identifier
body body SubscriptionBonusesRequest true Add bonus to a subscriptionId (must include bonusId to add)

Request body - instance of SubscriptionBonusesRequest

1
2
3
4
{
  "bonusId": 214748364,
  "scheduled_date": "2019-08-24"
}
Name Type Required Description
bonusId integer(int64) true bonus ID to add
scheduled_date string(date) false Desired date to execute operation

Request example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10

curl -X PUT https://customers.sta.masstack.com/v2/orgs/telco/subscriptions/214748364/bonuses \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY" \
 --data-raw "{
  'bonusId': 214748364,
  'scheduled_date': '2019-08-24'
}" 

Responses

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

400 - instance of ErrorMessage

Custom schema example

1
2
3
4
5
6
{
  "code": 0,
  "status": "string",
  "message": "string",
  "detailMsg": "string"
}
Name Type Required Description
code integer(int32) false Custom error code
status string false Status
message string false Status message
detailMsg string false Detailed description of the error

Parameters

Name In Type Required Description
orgId path string true organization name
subscriptionId path integer(int64) true subscription identifier
bonusId path integer(int64) true bonus identifier
scheduled_date query string(date) false Desired date to execute operation

Request example

1
2
3
4
5

curl -X DELETE https://customers.sta.masstack.com/v2/orgs/telco/subscriptions/214748364/bonuses/214748364?scheduled_date='2020-01-01' \
  -H "Accept: application/json" \
  -H "x-auth-roles: API_KEY"

Responses

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

400 - instance of ErrorMessage

Custom schema example

1
2
3
4
5
6
{
  "code": 0,
  "status": "string",
  "message": "string",
  "detailMsg": "string"
}
Name Type Required Description
code integer(int32) false Custom error code
status string false Status
message string false Status message
detailMsg string false Detailed description of the error

Endpoints

Signups

    Users

      Accounts

        Invoices

          Terms

            Payment info

              Account migrations

                Subscriptions

                  Products

                    Services

                      Bonuses

                        Promotions

                          Barrings

                            Consumption

                              Workorders

                                Penalties