Resellers Credits API
POST /getResellersCredits
Description
This API endpoint retrieves a list of resellers and their associated credits.
Request Body
The request uses GraphQL to perform the getResellersCredits
query, which does not require any variables.
Query:
query getResellersCredits {
getResellersCredits {
id
email
credit
}
}
GraphQL Variables:
{}
Example Request:
curl --location '' \
--header 'Content-Type: application/json' \
--data '{"query":"query getResellersCredits {\n getResellersCredits {\n id\n email\n credit\n }\n}","variables":{}}'
Response:
-
Success (200 OK):
- The response includes a list of resellers with their IDs, emails, and credit amounts.
{
"data": {
"getResellersCredits": [
{
"id": 1,
"email": "reseller1@example.com",
"credit": 1500
},
{
"id": 2,
"email": "reseller2@example.com",
"credit": 3000
}
// More reseller credits...
]
}
} -
Error (4XX/5XX):
- If there is an issue with the request or server error, the response will include an error message and status code.
Note:
This endpoint provides information about the available credits for each reseller, including their ID and email address.