Skip to main content
POST
/
accounts
/
{account_id}
/
edit_schedules
(DEPRECATED) Edit schedules of an account.
curl --request POST \
  --url https://api.togai.com/accounts/{account_id}/edit_schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "edits": [
    {
      "effectiveFrom": "2023-12-25",
      "effectiveUntil": "2023-12-25",
      "mode": "ASSOCIATE",
      "pricePlanId": "<string>",
      "pricePlanDetailsOverride": {
        "pricingCycleConfig": {
          "interval": "WEEKLY",
          "gracePeriod": 3,
          "startOffset": {
            "dayOffset": "<string>",
            "monthOffset": "<string>"
          },
          "anniversaryCycle": true
        },
        "supportedCurrencies": [
          "<string>"
        ],
        "usageRateCards": [
          {
            "usageMeterId": "um.1zYnCiM9Bpg.1zYn",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>"
          }
        ],
        "billingEntitlementRateCards": [
          {
            "featureId": "<string>",
            "featureConfigs": [
              {
                "effectiveUntil": "<string>",
                "featureCreditLimit": 1,
                "effectiveFrom": "<string>"
              }
            ],
            "invoiceTiming": "IN_ADVANCE",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "tag": "<string>",
            "displayName": "<string>",
            "name": "<string>",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ],
        "entitlementOverageRateCards": [
          {
            "featureId": "<string>",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "maxQuantity": 123,
            "billingConfig": {
              "interval": 3,
              "startOffset": 5
            }
          }
        ],
        "fixedFeeRateCards": [
          {
            "id": "<string>",
            "rateValues": [
              {
                "currency": "<string>",
                "rate": 123
              }
            ],
            "enableProration": false,
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "type": "ONE_TIME",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ],
        "licenseRateCards": [
          {
            "id": "<string>",
            "enableProration": false,
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "type": "LICENSE",
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "usageCycle": "WEEKLY",
            "config": {
              "maxQuantity": 100,
              "maxQuantityBreachAction": "DO_NOTHING"
            },
            "proratedRefundMode": "NONE"
          }
        ],
        "minimumCommitment": {
          "displayName": "<string>",
          "rateValues": [
            {
              "currency": "<string>",
              "rate": 123
            }
          ]
        },
        "creditGrantRateCards": [
          {
            "id": "<string>",
            "grantDetails": {
              "priority": 1,
              "expiryType": "PRICING_CYCLE",
              "expiryDuration": "<string>",
              "applicableEntityIds": [
                "<string>"
              ]
            },
            "rateDetails": {
              "pricingModel": "TIERED",
              "currencySlabRateDetails": [
                {
                  "currency": "<string>",
                  "creditAmount": 1,
                  "slabDetails": [
                    {
                      "startAfter": 123,
                      "priceType": "FLAT",
                      "rate": 123,
                      "slabConfig": {},
                      "slabRateConfig": {}
                    }
                  ],
                  "rateConfig": {}
                }
              ]
            },
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "type": "ONE_TIME",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ]
      },
      "pricingRulesOverride": [
        {
          "name": "<string>",
          "order": 123,
          "computation": "<string>",
          "action": {
            "type": "ADD",
            "target": "<string>",
            "id": "<string>",
            "description": "<string>",
            "metadata": {}
          },
          "invoiceTiming": "IN_ADVANCE",
          "condition": "<string>"
        }
      ],
      "retainStartOffsets": true
    }
  ]
}
'
{
  "accountId": "<string>",
  "accountName": "<string>",
  "pricingSchedules": [
    {
      "id": "<string>",
      "pricePlanId": "<string>",
      "pricePlanName": "<string>",
      "startDate": "2023-11-07T05:31:56Z",
      "endDate": "2023-11-07T05:31:56Z",
      "pricePlanDetailsOverride": {
        "pricingCycleConfig": {
          "interval": "WEEKLY",
          "gracePeriod": 3,
          "startOffset": {
            "dayOffset": "<string>",
            "monthOffset": "<string>"
          },
          "anniversaryCycle": true
        },
        "supportedCurrencies": [
          "<string>"
        ],
        "usageRateCards": [
          {
            "usageMeterId": "um.1zYnCiM9Bpg.1zYn",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>"
          }
        ],
        "billingEntitlementRateCards": [
          {
            "featureId": "<string>",
            "featureConfigs": [
              {
                "effectiveUntil": "<string>",
                "featureCreditLimit": 1,
                "effectiveFrom": "<string>"
              }
            ],
            "invoiceTiming": "IN_ADVANCE",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "tag": "<string>",
            "displayName": "<string>",
            "name": "<string>",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ],
        "entitlementOverageRateCards": [
          {
            "featureId": "<string>",
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "maxQuantity": 123,
            "billingConfig": {
              "interval": 3,
              "startOffset": 5
            }
          }
        ],
        "fixedFeeRateCards": [
          {
            "id": "<string>",
            "rateValues": [
              {
                "currency": "<string>",
                "rate": 123
              }
            ],
            "enableProration": false,
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "type": "ONE_TIME",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ],
        "licenseRateCards": [
          {
            "id": "<string>",
            "enableProration": false,
            "ratePlan": {
              "pricingModel": "TIERED",
              "slabs": [
                {
                  "order": 5,
                  "startAfter": 123,
                  "priceType": "FLAT",
                  "slabConfig": {}
                }
              ]
            },
            "rateValues": [
              {
                "currency": "<string>",
                "slabRates": [
                  {
                    "order": 123,
                    "rate": 123,
                    "slabRateConfig": {}
                  }
                ],
                "rateConfig": {}
              }
            ],
            "type": "LICENSE",
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "usageCycle": "WEEKLY",
            "config": {
              "maxQuantity": 100,
              "maxQuantityBreachAction": "DO_NOTHING"
            },
            "proratedRefundMode": "NONE"
          }
        ],
        "minimumCommitment": {
          "displayName": "<string>",
          "rateValues": [
            {
              "currency": "<string>",
              "rate": 123
            }
          ]
        },
        "creditGrantRateCards": [
          {
            "id": "<string>",
            "grantDetails": {
              "priority": 1,
              "expiryType": "PRICING_CYCLE",
              "expiryDuration": "<string>",
              "applicableEntityIds": [
                "<string>"
              ]
            },
            "rateDetails": {
              "pricingModel": "TIERED",
              "currencySlabRateDetails": [
                {
                  "currency": "<string>",
                  "creditAmount": 1,
                  "slabDetails": [
                    {
                      "startAfter": 123,
                      "priceType": "FLAT",
                      "rate": 123,
                      "slabConfig": {},
                      "slabRateConfig": {}
                    }
                  ],
                  "rateConfig": {}
                }
              ]
            },
            "displayName": "<string>",
            "name": "<string>",
            "tag": "<string>",
            "invoiceTiming": "IN_ADVANCE",
            "type": "ONE_TIME",
            "recurrenceConfig": {
              "interval": 3,
              "offset": 5
            }
          }
        ]
      },
      "pricingRulesOverride": [
        {
          "id": "<string>",
          "name": "<string>",
          "version": 2,
          "order": 2,
          "computation": "<string>",
          "action": {
            "type": "ADD",
            "target": "<string>",
            "id": "<string>",
            "description": "<string>",
            "metadata": {}
          },
          "invoiceTiming": "IN_ADVANCE",
          "condition": "<string>"
        }
      ]
    }
  ]
}
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 string 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
Required array length: 1 - 10 elements

Response

Response for edit pricing schedule request

accountId
string
required

Identifier of the account

Maximum string length: 50
accountName
string
required

Name of the Account

pricingSchedules
object[]
required