Rechercher des parcours
Lister les parcours en cours, terminés, d'une période, d'un nom, ou ceux qui attendent votre signature.
La liste des parcours se lit à l'adresse de leur type, avec un filtre dans le corps :
QUERY https://staging-api.docage.com/Transactions
Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9…
Content-Type: application/json
{
"Filter": {
"OperatorType": "And",
"Operands": [
{ "PropertyName": "GlobalStatus", "Comparison": "=", "Value": "3" },
{ "PropertyName": "Name", "Comparison": "contains", "Value": "facture" }
]
},
"SortOrder": "StartDate_Desc",
"Skip": 0,
"Take": 50,
"EntityProperties": ["Id", "Name", "GlobalStatus", "StartDate", "EndDate"]
}curl -X QUERY "https://staging-api.docage.com/Transactions" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9…" \
-H "Content-Type: application/json" \
-d '{
"Filter": {"OperatorType": "And", "Operands": [{"PropertyName": "GlobalStatus", "Comparison": "=", "Value": "3"}, {"PropertyName": "Name", "Comparison": "contains", "Value": "facture"}]},
"SortOrder": "StartDate_Desc",
"Skip": 0,
"Take": 50,
"EntityProperties": ["Id", "Name", "GlobalStatus", "StartDate", "EndDate"]
}'using HttpClient client = new();
using HttpRequestMessage request = new(new HttpMethod("QUERY"), "https://staging-api.docage.com/Transactions");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", token);
request.Content = new StringContent("""
{
"Filter": {
"OperatorType": "And",
"Operands": [
{
"PropertyName": "GlobalStatus",
"Comparison": "=",
"Value": "3"
},
{
"PropertyName": "Name",
"Comparison": "contains",
"Value": "facture"
}
]
},
"SortOrder": "StartDate_Desc",
"Skip": 0,
"Take": 50,
"EntityProperties": [
"Id",
"Name",
"GlobalStatus",
"StartDate",
"EndDate"
]
}
""", Encoding.UTF8, "application/json");
using HttpResponseMessage response = await client.SendAsync(request);
string result = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
throw new HttpRequestException(result);const response = await fetch("https://staging-api.docage.com/Transactions", {
method: "QUERY",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"Filter": {"OperatorType": "And", "Operands": [{"PropertyName": "GlobalStatus", "Comparison": "=", "Value": "3"}, {"PropertyName": "Name", "Comparison": "contains", "Value": "facture"}]},
"SortOrder": "StartDate_Desc",
"Skip": 0,
"Take": 50,
"EntityProperties": ["Id", "Name", "GlobalStatus", "StartDate", "EndDate"]
})
});
const text = await response.text();
if (!response.ok) throw new Error(text);
const result = text ? JSON.parse(text) : null;Ici, les parcours terminés dont le nom contient « facture », du plus récent au plus ancien. La réponse est un tableau de parcours ;
l'en-tête Docage-TotalItems donne leur nombre total. La même lecture se fait par GET https://staging-api.docage.com/Transactions, avec le même corps : voir
Lire des listes.
Des filtres courants
| Les parcours… | Le filtre |
|---|---|
| en cours | { "PropertyName": "GlobalStatus", "Comparison": "=", "Value": "2" } |
| terminés | { "PropertyName": "GlobalStatus", "Comparison": "=", "Value": "3" } |
| refusés, expirés ou annulés | GlobalStatus à 4, 5 ou 6 |
| envoyés depuis le 1er novembre | { "PropertyName": "StartDate", "Comparison": ">=", "Value": "2026-11-01T00:00:00Z" } |
| qui attendent votre signature | { "PropertyName": "IsSignableByMe", "Comparison": "=", "Value": "true" } |
| d'un champ personnalisé | { "PropertyName": "CustomFields.NumeroContrat", "Comparison": "=", "Value": "C-20810" } |
| de votre référence | { "PropertyName": "ExternalId", "Comparison": "=", "Value": "DOSSIER-2026-0042" } |
Les valeurs de GlobalStatus sont dans Lire le statut d'un parcours.
Les autres listes
- Les modèles de parcours :
"IsTemplate": truedans le corps — sinon la liste ne rend que des parcours. - Les parcours d'un classeur :
GET https://staging-api.docage.com/Transactions/BoxList/{boxid}. - Les parcours liés à un contact :
"LinkedToTypeName": "Contact"et"LinkedToId", l'identifiant du contact. - Pour un sélecteur, l'identifiant et le nom seuls :
QUERY https://staging-api.docage.com/Transactions/EntitiesIdAndName.
Les pièges
- Filtrez sur
GlobalStatus, pas surStatus: cette ancienne propriété existe encore, avec l'ancienne numérotation (« signé » y valait5). - Un critère qui ne se lit pas — une propriété mal écrite, une valeur d'un autre type — ne retient aucun parcours : une liste vide inattendue se relit critère par critère.
- Écrivez les dates en UTC, avec leur
Z.