Discounts

Returns a specific discount

get/discounts/{id}

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Path parameters

id, string required

The resource's ID, as returned in its id field

Response

Discount details

Discount required
id, string required
object, string required
status, 'active' | 'inactive' | 'expired' required

expired once redeem_by has passed on an active code. inactive means it was turned off.

discount_type, 'percentage' | 'fixed' required
code, string required
amount_off, integer nullable required
duration, 'forever' | 'once' | 'repeating' required
duration_in_months, integer nullable required
max_redemptions, integer nullable required
times_redeemed, integer required
starts_at, string date-time nullable required
redeem_by, string date-time nullable required
minimum_amount, integer nullable required
once_per_customer, boolean required
first_order_only, boolean required
created_at, string date-time required
updated_at, string date-time required
percent_off, number double nullable required
currency, string nullable required
price_variants, string[] required

The prices (price_...) the code works on. Empty means every price.

Changes

    • warning

      added the new expired enum value to the status response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    • warning

      added the new idempotency_error enum value to the error/type response property for the response status

    4 more changes in this revision