Vai al contenuto
GET /v1/order

Fruits in an order

Provalo dal vivo

10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.

Intestazioni personalizzate (facoltative)
api.oanor.com/fruit-api

Funziona. Prendi una chiave API e usala nel tuo progetto.

Ottieni una chiave API

Frammenti di codice

curl "https://api.oanor.com/fruit-api/v1/order" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/fruit-api/v1/order", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/fruit-api/v1/order");
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/fruit-api/v1/order",
    headers={"x-oanor-key": "oanor_test_..."}
)

Risposta di esempio

Una risposta reale di questo endpoint, acquisita dall'ultimo health check.

{
    "data": {
        "count": 16,
        "order": "Rosales",
        "fruits": [
            {
                "id": 52,
                "name": "Persimmon",
                "genus": "Diospyros",
                "order": "Rosales",
                "family": "Ebenaceae",
                "nutritions": {
                    "fat": 0,
                    "sugar": 18,
                    "protein": 0,
                    "calories": 81,
                    "carbohydrates": 18
                }
            },
            {
                "id": 3,
                "name": "Strawberry",
                "genus": "Fragaria",
                "order": "Rosales",
                "family": "Rosaceae",
                "nutritions": {
                    "fat": 0.4,
                    "sugar": 5.4,
                    "protein": 0.8,
                    "calories": 29,
                    "carbohydrates": 5.5
                }
            },
            {
                "id": 4,
                "name": "Pear",
                "genus": "Pyrus",
                "order": "Rosales",
                "family": "Rosaceae",
                "nutritions": {
                    "fat": 0.1,
                    "sugar": 10,
                    "protein": 0.4,
                    "calories": 57,
                    "carbohydrates": 15
                }
            },
            {
                "id": 64,
                "name": "Blackberry",
                "genus": "Rubus",
                "order": "Rosales",
                "family": "Rosaceae",
                "nutritions": {
                    "fat": 0.4,
                    "sugar": 4.5,
                    "protein": 1.3,
                    "calories": 40,
                    "carbohydrates": 9
                }
            },
            {
                "id": 68,
                "name": "Fig",
                "genus": "Ficus",
                "order": "Rosales",
                "family": "Moraceae",
                "nutritions": {
                    "fat": 0.3,
                    "sugar": 16,
                    "protein": 0.8,
                    "calories": 74,
                    "carbohydrates": 19
                }
            },
            {
                "id": 71,
                "name": "Plum",
                "genus": "Prunus",
                "order": "Rosales",
                "family": "Rosaceae",
                "nutritions": {
                    "fat": 0.28,
                    "sugar": 9.92,
                    "protein": 0.7,
                    "calories": 46,
                    "carbohydrates": 11.4
                }
            },
            {
                "id": 72,
                "name": "GreenApple",
                "genus": "Malus",
                "order": "Rosales",
                "family": "Rosaceae",
                "nutritions": {
                    "fat": 0.1,
                    "sugar": 6.4,
                    "protein": 0.4,
                    "calories": 21,
 
…