/v1/yardage
Fabric for cut pieces
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
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_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"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
}