POST
/
v2
/
accounts
/
{account_id}
/
edit_schedules
curl --request POST \
  --url https://api.togai.com/v2/accounts/{account_id}/edit_schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "edits": [
    {
      "mode": "ASSOCIATE",
      "effectiveFrom": "2023-12-25",
      "effectiveUntil": "2023-12-25",
      "associationConfig": {
        "pricePlanId": "<string>",
        "scheduleId": "<string>",
        "pricingCycleConfigOverride": {
          "interval": "WEEKLY",
          "startOffset": {
            "dayOffset": "<string>",
            "monthOffset": "<string>"
          },
          "gracePeriod": 3,
          "anniversaryCycle": true
        },
        "retainStartOffsets": true
      },
      "mergeSchedules": true
    }
  ]
}'
{
  "accountId": "G234DZZKBKACATFFGVGEMERFI",
  "accountName": "ACME Enterprise - Account2",
  "pricingSchedules": [
    {
      "id": "sch.4325kbjedsc.34dww",
      "pricePlanId": "pp.1zYnCiM9Bpg.lv25y",
      "pricePlanName": "ENTERPRISE_PLAN",
      "startDate": "2022-12-02T00:00:00Z",
      "endDate": "9999-01-01T00:00:00Z"
    }
  ]
}

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

Query Parameters

discard
boolean

Body

application/json
Payload to edit schedules of an account

Request to dis/associate one or more schedules to an account

edits
object[]
required

Response

200
application/json
Response for dis/associate price plan request
accountId
string
required

Identifier of the account

Maximum length: 50
accountName
string
required

Name of the Account

pricingSchedules
object[]
required