curl --request POST \
--url https://api.togai.com/accounts/{account_id}/price_plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "ASSOCIATE",
"pricePlanId": "pp.1zYnCiM9Bpg.lv25y",
"effectiveFrom": "2022-07-04",
"effectiveUntil": "2022-10-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) Plan Associations
(DEPRECATED) Dissociate or associate a price plan with an account
This API let’s you to detach or attach a price plan with an existing account
POST
/
accounts
/
{account_id}
/
price_plans
curl --request POST \
--url https://api.togai.com/accounts/{account_id}/price_plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"mode": "ASSOCIATE",
"pricePlanId": "pp.1zYnCiM9Bpg.lv25y",
"effectiveFrom": "2022-07-04",
"effectiveUntil": "2022-10-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
Path Parameters
Body
application/json
Payload to associate or dissociate a price plan to an account with actions
Request to associate or disassociate a price plan to an account with actions
If this flag is true, current pricing cycle of the account on the date of association will continue rather
than the configurations of the newly associated price plan. Pricing cycle overrides specified using
pricePlanDetailsOverride will take precedence over the pricing cycle configurations of
the new price plan that the account needs to migrate to. PricingCycleInterval of the existing plan and
the new plan must be same for this to work. We'll return a 400 BadRequest otherwise.
Examples:
- Ongoing plan (1st Oct to 30th Oct) - {dayOffset: 1, monthOffset: NIL} New association (15th Oct to 15th Nov) of different price plan with retainStartOffsets option true will use the same pricing cycle configuration {dayOffset: 1, monthOffset: NIL} rather than using the pricing cycle configuration of the new price plan that the account needs to migrate to.
- Ongoing plan (1st Oct to 30th Oct) - {dayOffset: 1, monthOffset: NIL}
New association (1st Nov to 30th Nov) of different price plan with retainStartOffsets option true will
throw a
400 BadRequestas no existing price plan configuration found on date of association
