Edit subscription
Edits a running subscription by applying an ordered batch of customizations (adding or removing items, adding, removing, or stretching phases, or unscheduling a pending edit). The changes may take effect immediately or at the next billing cycle. Subscriptions that have add-ons cannot be edited.
Path parameters
ULID (Universally Unique Lexicographically Sortable Identifier).
Request body
Example request
{
"customizations": [
{
"rate_card": {
"labels": {
"env": "test"
},
"key": "resource_key",
"feature": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"currency": "USD",
"billing_cadence": "P1Y",
"tax_config": {
"code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"entitlement": {
"usage_period": "P1Y"
}
}
}
],
"timing": "2023-01-01T01:01:01.001Z"
}Response
Subscription updated 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",
"active_from": "2023-01-01T01:01:01.001Z",
"active_to": "2023-01-01T01:01:01.001Z",
"customer_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"plan": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"key": "resource_key"
},
"invoice_currency": "USD",
"cost_basis_pins": [
{
"custom_currency_id": "01G65Z755AFWAKHE12NY0CQ9FH",
"invoice_currency": "USD",
"cost_basis_id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
],
"billing_cadence": "P1Y",
"billing_anchor": "2023-01-01T01:01:01.001Z",
"current_period": {
"from": "2023-01-01T01:01:01.001Z",
"to": "2023-01-01T01:01:01.001Z"
},
"phases": [
{
"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",
"active_from": "2023-01-01T01:01:01.001Z",
"active_to": "2023-01-01T01:01:01.001Z",
"items": [
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"active_from": "2023-01-01T01:01:01.001Z",
"active_to": "2023-01-01T01:01:01.001Z",
"rate_card": {
"labels": {
"env": "test"
},
"key": "resource_key",
"feature": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"currency": "USD",
"billing_cadence": "P1Y",
"tax_config": {
"code": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
},
"entitlement": {
"usage_period": "P1Y"
}
}
}
]
}
]
}Changes
Changed in 2 of the 83 revisions of this API.142
- ▲
the response property
//////became optional for the statusresponse-property-became-optional
- ●
added the new
400.00enum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
403.00enum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
404.00enum value to theresponse property for the response statusresponse-property-enum-value-added
- ●
added the new
409.00enum value to theresponse property for the response statusresponse-property-enum-value-added
- ○
the request property
////////became optionalrequest-property-became-optional
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
This revision also has 14 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○