/offers

Returns a list of the possible offers for the given amount.
Supports 3 modes, as described here :

  • Majoration mode (default mode if neither amount neither cValue is passed as a parameter)
  • Minoration mode
  • Mixed mode

Method :

GET

Headers :

Authorization: string

Params :

By default, if neither amount nor cValue is provided, the endpoint works in majoration mode, using the session amount.

  • amount string : in majoration mode, you can ask offers for an higher or equal amount from the one linked to user session.

  • cValue string : if provided, the endpoint works in minoration mode using this parameter as the coupon value. The amount returned is then the coupon price (coupon discounted amount).

  • strict boolean: optional, false by default. If false, offers are returned even if the offer amount is equal to the input amount. If true, those offers are excluded.

Important : if you provide both parameters above, a new field called discountedAmount will appear in the provided offer object (so-called "mixed" mode)

Note that in minoration or mixed mode, you can choose whether the discounted amount should be rounded up to the upper euro or upper euro cent, by checking the matching option in the admin section.

Special case in mixed mode: if amount is equal to cValue, the discounted amount is set to -1 if a coupon amount and a discounted amount can both be calculated and if the discounted amount is equal to the input amount. Indeed, in this case, returning a discounted amount equal to the input amount would be useless for the final customer.

Fields :

offers array of offer

  • In majoration mode, the coupon amount is returned in the amount field.
  • In minoration mode, the discounted amount (coupon price) is returned in the amount field.
  • In mixed mode, the coupon amount is returned in the amount field and the discounted amount (coupon price) is returned in the discountedAmount field. In this case, if one of the amounts cannot be proposed in the offer, it is set to the value -1.

Sample :

curl -X GET --header "Accept:application/json" \
'https://api.test.jackpot-io.com/v1/offers?amount=<your-custom-amount>' \
-k --header "Authorization: Bearer <your-sessionToken>"