Documentation API
This documentation comes with the swagger API and the demo API
If you got any question about our service, please send us an email to contact at jackpot-io.com
In a nutshell
The Jackpot API allows to manage a "voucher reservation session" in which the end-user can:
- Get details regarding stores and their offers
- Get a list of possible vouchers for one store (different voucher values)
- Get a list of possible vouchers for one amount (different stores)
- Reserve a voucher
A typical session goes through the following steps:
- You sign a JWT token containing several fields, among which a session amount (nb: for this session, the reservable amount cannot exceed the session amount)
- You open a session providing this JWT, Jackpot returns a session token. Endpoint:
○ POST /V2/token
- Your client application browses the store/offer catalog using the session token. Endpoints:
- GET /v2/stores
- GET /v2/stores/proposed-vouchers
- GET /v2/stores/{storeId}/proposed-vouchers
- GET /v2/stores/{storeId}/offers/{offerId}
- From the client application, the end customer can possibly reserve a voucher using the session token. Endpoints:
- POST /v2/stores/{storeId}/offers/{offerId}/reserve-voucher-by-price
- POST /v2/stores/{storeId}/offers/{offerId}/reserve-voucher-by-value
- The session token expires after one hour, or after a voucher has been reserved
After a voucher is reserved by calling the "reserve-voucher-by-value" of "reserve-voucher-by-price" endpoint, the voucher will asynchronously go through different steps ("RESERVED", "CONFIRMED", "READY").
In order to notify you when some of those steps are completed, Jackpot uses a webhook mechanism. That means, you provide a "notification https URL" (in the administration interface), and Jackpot calls this endpoint at every step.
This voucher reservation workflow is described below.
The Jackpot API also provide "utility" routes allowing you to manage reserved vouchers:
- Confirmation of a reserved voucher
- Cancellation of a reserved voucher
- Retrieving a ready voucher URL
- Getting the ready voucher attachment
- Asking the refund of a ready voucher
Security note :
- The reservable amount cannot exceed the session amount.
- Your API signature used to sign the JWT must remain private: no one except yourself is able to change the information it contains (especially the amount).
- A given JWT token can only be used once to get a session token.