Ir al contenido

List Tickets

Ver como Markdown
GET
/public/v1/tickets
curl --request GET \
--url 'https://api.aymaragents.com/public/v1/tickets?offset=0&limit=50' \
--header 'X-API-Key: <X-API-Key>'

List the tenant’s tickets, filterable by status/assignedTo/customerId (SPEC_API_PUBLICA.md §2.5) – an unknown/foreign filter value simply matches nothing, never 404 (listing filter, same convention as customerId on GET /public/v1/leads).


Permiso necesario: tenant:tickets.read

status
Any of:
string
assignedTo
Any of:
string format: uuid
customerId
Any of:
string format: uuid
offset
Offset
integer
0
limit
Limit
integer
default: 50 >= 1 <= 200

Successful Response

Media typeapplication/json
PublicTicketsResponse

GET /public/v1/tickets response envelope.

object
items
required
Items
Array<object>
PublicTicketOut

A single ticket with its embedded comment thread – same shape as the internal TicketOut (nothing curated away: every field here is already an id/status/text a third party legitimately needs to track its own ticket).

object
id
required
Id
string
customerId
Any of:
string
leadId
Any of:
string
conversationId
Any of:
string
subject
required
Subject
string
status
required
Status
string
createdBy
required
Createdby
string
assignedTo
Any of:
string
createdAt
required
Createdat
string
updatedAt
required
Updatedat
string
comments
Comments
Array<object>
PublicTicketCommentOut

One comment in a ticket’s thread – same shape as the internal TicketCommentOut.

object
id
required
Id
string
authorUserId
required
Authoruserid
string
body
required
Body
string
createdAt
required
Createdat
string
total
required
Total
integer
pagination
required
OffsetPaginationMeta

12-api-contract.md §3.2 offset/limit pagination metadata, verbatim shape.

object
page
required
Page
integer
pageSize
required
Pagesize
integer
totalItems
required
Totalitems
integer
totalPages
required
Totalpages
integer
hasNext
required
Hasnext
boolean
hasPrev
required
Hasprev
boolean

Examplegenerated

{
"items": [
{
"id": "example",
"customerId": "example",
"leadId": "example",
"conversationId": "example",
"subject": "example",
"status": "example",
"createdBy": "example",
"assignedTo": "example",
"createdAt": "example",
"updatedAt": "example",
"comments": [
{
"id": "example",
"authorUserId": "example",
"body": "example",
"createdAt": "example"
}
]
}
],
"total": 1,
"pagination": {
"page": 1,
"pageSize": 1,
"totalItems": 1,
"totalPages": 1,
"hasNext": true,
"hasPrev": true
}
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object

Examplegenerated

{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}