Delete Reseller API
POST /deleteReseller
Description
This API endpoint allows an admin to delete an existing reseller by providing the reseller's unique identifier. Deleting a reseller will remove the reseller and all associated data from the system.
Request Body
The request utilizes GraphQL to perform the deleteReseller
mutation.
Mutation:
mutation deleteReseller ($id: Int!) {
deleteReseller (id: $id) {
id
email
firstName
lastName
credit
level
phone
}
}
Variables:
{
"id": 0
}
- id (Int): The unique identifier of the reseller to be deleted.
Response:
-
Success (200 OK):
- If the deletion is successful, the response will return the details of the deleted reseller, confirming that the reseller has been removed from the system.
{
"data": {
"deleteReseller": {
"id": "<Reseller_ID>",
"email": "<Reseller_Email>",
"firstName": "<First_Name>",
"lastName": "<Last_Name>",
"credit": "<Credit_Amount>",
"level": "<Reseller_Level>",
"phone": "<Phone_Number>"
}
}
} -
Error (4XX/5XX):
- Appropriate error messages and status codes will be returned in cases of invalid reseller ID, missing required fields, or server errors.
Note:
Ensure that the id
corresponds to an existing reseller that needs to be deleted. Once deleted, the reseller's data cannot be recovered. Make sure to back up any necessary information before performing this action. This API should be used by admins with the necessary permissions to manage reseller accounts.