Close Tickets API
POST /closeTickets
Description
This API endpoint allows a user or admin to close multiple support tickets at once by providing a list of ticket IDs. Closing tickets changes their status to indicate that the issues have been resolved or the inquiries have been addressed.
Request Body
The request utilizes GraphQL to perform the closeTickets
mutation.
Mutation:
mutation closeTickets ($id: [Int]!) {
closeTickets (id: $id) {
id
subject
text
category
status
createdAt
}
}
Variables:
{
"id": [
0
]
}
- id (List of Int): A list of unique identifiers for the tickets to be closed.
Response:
-
Success (200 OK):
- If the ticket closure is successful, the response will return the details of the closed tickets, including their IDs, subjects, categories, statuses (indicating that they are closed), and creation timestamps.
{
"data": {
"closeTickets": [
{
"id": "<Ticket_ID>",
"subject": "<Ticket_Subject>",
"text": "<Ticket_Description>",
"category": "<Ticket_Category>",
"status": "<Ticket_Status>",
"createdAt": "<Creation_Timestamp>"
}
]
}
} -
Error (4XX/5XX):
- Appropriate error messages and status codes will be returned in cases of invalid ticket IDs, missing required fields, or server errors.
Note:
Ensure that the id
list corresponds to existing tickets within the platform. Closing multiple tickets should only be done when the issues have been resolved or the inquiries have been addressed. This API should be used by users or admins with the necessary permissions to manage and close multiple support tickets.