Aller au contenu
GET /v1/portion

Daily food portion

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/petfood-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/petfood-api/v1/portion" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/petfood-api/v1/portion", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/petfood-api/v1/portion");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/petfood-api/v1/portion",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "Daily food = calorie need ÷ the food's energy density. Dry kibble is often 350–450 kcal per 100 g (~350–450 kcal/cup); wet food far less. Split across meals. Check the bag's stated kcal/kg or kcal/cup.",
        "inputs": {
            "daily_kcal": 630,
            "meals_per_day": 2
        },
        "daily_kcal": 630,
        "cups_per_day": 1.8,
        "kcal_per_cup": 350,
        "cups_per_meal": 0.9,
        "grams_per_day": 168,
        "kcal_per_100g": 375,
        "grams_per_meal": 84
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:03.807Z",
        "request_id": "af5e558d-fb60-4ecc-ba91-826be72bff2f"
    },
    "status": "ok",
    "message": "Food portion",
    "success": true
}