> For the complete documentation index, see [llms.txt](https://eventx-hq.gitbook.io/knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eventx-hq.gitbook.io/knowledge-base/api-v2/attendee-tickets.md).

# Attendee Tickets

Attendee ticket assignment

## List attendee tickets

> Returns all tickets assigned to a specific attendee within an event. Each ticket represents the attendee's claim on a ticket class (the purchased or assigned instance).

```json
{"openapi":"3.1.0","info":{"title":"EventX Public API v2","version":"v2"},"tags":[{"name":"attendee tickets","description":"Attendee ticket assignment"}],"servers":[{"url":"https://api.eventx.io","description":"EventX Public API server"}],"paths":{"/v2/events/{eventId}/attendees/{attendeeId}/tickets":{"get":{"tags":["attendee tickets"],"summary":"List attendee tickets","description":"Returns all tickets assigned to a specific attendee within an event. Each ticket represents the attendee's claim on a ticket class (the purchased or assigned instance).","parameters":[{"schema":{"type":"string","format":"uuid","description":"Event UUID"},"required":true,"name":"eventId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Attendee UUID"},"required":true,"name":"attendeeId","in":"path"}],"responses":{"200":{"description":"Array of tickets belonging to the attendee","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"ticketClassId":{"type":["string","null"]},"eventId":{"type":["string","null"]},"claimedByAttendeeId":{"type":["string","null"]},"orderItemId":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","ticketClassId","eventId","claimedByAttendeeId","orderItemId","createdAt","updatedAt"],"description":"Attendee ticket row — represents a ticket instance assigned to an attendee for a specific ticket class"}}}}},"401":{"description":"Unauthorized — missing or invalid JWT","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"403":{"description":"Forbidden — user is not an organiser of this event","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}}}}}}}
```

## Create an attendee ticket

> Assigns a ticket class to an attendee. Creates a new ticket instance linked to the specified ticket class.

```json
{"openapi":"3.1.0","info":{"title":"EventX Public API v2","version":"v2"},"tags":[{"name":"attendee tickets","description":"Attendee ticket assignment"}],"servers":[{"url":"https://api.eventx.io","description":"EventX Public API server"}],"paths":{"/v2/events/{eventId}/attendees/{attendeeId}/tickets":{"post":{"tags":["attendee tickets"],"summary":"Create an attendee ticket","description":"Assigns a ticket class to an attendee. Creates a new ticket instance linked to the specified ticket class.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Event UUID"},"required":true,"name":"eventId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Attendee UUID"},"required":true,"name":"attendeeId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketClassId":{"type":"string","format":"uuid","description":"The ticket class ID to assign to this attendee"}},"required":["ticketClassId"]}}}},"responses":{"201":{"description":"Ticket created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ticketClassId":{"type":["string","null"]},"eventId":{"type":["string","null"]},"claimedByAttendeeId":{"type":["string","null"]},"orderItemId":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","ticketClassId","eventId","claimedByAttendeeId","orderItemId","createdAt","updatedAt"],"description":"Attendee ticket row — represents a ticket instance assigned to an attendee for a specific ticket class"}}}},"400":{"description":"Validation error — invalid request body","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"401":{"description":"Unauthorized — missing or invalid JWT","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"403":{"description":"Forbidden — user is not an organiser of this event","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}}}}}}}
```

## Get attendee ticket by ID

> Returns a single ticket by its ID, scoped to a specific attendee and event.

```json
{"openapi":"3.1.0","info":{"title":"EventX Public API v2","version":"v2"},"tags":[{"name":"attendee tickets","description":"Attendee ticket assignment"}],"servers":[{"url":"https://api.eventx.io","description":"EventX Public API server"}],"paths":{"/v2/events/{eventId}/attendees/{attendeeId}/tickets/{ticketId}":{"get":{"tags":["attendee tickets"],"summary":"Get attendee ticket by ID","description":"Returns a single ticket by its ID, scoped to a specific attendee and event.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Event UUID"},"required":true,"name":"eventId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Attendee UUID"},"required":true,"name":"attendeeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Ticket UUID"},"required":true,"name":"ticketId","in":"path"}],"responses":{"200":{"description":"Ticket","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ticketClassId":{"type":["string","null"]},"eventId":{"type":["string","null"]},"claimedByAttendeeId":{"type":["string","null"]},"orderItemId":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","ticketClassId","eventId","claimedByAttendeeId","orderItemId","createdAt","updatedAt"],"description":"Attendee ticket row — represents a ticket instance assigned to an attendee for a specific ticket class"}}}},"401":{"description":"Unauthorized — missing or invalid JWT","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"403":{"description":"Forbidden — user is not an organiser of this event","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"404":{"description":"Not found — ticket does not exist for this attendee","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}}}}}}}
```

## Update attendee ticket

> Updates an attendee ticket. Currently supports reassigning the ticket class via the ticketClassId field.

```json
{"openapi":"3.1.0","info":{"title":"EventX Public API v2","version":"v2"},"tags":[{"name":"attendee tickets","description":"Attendee ticket assignment"}],"servers":[{"url":"https://api.eventx.io","description":"EventX Public API server"}],"paths":{"/v2/events/{eventId}/attendees/{attendeeId}/tickets/{ticketId}":{"patch":{"tags":["attendee tickets"],"summary":"Update attendee ticket","description":"Updates an attendee ticket. Currently supports reassigning the ticket class via the ticketClassId field.","parameters":[{"schema":{"type":"string","format":"uuid","description":"Event UUID"},"required":true,"name":"eventId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Attendee UUID"},"required":true,"name":"attendeeId","in":"path"},{"schema":{"type":"string","format":"uuid","description":"Ticket UUID"},"required":true,"name":"ticketId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ticketClassId":{"type":"string","format":"uuid","description":"New ticket class ID to reassign this ticket to"}}}}}},"responses":{"200":{"description":"Ticket updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"ticketClassId":{"type":["string","null"]},"eventId":{"type":["string","null"]},"claimedByAttendeeId":{"type":["string","null"]},"orderItemId":{"type":["string","null"]},"createdAt":{"type":["string","null"]},"updatedAt":{"type":["string","null"]}},"required":["id","ticketClassId","eventId","claimedByAttendeeId","orderItemId","createdAt","updatedAt"],"description":"Attendee ticket row — represents a ticket instance assigned to an attendee for a specific ticket class"}}}},"400":{"description":"Validation error — invalid request body","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"401":{"description":"Unauthorized — missing or invalid JWT","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"403":{"description":"Forbidden — user is not an organiser of this event","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}},"404":{"description":"Not found — ticket does not exist for this attendee","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"type":"number"},"meta":{}},"required":["code","message","status"]}}}}}}}}}
```
