Complete list of all API endpoints with full URLs and test data.
Base URL: http://localhost:3000/api/v1
GET http://localhost:3000/api/v1/
GET http://localhost:3000/api/v1/raw-products
GET http://localhost:3000/api/v1/raw-products/1
POST http://localhost:3000/api/v1/raw-products
Content-Type: application/json
{
"name": "Flour",
"stock_quantity": 500,
"unit_of_measure": "kg"
}
PUT http://localhost:3000/api/v1/raw-products/1
Content-Type: application/json
{
"name": "Wheat Flour",
"stock_quantity": 600,
"unit_of_measure": "kg"
}
DELETE http://localhost:3000/api/v1/raw-products/1
GET http://localhost:3000/api/v1/suppliers
GET http://localhost:3000/api/v1/suppliers/1
GET http://localhost:3000/api/v1/suppliers/1/raw-products
POST http://localhost:3000/api/v1/suppliers
Content-Type: application/json
{
"name": "ABC Supplies Co.",
"phone": "+221771234567",
"email": "contact@abcsupplies.com",
"website": "https://abcsupplies.com",
"contact_person": "Amadou Diallo"
}
PUT http://localhost:3000/api/v1/suppliers/1
Content-Type: application/json
{
"name": "ABC Supplies International",
"phone": "+221771234568",
"email": "info@abcsupplies.com",
"website": "https://abcsupplies.com",
"contact_person": "Amadou Diallo"
}
DELETE http://localhost:3000/api/v1/suppliers/1
GET http://localhost:3000/api/v1/finished-products
GET http://localhost:3000/api/v1/finished-products/1
GET http://localhost:3000/api/v1/finished-products/1/recipe
POST http://localhost:3000/api/v1/finished-products
Content-Type: application/json
{
"name": "Chocolate Cake",
"stock_quantity": 25,
"unit_of_measure": "unit",
"comments": "Premium chocolate cake, serves 8"
}
PUT http://localhost:3000/api/v1/finished-products/1
Content-Type: application/json
{
"name": "Dark Chocolate Cake",
"stock_quantity": 30,
"unit_of_measure": "unit",
"comments": "Premium dark chocolate cake, serves 10"
}
DELETE http://localhost:3000/api/v1/finished-products/1
GET http://localhost:3000/api/v1/clients
GET http://localhost:3000/api/v1/clients/1
GET http://localhost:3000/api/v1/clients/1/orders
POST http://localhost:3000/api/v1/clients
Content-Type: application/json
{
"name": "Restaurant Le Soleil",
"phone": "+221779876543",
"email": "contact@lesoleil.sn",
"website": "https://lesoleil.sn",
"contact_person": "Fatou Ndiaye",
"client_type": "restaurant",
"address": "123 Avenue Cheikh Anta Diop",
"city": "Dakar",
"region": "Dakar"
}
POST http://localhost:3000/api/v1/clients
Content-Type: application/json
{
"name": "Moussa Sow",
"phone": "+221771112233",
"email": "moussa.sow@email.com",
"contact_person": "Moussa Sow",
"client_type": "particulier",
"address": "456 Rue Faidherbe",
"city": "Saint-Louis",
"region": "Saint-Louis"
}
POST http://localhost:3000/api/v1/clients
Content-Type: application/json
{
"name": "Epicerie Chez Mamadou",
"phone": "+221774445566",
"email": "mamadou.epicerie@email.com",
"contact_person": "Mamadou Ba",
"client_type": "epicerie",
"address": "789 Marché Sandaga",
"city": "Dakar",
"region": "Dakar"
}
PUT http://localhost:3000/api/v1/clients/1
Content-Type: application/json
{
"name": "Restaurant Le Grand Soleil",
"phone": "+221779876544",
"email": "info@legrandsoleil.sn",
"website": "https://legrandsoleil.sn",
"contact_person": "Fatou Ndiaye",
"client_type": "restaurant",
"address": "123 Avenue Cheikh Anta Diop",
"city": "Dakar",
"region": "Dakar"
}
DELETE http://localhost:3000/api/v1/clients/1
GET http://localhost:3000/api/v1/supplier-raw-products
GET http://localhost:3000/api/v1/supplier-raw-products/1/1
Parameters: supplierId/rawProductId
POST http://localhost:3000/api/v1/supplier-raw-products
Content-Type: application/json
{
"supplier_id": 1,
"raw_product_id": 1,
"unit_price": 2500.00,
"unit_of_measure": "kg"
}
PUT http://localhost:3000/api/v1/supplier-raw-products/1/1
Content-Type: application/json
{
"unit_price": 2750.00,
"unit_of_measure": "kg"
}
DELETE http://localhost:3000/api/v1/supplier-raw-products/1/1
GET http://localhost:3000/api/v1/raw-product-orders
GET http://localhost:3000/api/v1/raw-product-orders/1
POST http://localhost:3000/api/v1/raw-product-orders
Content-Type: application/json
{
"raw_product_id": 1,
"supplier_id": 1,
"quantity": 100,
"price": 250000.00,
"ordered_at": "2026-02-26T10:00:00Z",
"expected_delivery_date": "2026-03-05",
"status": "commande"
}
PUT http://localhost:3000/api/v1/raw-product-orders/1
Content-Type: application/json
{
"raw_product_id": 1,
"supplier_id": 1,
"quantity": 150,
"price": 375000.00,
"ordered_at": "2026-02-26T10:00:00Z",
"expected_delivery_date": "2026-03-07",
"status": "expedie"
}
PATCH http://localhost:3000/api/v1/raw-product-orders/1/status
Content-Type: application/json
{
"status": "recu"
}
Available Status Values:
commande- Order placedexpedie- Shippedrecu- Receivedrupture_de_stock- Out of stock
DELETE http://localhost:3000/api/v1/raw-product-orders/1
GET http://localhost:3000/api/v1/recipe-items
GET http://localhost:3000/api/v1/recipe-items/product/1
GET http://localhost:3000/api/v1/recipe-items/1/1
Parameters: finishedProductId/rawProductId
POST http://localhost:3000/api/v1/recipe-items
Content-Type: application/json
{
"finished_product_id": 1,
"raw_product_id": 1,
"quantity_required": 2,
"unit_of_measure": "kg"
}
PUT http://localhost:3000/api/v1/recipe-items/1/1
Content-Type: application/json
{
"quantity_required": 3,
"unit_of_measure": "kg"
}
DELETE http://localhost:3000/api/v1/recipe-items/1/1
GET http://localhost:3000/api/v1/production-plans
GET http://localhost:3000/api/v1/production-plans/1
POST http://localhost:3000/api/v1/production-plans
Content-Type: application/json
{
"finished_product_id": 1,
"planned_quantity": 50,
"unit_of_measure": "unit",
"planned_production_date": "2026-03-01T08:00:00Z",
"planned_duration": 8,
"actual_duration": null,
"hourly_rate": 5000.00
}
PUT http://localhost:3000/api/v1/production-plans/1
Content-Type: application/json
{
"finished_product_id": 1,
"planned_quantity": 75,
"unit_of_measure": "unit",
"planned_production_date": "2026-03-01T08:00:00Z",
"planned_duration": 10,
"actual_duration": 9.5,
"hourly_rate": 5000.00
}
DELETE http://localhost:3000/api/v1/production-plans/1
GET http://localhost:3000/api/v1/finished-product-orders
GET http://localhost:3000/api/v1/finished-product-orders/1
POST http://localhost:3000/api/v1/finished-product-orders
Content-Type: application/json
{
"finished_product_id": 1,
"client_id": 1,
"quantity": 10,
"sale_price": 150000.00,
"ordered_at": "2026-02-26T14:00:00Z",
"expected_delivery_date": "2026-03-01T10:00:00Z",
"status": "commande"
}
PUT http://localhost:3000/api/v1/finished-product-orders/1
Content-Type: application/json
{
"finished_product_id": 1,
"client_id": 1,
"quantity": 15,
"sale_price": 225000.00,
"ordered_at": "2026-02-26T14:00:00Z",
"expected_delivery_date": "2026-03-02T10:00:00Z",
"status": "expedie"
}
PATCH http://localhost:3000/api/v1/finished-product-orders/1/status
Content-Type: application/json
{
"status": "recu"
}
Available Status Values:
commande- Order placedexpedie- Shippedrecu- Receivedrupture_de_stock- Out of stock
DELETE http://localhost:3000/api/v1/finished-product-orders/1
curl -X POST http://localhost:3000/api/v1/raw-products \
-H "Content-Type: application/json" \
-d '{"name": "Sugar", "stock_quantity": 200, "unit_of_measure": "kg"}'curl http://localhost:3000/api/v1/supplierscurl -X PATCH http://localhost:3000/api/v1/raw-product-orders/1/status \
-H "Content-Type: application/json" \
-d '{"status": "expedie"}'{
"success": true,
"message": "Operation completed successfully",
"data": { ... }
}{
"success": false,
"message": "Error description",
"statusCode": 400
}| Code | Description |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Bad Request |
| 404 | Not Found |
| 500 | Internal Server Error |