curl --request GET \
--url https://api.togai.com/v2/accounts/{account_id}/schedules \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"accountId": "<string>",
"pricePlanId": "<string>",
"version": 123,
"deferredRevenue": true,
"pricePlanInfo": {
"name": "<string>",
"description": "<string>"
},
"accountScheduleInfo": {
"supportedCurrencies": [
"<string>"
],
"pricingCycleConfig": {
"interval": "WEEKLY",
"gracePeriod": 3,
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"anniversaryCycle": true
},
"pricingRules": [
{
"id": "<string>",
"name": "<string>",
"version": 2,
"order": 2,
"computation": "<string>",
"action": {
"type": "ADD",
"target": "<string>",
"id": "<string>",
"description": "<string>",
"metadata": {}
},
"invoiceTiming": "IN_ADVANCE",
"condition": "<string>"
}
]
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"allowOngoingCycleUpdates": true,
"isOverridden": true
}
],
"nextToken": "<string>",
"previousToken": "<string>"
}List pricing schedules of an account
curl --request GET \
--url https://api.togai.com/v2/accounts/{account_id}/schedules \
--header 'Authorization: Bearer <token>'{
"data": [
{
"id": "<string>",
"accountId": "<string>",
"pricePlanId": "<string>",
"version": 123,
"deferredRevenue": true,
"pricePlanInfo": {
"name": "<string>",
"description": "<string>"
},
"accountScheduleInfo": {
"supportedCurrencies": [
"<string>"
],
"pricingCycleConfig": {
"interval": "WEEKLY",
"gracePeriod": 3,
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"anniversaryCycle": true
},
"pricingRules": [
{
"id": "<string>",
"name": "<string>",
"version": 2,
"order": 2,
"computation": "<string>",
"action": {
"type": "ADD",
"target": "<string>",
"id": "<string>",
"description": "<string>",
"metadata": {}
},
"invoiceTiming": "IN_ADVANCE",
"condition": "<string>"
}
]
},
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"allowOngoingCycleUpdates": true,
"isOverridden": true
}
],
"nextToken": "<string>",
"previousToken": "<string>"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
account_id corresponding to an account
50"ACC00001"
Possible values:
"eyJsYXN0SXRlbUlkIjogInN0cmluZyIsICJwYWdlU2l6ZSI6IDEwMCwgInNvcnRPcmRlciI6ICJhc2MifQ=="
10
Paginated response for pricing schedules
Show child attributes
Show child attributes
Represents configurations related to pricing cycle
Show child attributes
Interval field allow you to define the billing interval you would like to set
WEEKLY, MONTHLY, QUARTERLY, HALF_YEARLY, ANNUALLY Togai allows you to ingest past dated events that will be processed by a pricing cycle till the end grace period. For example: Pricing cycle is Monthly from 1st to 30th and gracePeriod is 5 days which next month 1 to 5th date, you can ingest past dated events during this grace period.
3
Represents the start of pricing cycle in terms of
Show child attributes
If interval is WEEKLY, min: "1" and max: "7" as strings. Spl. string allowed: LAST Otherwise, min: "1" and max: "31" as strings. Spl. string allowed: LAST
min: "1" and max: "12". Spl. string allowed: FIRST / LAST. For QUARTERLY only 1 - 3 is allowed and for HALF_YEARLY 1 - 6. This being an optional field, shouldn't be passed for MONTHLY.
Togai calculates the startOffsets based on the date of association instead of requiring from the user and these offsets will be applied as an override if this flag is enabled. Examples: WEEKLY -
Show child attributes
x >= 1x >= 1JSON logic to be computed
JSON logic to be computed
Show child attributes
ADD, UPDATE If IN_ADVANCE, the rule will be applied on rate cards with invoice timing IN_ADVANCE . If IN_ARREARS, the rule will be applied on rate cards with invoice timing IN_ARREARS .
IN_ADVANCE, IN_ARREARS JSON logic condition deciding whether to compute this pricing rule or not
Indicates whether the schedule is overridden. Note: A null value for this field does not imply that the schedule is not overridden.