Introduction
APIs
- Authentication
- Customers
- Accounts
- GETList accounts of customer
- POSTCreate an account
- GETGet an account
- DELDelete an account
- PATCHUpdate an account
- Account Aliases
- (Deprecated) Plan Associations
- (Deprecated) Purchases
- (Deprecated) Proposals
- Schedules
- GETList rate cards
- POSTBulk rate card operations on a schedule
- POSTBulk edit schedules of an account
- GETList pricing schedules of an account
- GETGet list of errors of a acc schedule
- DELDiscard schedules of an account
- POSTFinalize schedules of an account
- GETList pricing rules of a account schedule
- PUTUpdate pricing rules of a account schedule
- GET
- GET
- Aliases
- Event Schemas
- Usage Meters
- AddOns
- Licenses
- Feature
- (Deprecated) Price Plans
- Price Plan V2
- Settings
- Price Experimentation
- Jobs
- Event Ingestion
- Entitlements
- Event Management
- Metrics
- Credits
- Invoices
- Payments
- Wallet
- InvoiceGroups
- Alerts
- Reports
Finalize schedules of an account
Finalize schedules of an account
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
account_id corresponding to an account
50
Body
Request to finalize account schedules
If this flag is true, the schedules will be merged with the existing schedules of the account if possible. If this flag is false, the existing schedules will be replaced with the new schedules. Default value is false
Pre actions to be performed before association or disassociation
Type of pre action to be performed
GRANT_LICENSE
Configuration required for performing pre action
GRANT_LICENSE
: grant one time licenses to an account before associationlicenseId
[Required]: Id of the license to be grantedupdateType
[Required]: Type of update to be performed on the license (RELATIVE or ABSOLUTE)quantity
[Required]: Quantity of license to be grantedeffectiveFrom
[Optional]: Effective date from which the license will be granted
Response
Represents configurations related to pricing cycle
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.
Represents the start of pricing cycle in terms of
- dayOffset - number of days from beginning of week / month and
- monthOffset - number of months from beginning of interval (quarter, half-year or year) Note: If a day with offset doesn't exist for a month, closest previous day is considered Examples: WEEKLY -
- {dayOffset: 1, monthOffset: NIL} - First day of every week (Monday)
- {dayOffset: 3, monthOffset: NIL} - 3rd day of every week (Wednesday)
- {dayOffset: LAST, monthOffset: NIL} - Last day of every week (Sunday) MONTHLY -
- {dayOffset: 1, monthOffset: NIL} - First day of every month
- {dayOffset: 12, monthOffset: NIL} - 12th of every month
- {dayOffset: 28, monthOffset: NIL} - 28th of every month. i.e, 28th of Jan, 28th of Feb, ...
- {dayOffset: 30, monthOffset: NIL} - 30th of every month. i.e, 28th of Jan, 28th of Feb, ...
- {dayOffset: LAST, monthOffset: NIL} - Last day of every month. i.e, 31st of Jan, 28th of Feb, ... QUARTERLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan, 15th Apr, 15th Jul and 15th Oct
- {dayOffset: 15, monthOffset: 2} - 15th Feb, 15th May, 15th Aug and 15th Nov
- {dayOffset: 15, monthOffset: LAST} - 15th Mar, 15th Jun, 15th Sep and 15th Dec
- {dayOffset: LAST, monthOffset: FIRST} - 31st Jan, 30th Apr, 30th Jul and 31th Oct HALF_YEARLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan and 15th Jul
- {dayOffset: 15, monthOffset: 4} - 15th Apr and 15th Oct
- {dayOffset: 15, monthOffset: LAST} - 15th Jun and 15th Dec ANNUALLY
- {dayOffset: 15, monthOffset: FIRST} - 15th Jan
- {dayOffset: 15, monthOffset: 1} - 15th Jan
- {dayOffset: LAST, monthOffset: 2} - 29th Feb on Leap year, 28th otherwise
- {dayOffset: 15, monthOffset: 8} - 15th Aug
- {dayOffset: 15, monthOffset: LAST} - 15th Dec
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 -
- 23/10/2023 (Monday) - {dayOffset: 1, monthOffset: NIL}
- 25/10/2023 (Wednesday) - {dayOffset: 3, monthOffset: NIL}
- 29/10/2023 (Sunday) - {dayOffset: 7, monthOffset: NIL} MONTHLY -
- 1st Oct - {dayOffset: 1, monthOffset: NIL}
- 12th Oct - {dayOffset: 12, monthOffset: NIL}
- 28th Oct - {dayOffset: 28, monthOffset: NIL}
- 30th Oct - {dayOffset: 30, monthOffset: NIL}
- 31th Oct - {dayOffset: LAST, monthOffset: NIL} QUARTERLY
- 15th Jan, 15th Apr, 15th Jul and 15th Oct - {dayOffset: 15, monthOffset: 1}
- 15th Feb, 15th May, 15th Aug and 15th Nov - {dayOffset: 15, monthOffset: 2}
- 15th Mar, 15th Jun, 15th Sep and 15th Dec - {dayOffset: 15, monthOffset: 3} HALF_YEARLY
- 15th Jan and 15th Jul - {dayOffset: 15, monthOffset: 1}
- 15th Apr and 15th Oct - {dayOffset: 15, monthOffset: 4}
- 15th Jun and 15th Dec - {dayOffset: 15, monthOffset: 6} ANNUALLY
- 15th Jan - {dayOffset: 15, monthOffset: 1}
- 29th Feb on Leap year - {dayOffset: LAST, monthOffset: 2}
- 28th Feb - {dayOffset: LAST, monthOffset: 2}
- 15th Aug - {dayOffset: 15, monthOffset: 8}
- 15th Dec - {dayOffset: 15, monthOffset: 12}
x > 1
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
x > 1
JSON logic condition deciding whether to compute this pricing rule or not
JSON logic to be computed
JSON logic to be computed
ADD
, UPDATE
Indicates whether the schedule is overridden. Note: A null value for this field does not imply that the schedule is not overridden.