# Events

## Get Events

## Get all Events data

<mark style="color:blue;">`GET`</mark> `https://api.matrica.io/v1/event`

Returns the community's events.

#### Query Parameters

| Name | Type   | Description                 |
| ---- | ------ | --------------------------- |
| skip | number | Pagination skip, default 0  |
| take | number | Pagination take, default 25 |

{% tabs %}
{% tab title="200: OK All Events data" %}

{% endtab %}
{% endtabs %}

## Get Event

## Get Event data

<mark style="color:blue;">`GET`</mark> `https://api.matrica.io/v1/event/:eventId`

Get a community event.

#### Path Parameters

| Name                                      | Type   | Description     |
| ----------------------------------------- | ------ | --------------- |
| eventId<mark style="color:red;">\*</mark> | string | Event ID (uuid) |

{% tabs %}
{% tab title="200: OK Event data" %}

{% endtab %}

{% tab title="400: Bad Request Event not found" %}

{% endtab %}
{% endtabs %}

## Issue a Ticket to User for the Event

## Issue a Ticket

<mark style="color:green;">`POST`</mark> `https://api.matrica.io/v1/event/:eventId/member/:userId`

Issues a ticket for the user and the event

#### Path Parameters

| Name                                      | Type   | Description            |
| ----------------------------------------- | ------ | ---------------------- |
| eventId<mark style="color:red;">\*</mark> | string | Event ID (uuid)        |
| userId<mark style="color:red;">\*</mark>  | string | Matrica User ID (uuid) |

#### Request Body

| Name                                           | Type   | Description                                           |
| ---------------------------------------------- | ------ | ----------------------------------------------------- |
| issuer<mark style="color:red;">\*</mark>       | string | Identification of the issuer (usually your app name)  |
| issuerExternalId                               | string | Optional ID that your want to associate with your app |
| ticketTierId<mark style="color:red;">\*</mark> | string | Ticket tier that this ticket will be issued for       |

{% tabs %}
{% tab title="200: OK Ticket data" %}

{% endtab %}

{% tab title="400: Bad Request Event not found." %}

{% endtab %}

{% tab title="400: Bad Request User not found." %}

{% endtab %}

{% tab title="400: Bad Request User was blocked by the community to join this event." %}

{% endtab %}
{% endtabs %}

## Revoke/Void a Ticket

## Void a Ticket

<mark style="color:purple;">`PATCH`</mark> `https://api.matrica.io/v1/event/:eventId/ticket/:ticketId`

Revokes/Voids a ticket for a user/event

#### Path Parameters

| Name                                       | Type   | Description      |
| ------------------------------------------ | ------ | ---------------- |
| eventId<mark style="color:red;">\*</mark>  | string | Event ID (uuid)  |
| ticketId<mark style="color:red;">\*</mark> | string | Ticket ID (uuid) |

#### Request Body

| Name     | Type    | Description                                   |
| -------- | ------- | --------------------------------------------- |
| refunded | boolean | If the ticket is voided because it's refunded |

{% tabs %}
{% tab title="200: OK Voided Ticket" %}

{% endtab %}

{% tab title="400: Bad Request Event not found." %}

{% endtab %}

{% tab title="400: Bad Request Ticket not found." %}

{% endtab %}
{% endtabs %}
