Subscriptions
Create subscription addon
Create a new subscription addon, either providing the key or the id of the addon.
post/api/v1/subscriptions/{subscriptionId}/addons
Path parameters
subscriptionIdstring required
Example:01G65Z755AFWAKHE12NY0CQ9FH
Request body
Example request
{
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"quantity": 1,
"timing": "2023-01-01T01:01:01.001Z",
"addon": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
}
}Response
The request has succeeded and a new resource has been created as a result.
Example response
{
"id": "01G65Z755AFWAKHE12NY0CQ9FH",
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"createdAt": "2024-01-01T01:01:01.001Z",
"updatedAt": "2024-01-01T01:01:01.001Z",
"deletedAt": "2024-01-01T01:01:01.001Z",
"activeFrom": "2023-01-01T01:01:01.001Z",
"activeTo": "2023-01-01T01:01:01.001Z",
"addon": {
"id": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"quantityAt": "2025-01-05T00:00:00Z",
"quantity": 1,
"timeline": [
{
"quantity": 1,
"activeFrom": "2025-01-01T00:00:00Z",
"activeTo": "2025-01-02T00:00:00Z"
},
{
"quantity": 0,
"activeFrom": "2025-01-02T00:00:00Z",
"activeTo": "2025-01-03T00:00:00Z"
},
{
"quantity": 1,
"activeFrom": "2025-01-03T00:00:00Z"
}
],
"subscriptionId": "01G65Z755AFWAKHE12NY0CQ9FH",
"rateCards": [
{
"rateCard": {
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
},
"entitlementTemplate": {
"metadata": {
"externalId": "019142cc-a016-796a-8113-1a942fecd26d"
}
},
"taxConfig": {
"stripe": {
"code": "txcd_10000000"
},
"taxCodeId": "01G65Z755AFWAKHE12NY0CQ9FH"
},
"discounts": {
"percentage": {
"percentage": 50
}
}
},
"affectedSubscriptionItemIds": [
"01G65Z755AFWAKHE12NY0CQ9FH"
]
}
]
}