Skip to main content
POST
/
ticket
/
getLatest
Get next ticket id to work on
curl --request POST \
  --url https://demo.enneo.ai/api/mind/ticket/getLatest \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "preferredDirection": "earliest",
  "ticketId": 123,
  "filters": [
    {
      "key": "channel",
      "comparator": "in",
      "values": [
        "email"
      ],
      "value": 1609459200,
      "from": 1609459200,
      "to": 1612051200
    }
  ]
}
'
{
  "earliest": 2,
  "previous": 1,
  "next": 3
}

Authorizations

Authorization
string
header
required

JWT-based authentication

Body

application/json

Parameters for getting the next ticket

preferredDirection
enum<string>
default:earliest

Direction to navigate in the ticket queue

Available options:
earliest,
previous,
next
Example:

"earliest"

ticketId
integer | null

Current ticket ID (required when preferredDirection is 'previous' or 'next')

Example:

123

filters
object[]

An array of objects containing filters

Response

200 - application/json

Successful operation

earliest
integer | null
Example:

2

previous
integer | null
Example:

1

next
integer | null
Example:

3