Update plan
Changed onUpdate a plan by id.
Request
- Base URL: https://global.api.konghq.com
- URL: https://global.api.konghq.com/v3/openmeter/plans/{planId}
- Auth: one of:
- HTTP bearer
- HTTP bearer
- HTTP bearer
- HTTP bearer
Path parameters
ULID (Universally Unique Lexicographically Sortable Identifier).
Request body
Example request
{
"labels": {
"env": "test"
},
"phases": [
{
"labels": {
"env": "test"
},
"key": "resource_key",
"duration": "P1Y",
"rate_cards": [
{
"labels": {
"env": "test"
},
"key": "resource_key",
"feature": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"currency": "USD",
"billing_cadence": "P1Y",
"tax_config": {
"code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"entitlement": {
"usage_period": "P1Y"
}
}
]
}
]
}Response
Plan upsert response.
Example response
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"labels": {
"env": "test"
},
"created_at": "2023-01-01T01:01:01.001Z",
"updated_at": "2023-01-01T01:01:01.001Z",
"deleted_at": "2023-01-01T01:01:01.001Z",
"key": "resource_key",
"currency": "USD",
"billing_cadence": "P1Y",
"effective_from": "2023-01-01T01:01:01.001Z",
"effective_to": "2023-01-01T01:01:01.001Z",
"phases": [
{
"labels": {
"env": "test"
},
"key": "resource_key",
"duration": "P1Y",
"rate_cards": [
{
"labels": {
"env": "test"
},
"key": "resource_key",
"feature": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"currency": "USD",
"billing_cadence": "P1Y",
"tax_config": {
"code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"entitlement": {
"usage_period": "P1Y"
}
}
]
}
],
"validation_errors": [
{
"field": "addons/pro/ratecards/token/featureKey"
}
]
}Changes
- breaking
added to the
/response propertyoneOflist for the response status - warning
added the new
key_invalidenum value to the//////response property for the response status - warning
added the new
uniqueenum value to the//////response property for the response status
- breaking
- breaking
the response property
/////became optional for the status - warning
added the new
400.00enum value to theresponse property for the response status - warning
added the new
403.00enum value to theresponse property for the response status - warning
added the new
404.00enum value to theresponse property for the response status - warning
added the new
410.00enum value to theresponse property for the response status - info
added the new optional request property
- info
the request property
/////became optional - info
the response property
became required for the status - info
the
response's property default valuecredit_then_invoicewas removed for the status
- breaking