Customers API

Access to products


Parameters

NameDescription

orgId*required

string

(path)

organization name

subscriptionId*required

integer(int64)

(path)

subscription identifier

query

Query

(query)

Use ‘include’ to get compatibilities -> Get compatible tariffs historical_changes -> Get history of tariff changes

Request example

content_copy
1
2
3
4
5

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

Responses

Code Description Schema
200 successful operation SubscriptionProduct
400 Invalid request body ErrorMessage
404 Resource not found ErrorMessage
405 Method not allowed None

200 - instance of SubscriptionProduct

Custom schema example

content_copy
 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
  "id": 214748364,
  "product": {
    "id": 214748364,
    "value": "TARIFA MAS 10GB CONV",
    "historic_date": "2020-05-05T12:29:22Z",
    "compatibilities": [
      {
        "id": 214748364,
        "value": "TARIFA MAS 10GB CONV",
        "historic_date": "2020-05-05T12:29:22Z",
        "compatibilities": [],
        "scheduled": {
          "request_date": "2020-05-05T12:29:22Z",
          "process_date": "2020-05-06T12:29:22Z",
          "scheduled_date": "2020-05-06T12:29:22Z",
          "destination_product": {
            "id": 214748364,
            "value": "TARIFA MAS 10GB CONV",
            "historic_date": "2020-05-05T12:29:22Z",
            "compatibilities": [],
            "scheduled": {}
          }
        }
      }
    ],
    "scheduled": {
      "request_date": "2020-05-05T12:29:22Z",
      "process_date": "2020-05-06T12:29:22Z",
      "scheduled_date": "2020-05-06T12:29:22Z",
      "destination_product": {
        "id": 214748364,
        "value": "TARIFA MAS 10GB CONV",
        "historic_date": "2020-05-05T12:29:22Z",
        "compatibilities": [
          {
            "id": 214748364,
            "value": "TARIFA MAS 10GB CONV",
            "historic_date": "2020-05-05T12:29:22Z",
            "compatibilities": [],
            "scheduled": {}
          }
        ],
        "scheduled": {}
      }
    }
  },
  "bundle": {
    "id": 214748364,
    "value": "FIBRA 600Mb INDIRECTA + TARIFA MÁS 10GB"
  },
  "historical_changes": [
    {
      "id": 214748364,
      "value": "TARIFA MAS 10GB CONV",
      "historic_date": "2020-05-05T12:29:22Z"
    }
  ]
}
Name Type Required Description
id integer(int64) true identification subscription
product Product true none
bundle Bundle false none
historical_changes [HistoricalProduct] false Tariff change history, ordered by datetime in descending order. The current tariff is always included at the top of the list.

Parameters

NameDescription

orgId*required

string

(path)

organization name

subscriptionId*required

integer(int64)

(path)

subscription identifier

body*required

ChangeSubscriptionProductRequest

(body)

Change subscription product given a productId

Request body - instance of ChangeSubscriptionProductRequest

content_copy
1
2
3
4
{
  "productId": 214748364,
  "scheduled_date": "2019-08-24"
}
Name Type Required Description
productId integer(int64) true target product identifier
scheduled_date string(date) false Desired date to execute operation

Request example

content_copy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10

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

Responses

Code Description Schema
201 successful operation None
202 check risk decision ChangeSubscriptionProductResponse
400 Invalid request body ErrorMessage
404 Resource not found ErrorMessage
405 Method not allowed None

202 - instance of ChangeSubscriptionProductResponse

Custom schema example

content_copy
1
2
3
{
  "risk_decision": "string"
}
Name Type Required Description
risk_decision string false none

Endpoints

Signups

Users

Accounts

Invoices

Terms

Payment info

Account migrations

Subscriptions

Products

Services

Bonuses

Promotions

Barrings

Workorders

Penalties