API Prix
Endpoints de gestion des prix.
Voir Collection prices pour les schémas complets.
Tous les endpoints requièrent une authentification (authMiddleware + requireMembership).
/api/prices/public-prices
Prix publics (tarif catalogue) par article, tenant et/ou fournisseur.
GET /api/prices/public-prices
| Paramètre | Type | Description |
|---|---|---|
|
ObjectId |
Filtre par article |
|
ObjectId |
Filtre par tenant |
|
ObjectId |
Filtre par fournisseur |
|
boolean |
Filtre sur le statut |
|
number |
Page (défaut : 1) |
|
number |
Résultats par page (défaut : 10) |
-
200— liste paginée
DELETE /api/prices/public-prices
Supprime plusieurs prix publics par critères.
Paramètre |
Type |
Description |
|
ObjectId |
Suppression par fournisseur |
|
ObjectId |
Suppression par tenant |
-
204— supprimé
POST /api/prices/public-prices/validate-import
Valide un fichier CSV avant import (multipart/form-data).
-
200— rapport de validation
POST /api/prices/public-prices/import
Importe des prix publics depuis un fichier CSV.
// Corps (multipart/form-data + champs)
{
company: ObjectId;
supplier: ObjectId;
currency: string;
valid_from?: string; // ISO 8601
valid_to?: string;
is_active?: boolean;
}
-
200— résultat de l’import (succès / erreurs ligne par ligne)
/api/prices/purchase-prices
/api/prices/price-conditions
Conditions tarifaires (remises, coefficients) appliquées par archétype, marque ou fournisseur.
GET /api/prices/price-conditions/suggest
Suggestions de conditions applicables à un contexte.
-
200— liste de conditions suggérées
GET /api/prices/price-conditions
Paramètre |
Type |
Description |
|
ObjectId |
Tenant courant |
|
string |
|
|
string |
|
|
number |
Page (défaut : 1) |
|
number |
Résultats par page (défaut : 10) |
-
200— liste paginée
/api/prices/net-prices
Prix nets calculés par article, client et/ou tier.
CRUD standard : GET /, GET /:id, POST /, PATCH /:id, DELETE /:id
/api/prices/kits
Kits tarifaires regroupant plusieurs articles avec un prix global.
CRUD standard : GET /, GET /:id, POST /, PATCH /:id, DELETE /:id
/api/prices/promotions
Promotions applicables à un article, archétype ou relation client.
GET /api/prices/promotions/:promotionId/assets
Liste les assets d’une promotion.
-
200— liste d’assets
/api/prices/rebates
Ristournes associées à une relation fournisseur ou client.
CRUD standard : GET /, GET /:id, POST /, PATCH /:id, DELETE /:id