POST
/
revenue_calculator
curl --request POST \
  --url https://api.togai.com/revenue_calculator \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "currencyConfig": {
    "mode": "CUSTOM",
    "currency": "USD"
  },
  "pricePlanDetailsConfig": {
    "mode": "PRICE_PLAN",
    "pricePlanId": "pp.fdhkf.djf",
    "effectiveOn": "2020-01-01T00:00:00Z",
    "pricingCycleOrdinal": 1
  },
  "usageConfig": {
    "mode": "CUSTOM",
    "usageMap": {
      "um.1zcgWalbM2y.qaX5j": 100
    }
  },
  "licenseEntriesConfig": {
    "mode": "CUSTOM",
    "custom": [
      {
        "licenseId": "license.1zcgWalbM2y.qaX5j",
        "quantity": 10,
        "effectiveFrom": "2020-01-01T00:00:00Z"
      }
    ]
  },
  "entitlementOverageConfig": {
    "mode": "CUSTOM",
    "custom": [
      {
        "featureId": "feature.1122.ahoiud",
        "quantity": 5
      },
      {
        "featureId": "feature.3452.abcaf2",
        "quantity": 28
      }
    ]
  }
}'

Authorizations

Authorization
string
headerrequired

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

Body

application/json
currencyConfig
object
required

Configuration for getting the currency

pricePlanDetailsConfig
object
required

Configuration for getting the usage rate card

usageConfig
object
required

Configuration for getting the usage

licenseEntriesConfig
object
required

Configuration for getting the license entries

namedLicenseEntriesConfig
object

Configuration for getting the named license entries

prorationConfig
object

Configuration for getting the proration, if not provided no proration will be applied

entitlementOverageConfig
object

Configuration for getting the entitlement overages

Response

200 - application/json
currency
string
required
usageLookupRange
object

Start and end dates of usage lookup if usage mode is LOOKUP

pricePlanDetails
object
required
revenueInfo
object[]
required