Skip to main content
GET
Read Discount

Authorizations

Authorization
string
header
required

Authentication: You can generate a Personal Access Token from your settings.

Path Parameters

id
string<uuid4>
required

Identifier of the discount.

Response

Request completed successfully

Schema for a fixed amount discount that is applied once or forever.

duration
enum<string>
required
Available options:
once,
forever,
repeating
type
enum<string>
required
Available options:
fixed,
percentage
amount
integer
required
deprecated
Example:

1000

currency
string
required
deprecated
Example:

"usd"

amounts
Amounts · object
required

Amounts: Map of currency to fixed amount to discount from the total.

Example:
created_at
string<date-time>
required

The time Ruba created this record.

modified_at
string<date-time> | null
required

The time this record last changed.

id
string<uuid4>
required

The stable identifier for this record.

metadata
object
required
name
string
required

Name: Name of the discount. Will be displayed to the customer when the discount is applied.

code
string | null
required

Code: Code customers can use to apply the discount during checkout.

starts_at
string<date-time> | null
required

Starts At: Timestamp after which the discount is redeemable.

ends_at
string<date-time> | null
required

Ends At: Timestamp after which the discount is no longer redeemable.

max_redemptions
integer | null
required

Max Redemptions: Maximum number of times the discount can be redeemed.

redemptions_count
integer
required

Count of times the discount has been redeemed.

organization_id
string<uuid4>
required

Identifier of the organization.

Example:

"1dbfc517-0bbf-4301-9ba8-555ca42b9737"

products
DiscountProduct · object[]
required