Chercher et filtrer
Chaque liste (/products, /customers, /invoices…) accepte des filtres. Ils se combinent : ils s'additionnent (« ET »). Cette page prend l'exemple des produits ; le principe est le même partout. Les filtres de chaque ressource sont listés dans la référence.
Chercher par texte#
search cherche le texte dans le nom, le code et le code-barres du produit. Il faut au moins 2 caractères.
curl "https://votre-entreprise.evyooht.com/api/v1/products?search=papier" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?search=papier" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/products?search=papier", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/products?search=papier");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/products",
params={"search": "papier"},
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())- La recherche est « contient » :
papiertrouve « Papier thermique » comme « Porte-papier ». - Elle ne tient pas compte des majuscules.
- Elle est littérale : les caractères
%et_n'ont aucun effet spécial. - Pour un code-barres, utilisez aussi
search. Il trouve les codes qui contiennent la valeur, pas seulement une égalité stricte.
Filtrer#
| Filtre | Ce qu'il fait | Exemple |
|---|---|---|
status | active (par défaut), inactive ou all | status=all |
type | Un ou plusieurs types, séparés par des virgules : inventory, service, assembly, special | type=service,special |
department_id | Un département (voir la ressource departments) | department_id=3 |
sub_department_id | Un sous-département | sub_department_id=21 |
vendor_id | Un fournisseur (voir vendors) | vendor_id=12 |
updated_since | Modifiés depuis une date | updated_since=2026-03-01 |
Combiner#
Les services d'un département :
curl "https://votre-entreprise.evyooht.com/api/v1/products?type=service&department_id=3" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?type=service&department_id=3" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/products?type=service&department_id=3", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/products?type=service&department_id=3");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/products",
params={"type": "service", "department_id": 3},
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())Tous les produits, actifs ou non, dont le nom contient « papier » :
curl "https://votre-entreprise.evyooht.com/api/v1/products?status=all&search=papier" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?status=all&search=papier" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/products?status=all&search=papier", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/products?status=all&search=papier");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/products",
params={"status": "all", "search": "papier"},
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())Plusieurs valeurs d'un même filtre veulent dire « l'un OU l'autre » :
curl "https://votre-entreprise.evyooht.com/api/v1/products?type=inventory,assembly&department_id=3&status=active" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?type=inventory,assembly&department_id=3&status=active" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/products?type=inventory,assembly&department_id=3&status=active", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/products?type=inventory,assembly&department_id=3&status=active");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/products",
params={"type": "inventory,assembly", "department_id": 3, "status": "active"},
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())Trier#
sort prend un ou plusieurs champs séparés par des virgules ; un - devant donne l'ordre décroissant. Trois champs au plus.
curl "https://votre-entreprise.evyooht.com/api/v1/products?sort=-updated_at,name&per_page=10" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?sort=-updated_at,name&per_page=10" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/products?sort=-updated_at,name&per_page=10", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/products?sort=-updated_at,name&per_page=10");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/products",
params={"sort": "-updated_at,name", "per_page": 10},
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())Les champs triables de chaque ressource sont dans la référence. Un champ qui n'est pas dans la liste est refusé.
Les noms des départements, pas leurs numéros#
Un produit porte à la fois department_id (le numéro) et department (le nom), pour que vous n'ayez pas à faire une seconde requête. Les ressources departments, sub-departments, price-lists et stores servent à connaître la liste complète :
curl "https://votre-entreprise.evyooht.com/api/v1/departments" \
-H "Authorization: Bearer evy_at_votre_jeton"$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/departments" -Headers $headersconst response = await fetch("https://votre-entreprise.evyooht.com/api/v1/departments", {
headers: { Authorization: "Bearer evy_at_votre_jeton" },
});
const data = await response.json();
console.log(data);$ch = curl_init("https://votre-entreprise.evyooht.com/api/v1/departments");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer evy_at_votre_jeton"],
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
print_r($data);import requests
response = requests.get(
"https://votre-entreprise.evyooht.com/api/v1/departments",
headers={"Authorization": "Bearer evy_at_votre_jeton"},
)
print(response.json())Ce qu'on ne peut pas filtrer#
Pour garder l'API simple et rapide, certaines demandes n'existent pas :
- Pas de filtre sur le prix, le stock ou le coût. Par exemple « les produits en rupture » : lisez les produits (
stockest dans chaque produit) et triez de votre côté. - Pas de « OU » entre filtres différents : seules les valeurs d'un même filtre se cumulent.
Si une demande vous manque, écrivez-nous : ce sont ces retours qui décident des prochains filtres.