/v1/yardage
Fabric for cut pieces
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/sewing-api/v1/yardage" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/sewing-api/v1/yardage", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/sewing-api/v1/yardage");
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/sewing-api/v1/yardage",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"note": "Pieces per row = floor(fabric width ÷ piece width); rows = ceil(quantity ÷ per row); fabric length = rows × piece height, plus waste. Add pattern-repeat allowance for prints.",
"inputs": {
"quantity": 6,
"piece_width": 18,
"fabric_width": 44,
"piece_height": 22,
"waste_percent": 10
},
"rows_needed": 3,
"length_yards": 2.0167,
"length_inches": 72.6,
"length_meters": 1.844,
"pieces_per_row": 2
},
"meta": {
"timestamp": "2026-06-06T07:14:09.859Z",
"request_id": "cb2b33c4-4afd-4290-bf69-b2a5f837167b"
},
"status": "ok",
"message": "Fabric yardage",
"success": true
}