Zum Inhalt springen
GET /v1/yardage

Fabric for cut pieces

Live testen

10 freie Calls pro Tag — keine Anmeldung, kein API-Key. Geht durchs oanor-Gateway.

Eigene Header (optional)
api.oanor.com/sewing-api

Funktioniert. Hol dir einen API-Key und nutze sie in deinem Projekt.

API-Key holen

Code-Snippets

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_..."}
)

Beispiel-Response

Echte Antwort dieses Endpoints, erfasst beim letzten 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
}