Intégrez notre catalogue de services et nos tarifs directement dans votre application ou ERP.
| Paramètre | Type | Description |
|---|---|---|
| category optionnel | string | Filtrer par catégorie (ex: minecraft, fivem, vps-amd) |
| search optionnel | string | Recherche dans le nom du produit |
GET https://oneheberge.fr/api/v1/products?category=minecraft
{
"success": true,
"data": {
"products": [
{
"id": 1,
"name": "Minecraft Basic",
"slug": "minecraft-basic",
"category": "minecraft",
"status": "active",
"specs": { "ram": "2 GB", "cpu": "2 vCPU", "disk": "30 GB" },
"pricing": {
"base_price": 2.99,
"currency": "EUR",
"cycles": {
"monthly": { "months": 1, "discount_pct": 0, "price_month": 2.99, "price_total": 2.99 },
"quarterly": { "months": 3, "discount_pct": 5, "price_month": 2.84, "price_total": 8.52 },
"semi_annually": { "months": 6, "discount_pct": 10, "price_month": 2.69, "price_total": 16.15 },
"annually": { "months": 12, "discount_pct": 15, "price_month": 2.54, "price_total": 30.50 }
}
}
}
],
"total": 11
},
"timestamp": 1782000000
}
GET https://oneheberge.fr/api/v1/products/1
Envoyez une liste de produits avec leurs quantités et cycles de facturation pour obtenir une estimation de coût détaillée.
| Champ | Type | Description |
|---|---|---|
| items requis | array | Liste de produits à calculer (max 50) |
| items[].product_id requis | integer | ID du produit (voir GET /products) |
| items[].quantity optionnel | integer | Quantité (défaut : 1) |
| items[].billing_cycle optionnel | string | monthly | quarterly | semi_annually | annually (défaut : monthly) |
POST https://oneheberge.fr/api/v1/products/calculate
Content-Type: application/json
{
"items": [
{ "product_id": 1, "quantity": 1, "billing_cycle": "monthly" },
{ "product_id": 7, "quantity": 2, "billing_cycle": "annually" }
]
}
{
"success": true,
"data": {
"lines": [
{
"product_id": 1,
"product_name": "Minecraft Basic",
"quantity": 1,
"billing_cycle": "monthly",
"unit_price_monthly": 2.99,
"discount_pct": 0,
"setup_fee": 0,
"line_total_period": 2.99
}
],
"total_monthly_est": 8.07,
"total_period": 63.99,
"currency": "EUR",
"note": "total_monthly_est est une estimation mensuelle. total_period est le montant réel à payer."
}
}
// Succès
{ "success": true, "message": "Success", "data": { /* ... */ }, "timestamp": 1782000000 }
// Erreur
{ "success": false, "error": "Message d'erreur", "code": 404 }
| Code | Signification |
|---|---|
| 200 | Succès |
| 400 | Paramètre manquant ou invalide |
| 404 | Produit introuvable |
| 429 | Limite de requêtes atteinte (60 req/min) |
| 500 | Erreur serveur |