Codes
Code |
Uses |
Redeem link |
0c67f6ba |
Used 1 times |
Redeem |
863b3e45 |
Used 1 times |
Redeem |
57c82268 |
Used 0 times |
Redeem |
c537de21 |
Used 0 times |
Redeem |
da4faf7c |
Used 1 times |
Redeem |
Routes
Route |
Method |
Description |
Parameters |
/api/redeem |
GET |
Redeem route to test if the code is valid and has usage credits left |
Name |
Description |
code |
The code generated at order creation on the e-commerce website |
key |
A secret key shared between the bot and the e-commerce website to secure communication |
|
/api/reset |
GET |
Reset the codes and uses (for testing purposes only) |
|
/api/codes |
GET |
Get all codes (for testing purposes only) |
|
Instructions
Upon receiving the first message from a user containing the code, send its content through a GET
request to /api/redeem?code=CODE&key=KEY
.
On success, the server responds with a HTTP 200
status code.
On failure (if the code either does not exists or has already been used OR if the key is either not present or invalid), the server responds with a HTTP 400
status code.