Vai al contenuto
GET /v1/fabric-needed

Cut fabric size with margin

Provalo dal vivo

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

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

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

Ottieni una chiave API

Frammenti di codice

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

Risposta di esempio

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

{
    "data": {
        "note": "The fabric to cut = the design size plus a margin on every side, so add twice the margin to each dimension. The usual margin is 3 inches per side for hooping, framing and finishing — a 10 × 7 design wants a 16 × 13 inch cut. Skimp on the margin and there is no room to mount or frame the finished piece.",
        "inputs": {
            "margin_in": 3,
            "design_width_in": 10,
            "design_height_in": 7
        },
        "fabric_width_cm": 40.64,
        "fabric_width_in": 16,
        "fabric_height_cm": 33.02,
        "fabric_height_in": 13
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:53.078Z",
        "request_id": "a64abdab-9564-4fb5-bcce-3c69852259b6"
    },
    "status": "ok",
    "message": "Fabric needed",
    "success": true
}