# Get Consents

## Consentement des utilisateurs

<mark style="color:blue;">`GET`</mark> `https://api.commander1.com/engage/user/`

Ce endpoint vous permet d'obtenir le consentement de la catégorie pour un utilisateur spécifique.

#### Query Parameters

| Name     | Type    | Description         |
| -------- | ------- | ------------------- |
| token    | string  | Token de sécurité   |
| user\_id | string  | ID de l'utilisateur |
| site     | integer | ID du site          |

{% tabs %}
{% tab title="200 Le consentement a été récupéré avec succès" %}

```javascript
{
    "user_privacy_optin": 1,
    "user_privacy_categories": [
      "11",
      "12",
      "13"
    ]
}
```

{% endtab %}

{% tab title="404 Impossible de trouver un utilisateur correspondant à cette requête" %}

```javascript
{
    "message": "Person not found"
}
```

{% endtab %}
{% endtabs %}

## Consentement des visiteurs

<mark style="color:blue;">`GET`</mark> `https://api.commander1.com/engage/visitor/`

Ce endpoint vous permet d'obtenir le consentement de la catégorie pour un visiteur spécifique.

#### Query Parameters

| Name     | Type    | Description                                             |
| -------- | ------- | ------------------------------------------------------- |
| callback | string  | (optionnel) Callback pour une requête jsonp             |
| token    | string  | Token de sécurité                                       |
| site     | integer | ID du site                                              |
| tcid     | string  | ID de l'utilisateur (si le cookie n'est pas disponible) |

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

```javascript
{
    "user_privacy_optin": 1,
    "user_privacy_categories": [
      "11",
      "12",
      "13"
    ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://community.commandersact.com/trustcommander/fr/api/get-consents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
