GET
/
v2
/
price_plans
/
{price_plan_id}
/
pricing_rules
curl --request GET \
  --url https://api.togai.com/v2/price_plans/{price_plan_id}/pricing_rules \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "um.1zYnCiM9Bpg.lv25y",
      "name": "Rule 1",
      "version": 1,
      "order": 1,
      "computation": "{\"+\": [{\"var\": \"revenue.urc.um.21lmjsfcXPs.d929R\"}, {\"var\": \"usage.urc.um.21lmjObpMV6.9XeFl\"}]}\n",
      "condition": "{\">\": [{\"+\": [{\"var\": \"revenue.urc.um.21lmjObpMV6.9XeFl\"}, {\"var\": \"usage.urc.um.21lmjObpMV6.9XeFl\"}]}, 100]}\n",
      "action": {
        "type": "UPDATE",
        "target": "revenue.ff.addon.21ERXMFJ83s.9EM5S"
      }
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

price_plan_id
string
required
Maximum length: 50
Example:

"pp.1zYnCiM9Bpg.lv25y"

Query Parameters

version
string

Optional version to get a specific version. Gets latest version if it is not provided. Possible values:

  1. LATEST - Get the latest version of the price plan, can be draft
  2. ACTIVE - Get the latest active version of the price plan
  3. NUMBER - Get the specific version of the price plans

Response

200
application/json
Response for create/list pricing rules request
data
object[]
required

Represents pricing rules of a price plan. i.e, price plan bound by time.