# Criteria

## Create a criterion

<mark style="color:green;">`POST`</mark> `/v1/games/:game_id/criteria/`

#### Request Body

| Name               | Type   | Description |
| ------------------ | ------ | ----------- |
| custom\_id         | string |             |
| name               | string |             |
| description        | string |             |
| type               | string |             |
| custom\_action\_id | string |             |
| conditions         | string |             |
| rule               | string |             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Retrieve a criterion

<mark style="color:blue;">`GET`</mark> `/v1/games/:game_id/criteria/:id`

#### Path Parameters

| Name | Type   | Description                                                |
| ---- | ------ | ---------------------------------------------------------- |
| id   | string | The custom ID of the criterion you would like to retrieve. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Update a criterion

<mark style="color:orange;">`PUT`</mark> `/v1/games/:game_id/criteria/:id`

#### Path Parameters

| Name | Type   | Description                                              |
| ---- | ------ | -------------------------------------------------------- |
| id   | string | The custom ID of the criterion you would like to update. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## Delete a criterion

<mark style="color:red;">`DELETE`</mark> `/v1/games/:game_id/criteria/:id`

#### Path Parameters

| Name | Type   | Description                                              |
| ---- | ------ | -------------------------------------------------------- |
|      | string | The custom ID of the criterion you would like to delete. |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}

## List all criteria

<mark style="color:blue;">`GET`</mark> `/v1/games/:game_id/criteria`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | string |             |

{% tabs %}
{% tab title="200 " %}

```
```

{% endtab %}
{% endtabs %}
