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
Schedules
Finalize schedules of an account
Finalize schedules of an account
POST
/
v2
/
accounts
/
{account_id}
/
finalize_schedules
curl --request POST \
--url https://api.togai.com/v2/accounts/{account_id}/finalize_schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"mergeSchedules": true,
"preActions": [
{
"type": "GRANT_LICENSE",
"config": {}
}
]
}'
{
"data": [
{
"id": "<string>",
"accountId": "<string>",
"pricePlanId": "<string>",
"version": 123,
"deferredRevenue": true,
"pricePlanInfo": {
"name": "<string>",
"description": "<string>"
},
"accountScheduleInfo": {
"supportedCurrencies": [
"<string>"
],
"pricingCycleConfig": {
"interval": "WEEKLY",
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"gracePeriod": 3,
"anniversaryCycle": true
},
"pricingRules": [
{
"id": "<string>",
"name": "<string>",
"version": 2,
"invoiceTiming": "IN_ADVANCE",
"order": 2,
"condition": "<string>",
"computation": "<string>",
"action": {
"type": "ADD",
"target": "<string>",
"id": "<string>",
"description": "<string>",
"metadata": {}
}
}
]
},
"isOverridden": true,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"allowOngoingCycleUpdates": true
}
],
"nextToken": "<string>",
"previousToken": "<string>"
}
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
account_id corresponding to an account
Maximum length:
50
Example:
"ACC00001"
Body
application/json
Payload to finalize account schedules
Request to finalize account schedules
Response
200 - application/json
Paginated response for pricing schedules
The response is of type object
.
curl --request POST \
--url https://api.togai.com/v2/accounts/{account_id}/finalize_schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"mergeSchedules": true,
"preActions": [
{
"type": "GRANT_LICENSE",
"config": {}
}
]
}'
{
"data": [
{
"id": "<string>",
"accountId": "<string>",
"pricePlanId": "<string>",
"version": 123,
"deferredRevenue": true,
"pricePlanInfo": {
"name": "<string>",
"description": "<string>"
},
"accountScheduleInfo": {
"supportedCurrencies": [
"<string>"
],
"pricingCycleConfig": {
"interval": "WEEKLY",
"startOffset": {
"dayOffset": "<string>",
"monthOffset": "<string>"
},
"gracePeriod": 3,
"anniversaryCycle": true
},
"pricingRules": [
{
"id": "<string>",
"name": "<string>",
"version": 2,
"invoiceTiming": "IN_ADVANCE",
"order": 2,
"condition": "<string>",
"computation": "<string>",
"action": {
"type": "ADD",
"target": "<string>",
"id": "<string>",
"description": "<string>",
"metadata": {}
}
}
]
},
"isOverridden": true,
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"allowOngoingCycleUpdates": true
}
],
"nextToken": "<string>",
"previousToken": "<string>"
}
Assistant
Responses are generated using AI and may contain mistakes.