# Support

## Get Support Tickets

> This API retrieves a list of support tickets based on the provided query parameters.

```json
{"openapi":"3.0.1","info":{"title":"SpurtV5","version":"1.0.0"},"tags":[],"servers":[{"url":"http://139.59.67.17/backend/api"},{"url":"https://139.59.67.17/backend/api"}],"paths":{"/support-ticket":{"get":{"tags":["Support Ticket"],"summary":"Get Support Tickets","description":"This API retrieves a list of support tickets based on the provided query parameters.","operationId":"getSupportTickets","parameters":[{"name":"Authorization","in":"header","description":"Bearer token for authentication.","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","description":"Limit the number of results.","required":false,"schema":{"type":"number"}},{"name":"offset","in":"query","description":"The offset from where to start the results.","required":false,"schema":{"type":"number"}},{"name":"keyword","in":"query","description":"Search keyword for filtering tickets.","required":false,"schema":{"type":"string"}},{"name":"count","in":"query","description":"Flag to count the number of tickets matching the query.","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Successfully retrieved the support tickets","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string"},"modifiedBy":{"type":"string"},"modifiedDate":{"type":"string"},"id":{"type":"integer"},"refId":{"type":"string"},"userId":{"type":"string"},"userType":{"type":"string"},"categoryId":{"type":"integer"},"subCategoryId":{"type":"integer"},"subject":{"type":"string"},"description":{"type":"string"},"isActive":{"type":"boolean"},"isDelete":{"type":"boolean"},"status":{"type":"string"},"ticketCategory":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string"},"modifiedBy":{"type":"string"},"modifiedDate":{"type":"string"},"id":{"type":"integer"},"categoryName":{"type":"string"},"parentCategoryId":{"type":"integer"},"isActive":{"type":"boolean"},"isDelete":{"type":"boolean"}}}}}}}}}}},"500":{"description":"Failed to retrieve support tickets","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}}}}}}}}}}}
```

## Get Ticket Details

> This API retrieves details of a specific support ticket based on the provided ticket ID.

```json
{"openapi":"3.0.1","info":{"title":"SpurtV5","version":"1.0.0"},"tags":[],"servers":[{"url":"http://139.59.67.17/backend/api"},{"url":"https://139.59.67.17/backend/api"}],"paths":{"/support-ticket/{id}":{"get":{"tags":["Support Ticket"],"summary":"Get Ticket Details","description":"This API retrieves details of a specific support ticket based on the provided ticket ID.","operationId":"getTicketDetails","parameters":[{"name":"id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Bearer token for authentication.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved the ticket details","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string"},"modifiedBy":{"type":"string"},"modifiedDate":{"type":"string"},"id":{"type":"integer"},"refId":{"type":"string"},"userId":{"type":"string"},"userType":{"type":"string"},"categoryId":{"type":"integer"},"subCategoryId":{"type":"integer"},"subject":{"type":"string"},"description":{"type":"string"},"isActive":{"type":"boolean"},"isDelete":{"type":"boolean"},"status":{"type":"string"},"ticketMessage":{"type":"array","items":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string"},"modifiedBy":{"type":"string"},"modifiedDate":{"type":"string"},"id":{"type":"integer"},"ticketId":{"type":"integer"},"senderId":{"type":"string"},"senderType":{"type":"string"},"message":{"type":"string"},"sentAt":{"type":"string"},"isActive":{"type":"boolean"},"isDelete":{"type":"boolean"},"createdByType":{"type":"string"},"modifiedByType":{"type":"string"},"ticketAttachments":{"type":"array","items":{"type":"object","properties":{"attachmentId":{"type":"integer"},"fileName":{"type":"string"},"fileUrl":{"type":"string"}}}}}}}}}}}}}},"500":{"description":"Failed to retrieve ticket details","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}}}}}}}}}}}
```

## Add Message and Attachments to Ticket

> This API allows users to add a new message and attachments to an existing support ticket based on the provided ticket ID.

```json
{"openapi":"3.0.1","info":{"title":"SpurtV5","version":"1.0.0"},"tags":[],"servers":[{"url":"http://139.59.67.17/backend/api"},{"url":"https://139.59.67.17/backend/api"}],"paths":{"/support-ticket/{id}":{"post":{"tags":["Support Ticket"],"summary":"Add Message and Attachments to Ticket","description":"This API allows users to add a new message and attachments to an existing support ticket based on the provided ticket ID.","operationId":"addMessageToTicket","parameters":[{"name":"id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Bearer token for authentication.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string"},"filePath":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Successfully added message and attachments to the ticket","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"ticketId":{"type":"integer"},"message":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"fileName":{"type":"string"},"filePath":{"type":"string"}}}}}}}}}}},"500":{"description":"Failed to add message and attachments to the ticket","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}}}}}}}}}}}
```

## Update Ticket Status

> This API allows users to update the status of an existing support ticket based on the provided ticket ID.

```json
{"openapi":"3.0.1","info":{"title":"SpurtV5","version":"1.0.0"},"tags":[],"servers":[{"url":"http://139.59.67.17/backend/api"},{"url":"https://139.59.67.17/backend/api"}],"paths":{"/support-ticket/{id}":{"put":{"tags":["Support Ticket"],"summary":"Update Ticket Status","description":"This API allows users to update the status of an existing support ticket based on the provided ticket ID.","operationId":"updateTicketStatus","parameters":[{"name":"id","in":"path","description":"Ticket ID","required":true,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Bearer token for authentication.","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"}}}}}},"responses":{"200":{"description":"Successfully updated ticket status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"integer"},"status":{"type":"integer"}}}}}}}},"500":{"description":"Failed to update ticket status","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}}}}}}}}}}}
```

## Get Ticket Logs

> This API retrieves a list of ticket logs based on the provided query parameters.

```json
{"openapi":"3.0.1","info":{"title":"SpurtV5","version":"1.0.0"},"tags":[],"servers":[{"url":"http://139.59.67.17/backend/api"},{"url":"https://139.59.67.17/backend/api"}],"paths":{"/support-ticket/ticket-logs":{"get":{"tags":["Support Ticket"],"summary":"Get Ticket Logs","description":"This API retrieves a list of ticket logs based on the provided query parameters.","operationId":"getTicketLogs","parameters":[{"name":"limit","in":"query","description":"The number of logs to retrieve.","required":false,"schema":{"type":"integer"}},{"name":"offset","in":"query","description":"The offset for pagination.","required":false,"schema":{"type":"integer"}},{"name":"count","in":"query","description":"The total count of logs (if you want just the count of records).","required":false,"schema":{"type":"integer"}},{"name":"Authorization","in":"header","description":"Bearer token for authentication.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved ticket logs","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"createdBy":{"type":"string"},"createdDate":{"type":"string","format":"date-time"},"modifiedBy":{"type":"string"},"modifiedDate":{"type":"string","format":"date-time"},"id":{"type":"integer"},"ticketId":{"type":"integer"},"actionTaken":{"type":"string"},"actionBy":{"type":"string"},"actionByType":{"type":"string"},"actionAt":{"type":"string","format":"date-time"},"isActive":{"type":"boolean"},"isDelete":{"type":"boolean"},"createdByType":{"type":"string"},"modifiedByType":{"type":"string"}}}}}}}}},"500":{"description":"Failed to retrieve ticket logs","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}
```
