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

Authorization
string
header
required

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

Path Parameters

account_id
string
required

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.