npm package: @one-view/search-ticket-types
Description: search ticket endpoints
Latest version: 0.0.7


FORMAT: 1A
HOST: https://some-example.com/search-ticket

# search-ticket

search ticket endpoints




## Ticket [/v1/tickets]

Search for tickets

### Get tickets [GET /v1/tickets{?filter.orderId,filter.assignee,filter.assigneeName,filter.assigneeEmail,filter.customer.name,filter.customer.email,filter.id,direction,orderBy,cursor,pageSize,ccr.language}]

+ Parameters
    + filter.orderId (optional, string)
    + filter.assignee (optional, string)
    + filter.assigneeName (optional, string)
    + filter.assigneeEmail (optional, string)
    + filter.customer.name (optional, string)
    + filter.customer.email (optional, string)
    + filter.id (optional, string)
    + orderBy (optional, string)
    + direction (optional, SortOrder)
    + cursor (optional, string)
    + pageSize (optional, int64)
        + Default: 10
    + ccr.language (optional, string)
        + Default: `eng`

+ Request

    + Headers

            Authorization: bearer token

+ Response 200 (application/json)
    + Attributes (GetTicketsResponse)

+ Response 400 (application/json)
    + Attributes (Error_400)

+ Response 403 (application/json)
    + Attributes (Error_403)

+ Response 404 (application/json)
    + Attributes (Error_404)

+ Response 500 (application/json)
    + Attributes (Error_500)
# Data Structures

## int32 (number)
## int64 (number)

## `error_object` (object)
+ `status` (string)
+ `title` (string)

## `Error` (object)
+ errors (array[error_object])

## `Error_401` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `401` (string)
        + `title`: `not authorize` (string)

## `Error_404` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `404` (string)
        + `title`: `not found` (string)

## `Error_403` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `403` (string)
        + `title`: `forbidden` (string)

## `Error_400` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `400` (string)
        + `title`: `bad request` (string)

## `Error_500` (object)
+ errors (array)
    + - (`error_object`)
        + `status`: `500` (string)
        + `title`: `internal server error` (string)

## GetTicketsResponse
+ tickets (array[Ticket], fixed-type, required) - list of ticket
+ cursor (Cursor, required) - object of pagination cursor

## SortOrder (enum)
+ asc
+ desc

## Ticket
+ id                    : `f4b8f8e5-365a-4ed1-a122-0f4ba1afef44` (string, required) - ticket id
+ assignee              : 'f4b8f8e5-365a-4ed1-a122-0f4ba1afef44' (string) - assigned agent
+ assigneeName          : 'agent' (string) - assigned agent name
+ assigneeEmail         : 'agent@fp.com' (string) - assigned agent email
+ updatedAt             : 1572499999 (int64) - time at which this ticket status changed
+ queue                 : `chat-sg-en` (string) - ticket queue name
+ status                (TicketStatus) - ticket current status
+ ccr                   : `delivery - wrong address` (string) - costumer contact reason
+ ccrCode               : `1A.1` (string) - customer contact reason code
+ orderId               : `sdw-srr`(string) - order id

## TicketStatus (enum)
+ ASSIGNED
+ ESCALATED
+ CLOSED

## Cursor
+ currentPage: `tokenA` (string, required)
+ nextPage: `tokenB` (string, required)
+ previousPages (array[string], required, fixed-type)