PUT
/
discounts
/
{id}
curl --request PUT \
  --url https://eu.sequencehq.com/api/discounts/{id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "amount": 25,
  "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
  "discountCalculationType": "PERCENTAGE",
  "message": "Loyalty Discount",
  "priceIds": [
    "e007e884-5100-4183-8355-4771865cb4d7"
  ],
  "separateLineItem": false,
  "validFrom": "2023-01-01",
  "validTo": "2023-01-31"
}'
{
  "amount": 25,
  "billingScheduleId": "08a76ddb-230e-4700-a5e2-70f6edaf7d50",
  "createdAt": "2022-06-28T16:47:00Z",
  "discountCalculationType": "PERCENTAGE",
  "id": "d58bf2e3-7a5d-4900-8457-2521c6880f7d",
  "message": "Loyalty Discount",
  "priceIds": [
    "e007e884-5100-4183-8355-4771865cb4d7"
  ],
  "separateLineItem": false,
  "sequenceAccountId": "1986c663-9ee9-4811-bfbf-57d2ad666096",
  "updatedAt": "2022-06-28T16:47:00Z",
  "validFrom": "2023-01-01",
  "validTo": "2023-01-31"
}

Headers

Authorization
string
required

Your API credentials. Eg. Basic {credentials}.

Path Parameters

id
string
required

Discount ID

Body

application/json
amount
number
required

Amount to be reduced

billingScheduleId
string
required

Billing Schedule ID

discountCalculationType
enum<string>
required
Available options:
PERCENTAGE,
NOMINAL
message
string
required

Message to appear on the Invoice

priceIds
string[]
required

Price IDs this discount applies to. If not populated, the discount applies to all prices on the billing schedule

separateLineItem
boolean
required

Indicates whether the discount should appear as a separate line item in the invoice

validFrom
string

First Day Discount is Valid

validTo
string

Last Day Discount is Valid

Response

200 - application/json
amount
number
required

Amount to be reduced

billingScheduleId
string
required

Billing Schedule ID

createdAt
string
required

Created at

discountCalculationType
enum<string>
required
Available options:
PERCENTAGE,
NOMINAL
id
string
required

Discount ID

message
string
required

Message to appear on the Invoice

priceIds
string[]
required

Price IDs this discount applies to. If not populated, the discount applies to all prices on the billing schedule

separateLineItem
boolean
required

Indicates whether the discount should appear as a separate line item in the invoice

sequenceAccountId
string
required

The Sequence Account to which this Discount belongs

updatedAt
string
required

Updated At

validFrom
string

First Day Discount is Valid

validTo
string

Last Day Discount is Valid