# Reminders

## List all reminders

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/reminders`

This endpoint allows you to get the list of your reminders.\
The resources are returned, sorted by code (A-Z).

#### Query Parameters

| Name      | Type   | Description                                                              |
| --------- | ------ | ------------------------------------------------------------------------ |
| page      | String | The number of page you wish to see. Default is 1.                        |
| per\_page | String | The number of the desired result per page. Default is 20. Maximum is 100 |

#### Headers

| Name                                             | Type   | Description                   |
| ------------------------------------------------ | ------ | ----------------------------- |
| Authentication<mark style="color:red;">\*</mark> | String | Bearer token.                 |
| Accept<mark style="color:red;">\*</mark>         | String | Should be `application/json`. |

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

```javascript
{
    "data": [
        {
            "id": 43,
            "titre": "teste",
            "module": "clients",
            "moduleID": 2197,
            "userID": "205",
            "date": "2021-08-31 07:46:00",
            "closed": 0,
            "labels": null,
            "notes": ""
        },
        {
            "id": 42,
            "titre": "tes es sdf",
            "module": "clients",
            "moduleID": 2178,
            "userID": "205",
            "date": "2021-06-10 13:51:00",
            "closed": 0,
            "labels": "test 1",
            "notes": ""
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 25,
        "total": 2
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

## Retrieve a reminder

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/reminders`

This endpoint allows you to get the details of a reminder.

#### Path Parameters

| Name                                 | Type   | Description                        |
| ------------------------------------ | ------ | ---------------------------------- |
| id<mark style="color:red;">\*</mark> | String | The ID of the reminder to retrieve |

#### Headers

| Name                                             | Type   | Description                   |
| ------------------------------------------------ | ------ | ----------------------------- |
| Authentication<mark style="color:red;">\*</mark> | String | Bearer token.                 |
| Accept<mark style="color:red;">\*</mark>         | String | Should be `application/json`. |

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

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Create a reminder

<mark style="color:green;">`POST`</mark> `https://app.gem-books.com/api/reminders`

This endpoint allows you to create a reminder.\
Returns the created reminder.

#### Headers

| Name                                             | Type   | Description                   |
| ------------------------------------------------ | ------ | ----------------------------- |
| Authentication<mark style="color:red;">\*</mark> | String | Bearer token.                 |
| Accept<mark style="color:red;">\*</mark>         | String | Should be `application/json`. |
| Content-type                                     | String | Should be `application/json`  |

#### Request Body

| Name                                       | Type   | Description                                                                                                                |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------- |
| title<mark style="color:red;">\*</mark>    | String | Title of reminder                                                                                                          |
| module<mark style="color:red;">\*</mark>   | enum   | module to insert the reminder into, here are the options available : clients,providers,sales,attributes,bookings,purchases |
| moduleID<mark style="color:red;">\*</mark> | String | ID of previous module (EX : client)                                                                                        |
| userID<mark style="color:red;">\*</mark>   | String | ID of user the reminder is set to                                                                                          |
| date<mark style="color:red;">\*</mark>     | String | Date of the reminder                                                                                                       |
| closed                                     | bool   | 1 if reminder is closed                                                                                                    |
| labels                                     | String | Labels on the reminder, comma separated                                                                                    |
| notes                                      | String | Notes of the reminder                                                                                                      |

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

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Update a reminder

<mark style="color:orange;">`PUT`</mark> `https://app.gem-books.com/api/reminders`

This endpoint allows you to update a specific reminder.\
Returns the updated reminder.

#### Path Parameters

| Name                                 | Type   | Description              |
| ------------------------------------ | ------ | ------------------------ |
| id<mark style="color:red;">\*</mark> | String | ID of resource to update |

#### Headers

| Name                                             | Type   | Description                   |
| ------------------------------------------------ | ------ | ----------------------------- |
| Authentication<mark style="color:red;">\*</mark> | String | Bearer token.                 |
| Accept<mark style="color:red;">\*</mark>         | String | Should be `application/json`. |
| Content-type                                     | String | Should be `application/json`  |

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

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}
