---
url: /apidocs/ticket.md
---
## Ticket API

| Endpoint | Method | Description |
|-----|-----|-----|
| [/api/v0/resource/ticket/{ticketId}](#get-ticket-pdf-file) | webRequest | Get ticket PDF file |
| [/api/v0/rpc/ticket.getPurchasableTickets](#get-purchasable-tickets) | jsonRpc | Get purchasable tickets |
| [ticket:getPurchasableTickets](#get-purchasable-tickets) | websocket | Get purchasable tickets |
| [ticket:purchaseTicket](#purchase-ticket) | websocket | Purchase ticket |
| [ticket:deleteTicket](#delete-ticket) | websocket | Delete ticket |
| [ticket:getPurchasedTicket](#get-purchased-ticket) | websocket | Get purchased ticket |
| [ticket:getPurchasedTickets](#get-purchased-tickets) | websocket | Get purchased tickets |
| [ticket:onTicketPurchased](#on-ticket-purchased-event) | websocketEvent | On ticket purchased event |

### Get ticket PDF file

**HTTP Method:** GET

**Path:** /api/v0/resource/ticket/{ticketId}

**Description:** Endpoint returns PDF file for the ticket. User must be authorized in order to fetch his ticket.

**Request:**

**Response:**

### Get purchasable tickets

**Method:** jsonRpc

**HTTP Method:** POST

**Path:** /api/v0/rpc/ticket.getPurchasableTickets

**Description:** API returns all tickets that could be purchased for an event.

**Headers:**

X-Session-Id: sessionToken

X-Network-Id: networkId

**Request:**

**Response:**

### Get purchasable tickets

**Method:** websocket

**Endpoint:** ticket:getPurchasableTickets

**Description:** API returns all tickets that could be purchased for an event.

**Request:**

**Response:**

### Purchase ticket

**Method:** websocket

**Endpoint:** ticket:purchaseTicket

**Description:** TEST API for testing ticket purchase without paying. Accessible only for network admins.

**Request:**

**Response:**

### Delete ticket

**Method:** websocket

**Endpoint:** ticket:deleteTicket

**Description:** TEST API for deleting test ticket. Accessible only for network admins.

**Request:**

**Response:**

### Get purchased ticket

**Method:** websocket

**Endpoint:** ticket:getPurchasedTicket

**Description:** API returns a ticket that was purchased by a user.

**Request:**

**Response:**

### Get purchased tickets

**Method:** websocket

**Endpoint:** ticket:getPurchasedTickets

**Description:** API returns a list of tickets that were purchased by a user.

**Request:**

**Response:**

### On ticket purchased event

**Event:** ticket:onTicketPurchased

**Description:** Event notifies user that a ticket was purchased by him.

**Data:**
