Give Coins To Users

This API is for to give coins to users


GRAPHQL


Headers

FieldsTypeDescriptionExampleData Management
URLstring{base_url}/admin
GRAPHQLstringMUTATION
content-typestringJSONapplication/json
x-access-tokenstringsession token with validitytokenadmin token

Request

mutation {
  add_funq_credits(credits: 10, user_id: "62edda58bdeee16f97d14b18") {
    message
  }
}

Request Parameters

FieldsTypeDescriptionRequired
creditsintegerThe number of coins the user receives
user_idstring_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
    }
}