Create or update discount
Create or update a discount.
PATH:
/v1/clients/{clientId}/subscriptions/{subscriptionId}/discounts/{discountId}
PATH PARAMETERS:
clientId required
|
integer
Your assigned |
subscriptionId required
|
string
Id of the subscription to retrieve. |
discountId required
|
string
Id of the discount. |
HYPERMEDIA CONTROLS:
REQUEST BODY SCHEMA:
description |
string <= 200 characters
A description of the discount. |
||||
numberOfPeriods |
integer
The number of periods the discount will be applied. |
||||
object of periodAmount
The amount to discount each period. |
|||||
|
|||||
array of metadata
Optional. A list of key-value pairs. |
|||||
|
RESPONSES:
RESPONSE SCHEMA:
id |
string
Id of this discount. |
||||||
description |
string
Description of the discount. |
||||||
numberOfPeriods |
integer int32
Number of periods the discount will be applied. |
||||||
periodAmount object
Gross amount to discount each period. |
|||||||
|
|||||||
array of metadata
Optional. A list of key-value pairs. |
|||||||
Array () [
] |
|||||||
createdAt |
string date-time
Time of which this discount was created. |
||||||
array of _links
List of hypermedia links related to this resource. |
|||||||
Array () [
] |
RESPONSE SCHEMA:
id |
string
Id of this discount. |
||||||
description |
string
Description of the discount. |
||||||
numberOfPeriods |
integer int32
Number of periods the discount will be applied. |
||||||
periodAmount object
Gross amount to discount each period. |
|||||||
|
|||||||
array of metadata
Optional. A list of key-value pairs. |
|||||||
Array () [
] |
|||||||
createdAt |
string date-time
Time of which this discount was created. |
||||||
array of _links
List of hypermedia links related to this resource. |
|||||||
Array () [
] |
RESPONSE SCHEMA:
undefinedRESPONSE SCHEMA:
type |
string
The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type. |
category |
string Enum: BUSINESS_ERROR TECHNICAL_ERROR
Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:
|
title |
string
A short, human-readable summary of the problem. |
message |
string
A short, human-readable summary of the problem. Identical to |
RESPONSE SCHEMA:
type |
string
The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type. |
category |
string Enum: BUSINESS_ERROR TECHNICAL_ERROR
Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:
|
title |
string
A short, human-readable summary of the problem. |
message |
string
A short, human-readable summary of the problem. Identical to |
RESPONSE SCHEMA:
type |
string
The type of error that is carried within this response. The value of this type is an URI that can be dereferenced for a human-readable explanation of the error type. |
category |
string Enum: BUSINESS_ERROR TECHNICAL_ERROR
Category of the error, used primarily to determine whether the same request should be retried or not. Possible values:
|
title |
string
A short, human-readable summary of the problem. |
message |
string
A short, human-readable summary of the problem. Identical to |
Path
/v1/clients/{clientId}/subscriptions/{subscriptionId}/discounts/{discountId}
Request samples
- {
- "description": "string",
- "numberOfPeriods": 1,
- "periodAmount": X,
- "metadata": [ ... ]
- }
Response samples
200201400401403500- {
- "id": "string",
- "description": "string",
- "numberOfPeriods": 1,
- "periodAmount": { ... },
- "metadata": [ ... ],
- "createdAt": "string",
- "_links": [ ... ]
- {
- "id": "string",
- "description": "string",
- "numberOfPeriods": 1,
- "periodAmount": { ... },
- "metadata": [ ... ],
- "createdAt": "string",
- "_links": [ ... ]
- {
- "type": "string",
- "category": "string",
- "title": "string",
- "message": "string"
- {
- "type": "string",
- "category": "string",
- "title": "string",
- "message": "string"
- {
- "type": "string",
- "category": "string",
- "title": "string",
- "message": "string"