Give Coins To Users
This API is for to give coins to users
GRAPHQL
Headers
Fields | Type | Description | Example | Data Management |
---|---|---|---|---|
URL | string | {base_url}/admin | ||
GRAPHQL | string | MUTATION | ||
content-type | string | JSON | application/json | |
x-access-token | string | session token with validity | token | admin token |
Request
mutation {
add_funq_credits(credits: 10, user_id: "62edda58bdeee16f97d14b18") {
message
}
}
Request Parameters
Fields | Type | Description | Required |
---|---|---|---|
credits | integer | The number of coins the user receives | ✔ |
user_id | string | _id of the user | ✔ |
Success
{
"data": {
"add_funq_credits": {
"message": "credits added successfully"
}
}
}
Error
{
"errors": [
{
"message": "Unauthorized",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": ["add_funq_credits"]
}
],
"data": {
"add_funq_credits": null
}
}