(DEPRECATED) Update a price plan
curl --request PATCH \
--url https://api.togai.com/price_plans/{price_plan_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "updated description",
"pricePlanDetails": {
"pricingCycleConfig": {
"interval": "MONTHLY",
"startOffset": {
"dayOffset": "6",
"monthOffset": "NIL"
},
"gracePeriod": 3,
"anniversaryCycle": true
}
},
"migrationMode": "IMMEDIATE_IGNORE_OVERRIDE"
}
'{
"id": "pp.20sieTc1u2i.fY8AT",
"name": "grantCheck",
"type": "BILLING",
"status": "ACTIVE",
"pricingSchedule": [
{
"id": "sch.20sieTcdnQ0.ZmseL",
"startDate": "1970-01-01T00:00:00Z",
"endDate": "9999-01-01T00:00:00Z",
"version": 1,
"isOverriden": false,
"pricePlanDetails": {
"supportedCurrencies": [
"USD"
],
"activeCurrencies": [
"USD"
],
"pricingCycleConfig": {
"interval": "MONTHLY",
"startOffset": {
"dayOffset": "1",
"monthOffset": "NIL"
},
"gracePeriod": 1,
"anniversaryCycle": false
},
"usageRateCards": [
{
"displayName": "rr1",
"usageMeterId": "um.20Ms65CtgMy.nwFP0",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 10,
"slabRateConfig": {}
}
]
}
],
"tag": "1"
}
],
"fixedFeeRateCards": [
{
"id": "addon.20sidL2HJ7o.vvzDT",
"rateValues": [
{
"currency": "USD",
"rate": 50
}
],
"enableProration": false,
"displayName": "normal",
"tag": "1",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING"
},
{
"id": "addon.20sidQxYRjs.4oBSU",
"rateValues": [
{
"currency": "USD",
"rate": 10
}
],
"enableProration": false,
"displayName": "anotherNormal",
"tag": "2",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING",
"recurrenceConfig": {
"interval": 2,
"offset": 1
}
},
{
"id": "addon.20sidzySWoa.Bzrcc",
"rateValues": [
{
"currency": "USD",
"rate": 40
}
],
"enableProration": false,
"displayName": "inadvance",
"tag": "1",
"invoiceTiming": "IN_ADVANCE",
"type": "RECURRING"
}
],
"licenseRateCards": [
{
"id": "addon.20darMuJ6C8.bdgRj",
"enableProration": false,
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 15,
"slabRateConfig": {}
}
]
}
],
"displayName": "license",
"tag": "2",
"config": {
"maxQuantity": 100
}
}
],
"billingEntitlementRateCards": [
{
"featureId": "feature.20jxa18BdUW.d4XQw",
"featureConfigs": [
{
"featureCreditLimit": 100,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1
}
]
}
],
"displayName": "feature1"
},
{
"featureId": "feature.20uE1xqEudk.MMVH8",
"featureConfigs": [
{
"featureCreditLimit": 200,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 2
}
]
}
],
"displayName": "feature2"
}
],
"minimumCommitment": {
"displayName": "Minimum Commitment",
"rateValues": [
{
"currency": "USD",
"rate": 0
}
]
},
"creditGrantRateCards": [
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"creditAmount": 100,
"slabDetails": [
{
"startAfter": 0,
"priceType": "FLAT",
"rate": 10
}
]
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
},
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
},
{
"currency": "INR",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
}
],
"type": "BILLING"
}
}
],
"description": "Starter plan"
}(Deprecated) Price Plans
(DEPRECATED) Update a price plan
Update an existing price plan Price Plans with status as DRAFT alone can be updated . Learn more about Price plans from our Guides
PATCH
/
price_plans
/
{price_plan_id}
(DEPRECATED) Update a price plan
curl --request PATCH \
--url https://api.togai.com/price_plans/{price_plan_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "updated description",
"pricePlanDetails": {
"pricingCycleConfig": {
"interval": "MONTHLY",
"startOffset": {
"dayOffset": "6",
"monthOffset": "NIL"
},
"gracePeriod": 3,
"anniversaryCycle": true
}
},
"migrationMode": "IMMEDIATE_IGNORE_OVERRIDE"
}
'{
"id": "pp.20sieTc1u2i.fY8AT",
"name": "grantCheck",
"type": "BILLING",
"status": "ACTIVE",
"pricingSchedule": [
{
"id": "sch.20sieTcdnQ0.ZmseL",
"startDate": "1970-01-01T00:00:00Z",
"endDate": "9999-01-01T00:00:00Z",
"version": 1,
"isOverriden": false,
"pricePlanDetails": {
"supportedCurrencies": [
"USD"
],
"activeCurrencies": [
"USD"
],
"pricingCycleConfig": {
"interval": "MONTHLY",
"startOffset": {
"dayOffset": "1",
"monthOffset": "NIL"
},
"gracePeriod": 1,
"anniversaryCycle": false
},
"usageRateCards": [
{
"displayName": "rr1",
"usageMeterId": "um.20Ms65CtgMy.nwFP0",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 10,
"slabRateConfig": {}
}
]
}
],
"tag": "1"
}
],
"fixedFeeRateCards": [
{
"id": "addon.20sidL2HJ7o.vvzDT",
"rateValues": [
{
"currency": "USD",
"rate": 50
}
],
"enableProration": false,
"displayName": "normal",
"tag": "1",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING"
},
{
"id": "addon.20sidQxYRjs.4oBSU",
"rateValues": [
{
"currency": "USD",
"rate": 10
}
],
"enableProration": false,
"displayName": "anotherNormal",
"tag": "2",
"invoiceTiming": "IN_ARREARS",
"type": "RECURRING",
"recurrenceConfig": {
"interval": 2,
"offset": 1
}
},
{
"id": "addon.20sidzySWoa.Bzrcc",
"rateValues": [
{
"currency": "USD",
"rate": 40
}
],
"enableProration": false,
"displayName": "inadvance",
"tag": "1",
"invoiceTiming": "IN_ADVANCE",
"type": "RECURRING"
}
],
"licenseRateCards": [
{
"id": "addon.20darMuJ6C8.bdgRj",
"enableProration": false,
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "FLAT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 15,
"slabRateConfig": {}
}
]
}
],
"displayName": "license",
"tag": "2",
"config": {
"maxQuantity": 100
}
}
],
"billingEntitlementRateCards": [
{
"featureId": "feature.20jxa18BdUW.d4XQw",
"featureConfigs": [
{
"featureCreditLimit": 100,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 1
}
]
}
],
"displayName": "feature1"
},
{
"featureId": "feature.20uE1xqEudk.MMVH8",
"featureConfigs": [
{
"featureCreditLimit": 200,
"effectiveUntil": "P20D"
}
],
"invoiceTiming": "IN_ADVANCE",
"ratePlan": {
"pricingModel": "TIERED",
"slabs": [
{
"order": 1,
"startAfter": 0,
"priceType": "PER_UNIT",
"slabConfig": {}
}
]
},
"rateValues": [
{
"currency": "USD",
"slabRates": [
{
"order": 1,
"rate": 2
}
]
}
],
"displayName": "feature2"
}
],
"minimumCommitment": {
"displayName": "Minimum Commitment",
"rateValues": [
{
"currency": "USD",
"rate": 0
}
]
},
"creditGrantRateCards": [
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"creditAmount": 100,
"slabDetails": [
{
"startAfter": 0,
"priceType": "FLAT",
"rate": 10
}
]
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
},
{
"id": "addon.20ufMNoJoAC.TUzRi",
"type": "RECURRING",
"displayName": "Credit2",
"rateDetails": {
"pricingModel": "TIERED",
"currencySlabRateDetails": [
{
"currency": "USD",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
},
{
"currency": "INR",
"slabDetails": [
{
"rate": 11,
"priceType": "FLAT",
"startAfter": 0,
"slabConfig": {},
"slabRateConfig": {}
}
],
"creditAmount": 11
}
]
},
"grantDetails": {
"priority": 1,
"expiryType": "PRICING_CYCLE",
"applicableEntityIds": []
},
"invoiceTiming": "IN_ARREARS",
"recurrenceConfig": {
"offset": 0,
"interval": 1
}
}
],
"type": "BILLING"
}
}
],
"description": "Starter plan"
}Documentation Index
Fetch the complete documentation index at: https://docs.togai.com/llms.txt
Use this file to discover all available pages before exploring further.
Deprecated: This API is deprecated and will be removed in a future release. Please use the Update a price plan V2 API instead for updated functionality.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Maximum string length:
50Example:
"pp.1zYnCiM9Bpg.lv25y"
Body
application/json
Payload to update price plan
Request to update a price plan
Available options:
IMMEDIATE, IMMEDIATE_IGNORE_OVERRIDE, NEXT_CYCLE, NEXT_CYCLE_IGNORE_OVERRIDE, NONE, START_OF_CURRENT_CYCLE Available options:
LATEST_VERSION, ALL_VERSION Description of price plan
Maximum string length:
255Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Response for Create and Get price plan requests
Price plan entity
Price plan id
Name of the price plan
Maximum string length:
50Type of price plan
Available options:
BILLING, PURCHASE Status of Price plan
Available options:
DRAFT, ACTIVE, ARCHIVED Show child attributes
Show child attributes
Description of price plan
Maximum string length:
255โI
