POST
/
accounts
/
{account_id}
/
edit_schedules
curl --request POST \
  --url https://api.togai.com/accounts/{account_id}/edit_schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "edits": [
    {
      "mode": "ASSOCIATE",
      "pricePlanId": "pp.1zYnCiM9Bpg.lv25y",
      "effectiveFrom": "2022-07-04",
      "effectiveUntil": "2022-10-04"
    },
    {
      "mode": "DISASSOCIATE",
      "effectiveFrom": "2022-08-04",
      "effectiveUntil": "2022-09-04"
    }
  ]
}'
{
  "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"
    }
  ]
}

Deprecated: This API is deprecated and will be removed in a future release. Please use the Bulk edit schedules of an account instead for updated functionality.

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"

Query Parameters

dry_run
boolean
Example:

false

Body

application/json
Payload to dis/associate one or more price plans to an account

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

edits
object[]
required

Response

200
application/json
Response for edit pricing schedule request
accountId
string
required

Identifier of the account

Maximum length: 50
accountName
string
required

Name of the Account

pricingSchedules
object[]
required

Represents effectiveness period and config of a price plan. i.e, price plan bound by time.