Create or update a discount
PUT /v1/clients/{clientId}/subscriptions/{subscriptionId}/discounts/{discountId}
application/json
AMOUNT
PERCENTAGE
{
"description": "discount.",
"type": "PERCENTAGE",
"value": 12.5,
"start": "2023-09-10",
"duration": {
"type": "REPEATING",
"count": 5
},
"metadata": [
{
"key": "order-id",
"value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
}
]
}
{
"id": "discount-id-1",
"description": "discount.",
"type": "PERCENTAGE",
"value": 12.5,
"start": "2023-09-10T13:04:40.020Z",
"duration": {
"type": "REPEATING",
"count": 5
},
"metadata": [
{
"key": "order-id",
"value": "a9ee9996-e941-4aa8-90b9-4b047c4afe87"
}
],
"createdAt": "2022-09-39T07:29:04.407Z",
"_links": [
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/subscriptions/subscription-id-1/discounts/discount-id-1",
"rel": "self",
"target": "API"
},
{
"method": "GET",
"href": "https://api.riverty.io/subscription/v1/clients/1234/subscriptions/subscription-id-1",
"rel": "subscription",
"target": "API"
}
]
}