Grant Coins
Endpoint used to insert coins into a student’s wallet in Toolzz LMS.
Request Example
Section titled “Request Example”curl --request POST \ --url 'https://shop.api.toolzz.com.br/coin/insert-coins' \ --header 'Authorization: Bearer <token>' \ --header 'x-auth-version: v2' \ --header 'Content-Type: application/json' \ --data '{ "user_id": "<string>", "email": "<string>", "amount": 100 }'Response Example
Section titled “Response Example”{ "success": true, "message": "Coins inserted successfully"}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
x-auth-version | String | Must be sent with value v2 | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
user_id | string | ID of the user to whom coins will be assigned. Must be a UUID or unique identifier in the system. | No |
email | string | Email of the user to whom coins will be assigned. Used as an alternative to user_id. Must be a valid email address. | No |
amount | integer | Number of coins to be added to the user’s balance. Must be a positive integer. If absent, null, or invalid, the system defaults to 100 coins. | No |
Security
Section titled “Security”To access this endpoint, it is necessary to send the x-auth-version: v2 header and a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.