# Tickets

Manage support tickets created from live chat conversations. Search and filter tickets by date range, status, agent, rating, and ticket number. Update ticket status through the lifecycle: `OPEN` → `AWAITING_AGENT` → `AWAITING_CUSTOMER` → `RESOLVED` → `CLOSED`. Retrieve ticket details by ticket number, chat participant, or customer WhatsApp number.

 - [GET /pl4chat-service/ticket/client/{clientRef}](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/getticketsbyclientref.md): Retrieve all tickets for a given client reference, including rating information.
 - [GET /pl4chat-service/ticket/by-ticket-number](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/getticketbyticketnumber.md): Retrieve a single ticket by its ticket number.
 - [GET /pl4chat-service/ticket/search](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/filterticketsbycriteria.md): Search and filter tickets with pagination. Supports filtering by date range, WhatsApp number, rating, ticket number, agent, client ref, and status.
 - [PUT /pl4chat-service/ticket/{ticketId}/status](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/updateticketstatus.md): Update the status of an existing ticket.
 - [GET /pl4chat-service/ticket/getTicketEmailEntitiesByCustomerWhatsappNumberAndClientWhatsappNumber](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/getticketsbycustomerandclientwhatsappnumber.md): Retrieve all ticket entities matching both the customer's and the client's WhatsApp numbers.
 - [GET /pl4chat-service/ticket/getTicketEntityByChatParticipantId](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/getticketbychatparticipantid.md): Retrieve the ticket entity associated with a specific chat participant.
 - [GET /pl4chat-service/ticket/getTicketEmailEntitiesByCustomerWhatsappNumberAndClientRef](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/getticketsbycustomerwhatsappnumberandclientref.md): Retrieve all ticket entities matching a customer's WhatsApp number and client reference (case-insensitive).
 - [GET /pl4chat-service/ticket/getOpenedAndClosedTickets/{clientRef}](https://docs.ecommunicate.co.za/apis/omnichannel/tickets/getopenedandclosedtickets.md): Retrieve all tickets for a client within a date range, including both opened and closed tickets.
