Evyoo POS API v1

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.

bash
curl "https://votre-entreprise.evyooht.com/api/v1/products?search=papier" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?search=papier" -Headers $headers
javascript
const 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);
php
$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);
python
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 » : papier trouve « 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#

FiltreCe qu'il faitExemple
statusactive (par défaut), inactive ou allstatus=all
typeUn ou plusieurs types, séparés par des virgules : inventory, service, assembly, specialtype=service,special
department_idUn département (voir la ressource departments)department_id=3
sub_department_idUn sous-départementsub_department_id=21
vendor_idUn fournisseur (voir vendors)vendor_id=12
updated_sinceModifiés depuis une dateupdated_since=2026-03-01

Combiner#

Les services d'un département :

bash
curl "https://votre-entreprise.evyooht.com/api/v1/products?type=service&department_id=3" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?type=service&department_id=3" -Headers $headers
javascript
const 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);
php
$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);
python
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 » :

bash
curl "https://votre-entreprise.evyooht.com/api/v1/products?status=all&search=papier" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/products?status=all&search=papier" -Headers $headers
javascript
const 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);
php
$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);
python
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 » :

bash
curl "https://votre-entreprise.evyooht.com/api/v1/products?type=inventory,assembly&department_id=3&status=active" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$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 $headers
javascript
const 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);
php
$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);
python
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.

bash
curl "https://votre-entreprise.evyooht.com/api/v1/products?sort=-updated_at,name&per_page=10" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$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 $headers
javascript
const 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);
php
$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);
python
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 :

bash
curl "https://votre-entreprise.evyooht.com/api/v1/departments" \
  -H "Authorization: Bearer evy_at_votre_jeton"
powershell
$headers = @{ Authorization = "Bearer evy_at_votre_jeton" }
Invoke-RestMethod -Uri "https://votre-entreprise.evyooht.com/api/v1/departments" -Headers $headers
javascript
const 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);
php
$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);
python
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 (stock est 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.