BackEnd
Last updated
Last updated
Our BackEnd API is documented using Postman . You will find in the link below the technical details for each endpoints.
But before heading to that documentation, read below a summary of how our API works, and what each endpoint does.
There are two sections in this collection:
Front-end endpoints (if you want to reproduce the mobile/web SDK's behaviour without going through it)
Back-end endpoints (server to server)
Only two endpoints work without a userToken: partner/getprog
and user/clientcheckcredentials
. In order to call any of the other front-end endpoints, you will need to retrieve the userToken sent in user/clientcheckcredentials
(data.user.userToken) which connects the user. See the JWT token section to understand where to place the userToken in your requests.
You must first get a token via auth/token
before calling the other endpoints. See the JWT token section to understand where to place the token in your requests.
https://www.iana.org/assignments/jwt/jwt.xhtml
path
description
auth/token
Returns the token needed for the other endpoints
buffer/store
Back-end equivalent to generosity/store, validates(+stores) an action
generosity/multistore
Validates(+stores) an action for multiple users
user/incrementalinfos
List of users with their info, completed actions and purchased gifts
user/infos
List of users with their info
user/info
Returns a single user's information
user/ranking
List of n
users below and above the given user
user/multidelete
Deletes one or multiple users
path
description
partner/getprog
Get all the information about the app's miles program for a non-connected user
partner/initialcheckstore
Same than getprog + information specific to that user
user/clientcheckcredentials
Connects/creates the user (creates them if they don't exist)
user/historyburns
List of all the gifts they bought
user/historyearns
List of all the actions they completed
user/logout
Disconnects the user (on all devices)
user/delete
Deletes the user and all of their history from app's miles' server
generosity/store
Equivalent to the SDK's triggerAction
, validates(+stores) an action
gift/list
List of available gifts for the user
gift/checkavailability
Buys a gift if user has enough points
ad/bonus
List of bonus ads
ad/specials
List of special ads
ad/news
List of news ads