# Segment API

## GET IDs des segments

Renvoie la liste des segments pour l’utilisateur

#### URL de la ressource <a href="#resource-url" id="resource-url"></a>

<https://api.commander1.com/api/dms/segmentation/segments>

#### Informations sur la ressource <a href="#resource-information" id="resource-information"></a>

| Formats de réponse         | javascript (JSONP)                                     |
| -------------------------- | ------------------------------------------------------ |
| Authentification requise ? | Non si tcid n’est pas défini, token si tcid est défini |

#### Paramètres

| NOM              | EXIGENCE       | VALEURS D’EXEMPLE                | DESCRIPTION                                 |
| ---------------- | -------------- | -------------------------------- | ------------------------------------------- |
| site             | \d+            | 1234                             | ID du site pour lequel interroger le détail |
| tcid (optional)  | \d+            | 1234                             | ID du tcid (si cookie est désactivé)        |
| token (optional) | \[a-zA-Z0-9]\* | WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA | Jeton de sécurité (si tcid est défini)      |
| callback         | \w+            | do\_something                    | méthode de rappel javascript pour JSONP     |

#### Exemple de requête <a href="#example-request" id="example-request"></a>

`GET`

<https://api.commander1.com/api/dms/segmentation/segments?site=1234\\&callback=tC\\_funcEngage>

#### Résultat d’exemple <a href="#example-result" id="example-result"></a>

```
/**/tC_funcEngage(["F92C4F26"]);
```

## GET liste des segments

Renvoie la liste des segments créés dans Engage UIX

#### URL de la ressource <a href="#resource-url" id="resource-url"></a>

<https://api.commander1.com/api/dms/segmentation/segments/list>

#### Informations sur la ressource <a href="#resource-information" id="resource-information"></a>

| Formats de réponse         | JSON        |
| -------------------------- | ----------- |
| Authentification requise ? | Oui (token) |

#### Paramètres

| NOM   | EXIGENCE       | VALEURS D’EXEMPLE                | DESCRIPTION                                 |
| ----- | -------------- | -------------------------------- | ------------------------------------------- |
| site  | d+             | 1234                             | ID du site pour lequel interroger le détail |
| token | \[a-zA-Z0-9]\* | WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA | Jeton de sécurité                           |

#### Exemple de requête <a href="#example-request" id="example-request"></a>

`GET`

<https://api.commander1.com/api/dms/segmentation/segments/list?site=1234\\&token=WvNIX8955cnZ7WF0f632s0Wb99Ql3rtA>

#### Résultat d’exemple <a href="#example-result" id="example-result"></a>

```
[{"id":"BBFAC450","label":"prospect VIP"},{"id":"3DCC6A0A","label":"nouveau client"}]
```


---

# 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://doc.commandersact.com/fr/developers/tracking-and-integrations/tracking/data-api/segment-api.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.
