openapi: 3.0.3 info: title: Roobet Affiliate Stats API version: 2.0.0 servers: - url:…
- User
openapi: 3.0.3 info: title: Roobet Affiliate Stats API version: 2.0.0 servers:
- url: https://roobetconnect.com paths: /affiliate/v2/stats: get: description: Get affiliate stats for specified user. parameters:
- in: query name: userId schema: type: string required: true description: The affiliate's User ID.
- in: query name: startDate schema: type: string required: false description: ISO 8601 date and time string.
- in: query name: endDate schema: type: string required: false description: ISO 8601 date and time string.
- in: query name: gameIdentifiers schema: type: string required: false example: pragmatic:vs20fruitswroo,-hacksaw:1059 description: A comma-delimited list of game identifiers to include in the report. Prepend with a '-' to exclude.
- in: query name: categories schema: type: string required: false example: blackjack,slots,-roulette description: A comma-delimited list of game categories to include in the report. Prepend with a '-' to exclude.
- in: query
name: providers schema: type: string required: false example: pragmatic,hacksaw,-housegames description: A comma-delimited list of game providers to include in the report. Prepend with a '-' to exclude.
- in: query name: sortBy schema: type: string enum:
- wagered
- highestMultiplier required: false example: wagered description: The field to sort by. Default is wagered. responses: 200: description: Successful response content: application/json: schema: $ref: '#/components/schemas/GetAffiliateStatsResponse' components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JSON Web Token schemas: GetAffiliateStatsResponse: type: array items: type: object properties: uid: type: string example: 'a063d5f9-cc44-4c97-b334-8dc69c75c422' username: type: string example: 'MrRoo' wagered: type: number example: 49319.44 favoriteGameId: type: string example: 'pragmatic:vs20fruitswroo' favoriteGameTitle: type: string example: 'Roo Bonanza' weightedWagered:
type: number example: 493.12 rankLevel: type: number example: 1 rankLevelImage: type: string
example: 'https://roobet.com/cdn- cgi/image/format=auto/https://roobet.com/immutable/rewards/levelcons/s
ilver1.png' highestMultiplier: type: object properties: multiplier: type: number example: 100 wagered: type: number example: 0.1 payout: type: number example: 10 gameId: type: string example: 'pragmatic:vs20fruitswroo' gameTitle: type: string example: 'Roo Bonanza' security:
- bearerAuth: []
Break down how to use this API.
- Assistant
To effectively use the Roobet Affiliate Stats API, follow the structured approach outlined below, which includes understanding the API's structure, functionalities, and how to interact with it.
Overview
The Roobet Affiliate Stats API allows you to retrieve affiliate statistics for a specified user based on various parameters such as date range, game identifiers, categories, and providers.
API Structure
- API Version:
2.0.0 - Base URL:
https://roobetconnect.com - Authentication: The API uses Bearer Token authentication. You need to include a valid JSON Web Token (JWT) in the request header for authentication.
Endpoints
Get Affiliate Stats
- Path:
/affiliate/v2/stats - Method:
GET - Description: Retrieves affiliate statistics for a specified user.
Parameters
You can specify several query parameters to customize the request:
-
userId(required):- Type:
string - Description: The affiliate's User ID that you want to query.
- Type:
-
startDate(optional):- Type:
string - Description: Start date in ISO 8601 format (e.g.,
2021-10-01T00:00:00Z).
- Type:
-
endDate(optional):- Type:
string - Description: End date in ISO 8601 format (e.g.,
2021-10-31T23:59:59Z).
- Type:
-
gameIdentifiers(optional):- Type:
string - Description: Comma-separated list of game identifiers to include. Use
-to exclude (e.g.,pragmatic:vs20fruitswroo,-hacksaw:1059).
- Type:
-
categories(optional):- Type:
string - Description: Comma-separated list of game categories to include. Use
-to exclude (e.g.,blackjack,slots,-roulette).
- Type:
-
providers(optional):- Type:
string - Description: Comma-separated list of game providers to include. Use
-to exclude (e.g.,pragmatic,hacksaw,-housegames).
- Type:
-
sortBy(optional):- Type:
string - Enum:
wagered,highestMultiplier - Description: Field to sort results by. Default is
wagered.
- Type:
Response
The successful response will return a list of statistical data about the affiliate users. The structure of the response will be as follows:
- HTTP Status:
200 OK - Content Type:
application/json - Response Schema:
[ { "uid": "a063d5f9-cc44-4c97-b334-8dc69c75c422", "username": "MrRoo", "wagered": 49319.44, "favoriteGameId": "pragmatic:vs20fruitswroo", "favoriteGameTitle": "Roo Bonanza", "weightedWagered": 493.12, "rankLevel": 1, "rankLevelImage": "https://roobet.com/cdn-cgi/image/format=auto/https://roobet.com/immutable/rewards/levelcons/silver1.png", "highestMultiplier": { "multiplier": 100, "wagered": 0.1, "payout": 10, "gameId": "pragmatic:vs20fruitswroo", "gameTitle": "Roo Bonanza" } }, ... ]Usage Example
To utilize this API, follow these steps:
-
Get a Bearer Token: Ensure you have a valid JSON Web Token that grants you access to the API.
-
Formulate Your Request:
- Choose the
userIdof the affiliate you want to retrieve statistics for. - Optionally include other parameters like
startDate,endDate, etc. - Example Request URL:
https://roobetconnect.com/affiliate/v2/stats?userId=YOUR_USER_ID&startDate=2023-10-01T00:00:00Z&endDate=2023-10-31T23:59:59Z - Choose the
-
Make the Request: Send a GET request to the above URL with the Bearer Token in the
Authorizationheader:Authorization: Bearer YOUR_JWT_TOKEN -
Process the Response: Parse the JSON response to extract affiliate statistics.
Conclusion
This API provides key insights into affiliate performance and interaction with various games/brands on the platform. By following the steps outlined, you can effectively retrieve tailored affiliate stats to analyze user engagement and performance metrics.
- API Version:
- User
how to get jwt token.
- Assistant
To obtain a JSON Web Token (JWT) for accessing the Roobet Affiliate Stats API (or any other API that requires JWT for authentication), follow these general steps. The exact method may vary depending on the implementation provided by Roobet or its affiliate program.
Steps to Get a JWT Token
-
Sign Up for an Account: Ensure you’re signed up as an affiliate on Roobet or the relevant platform. You may need to go through a registration process to become an authorized user.
-
Access the Authentication Endpoint:
- Look for the authentication or login endpoint in the API documentation provided by Roobet. This is usually where you'll send your login credentials (username and password) to acquire a JWT.
- The typical structure of an authentication request might look like this (the actual endpoint and parameters need to be confirmed from the API documentation):
POST https://roobetconnect.com/auth/login -
Prepare Your Credentials:
- Typically, you would need to provide a payload with credentials such as username and password. The exact fields will depend on the API's requirements. Here's an example of what that payload might look like:
{ "username": "your_username", "password": "your_password" } -
Send the Authentication Request:
- Use a tool like Postman, cURL, or any programming language (like Python, JavaScript, etc.) to send a POST request to the authentication endpoint with your credentials:
Example using cURL:
curl -X POST https://roobetconnect.com/auth/login \ -H "Content-Type: application/json" \ -d '{ "username": "your_username", "password": "your_password" }'Example using Python with the
requestslibrary:import requests url = "https://roobetconnect.com/auth/login" payload = { "username": "your_username", "password": "your_password" } headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) if response.status_code == 200: token = response.json().get("token") print("JWT Token:", token) else: print("Error:", response.status_code, response.text) -
Check the Response:
- If your credentials are valid, the server will respond with a JSON object that contains the JWT token. It typically looks something like this:
{ "token": "your_jwt_token_here" } -
Use the JWT Token:
- Once you have the JWT token, you can include it in the
Authorizationheader for subsequent requests to the API:
Authorization: Bearer your_jwt_token_here - Once you have the JWT token, you can include it in the
Notes
- Token Expiration: Keep in mind that JWT tokens usually have expiration times. If your token expires, you’ll need to authenticate again to get a new token.
- Secure Your Credentials: Always handle your credentials securely to avoid unauthorized access.
- Refer to Documentation: Always refer to the specific API documentation provided by Roobet for any particular requirements or additional parameters for authentication, as implementations may differ.
If Roobet provides a different process or specific tools for obtaining the JWT token, those details should be highlighted in their official API documentation or developer portal.
-