/v1/fabric-needed
Cut fabric size with margin
Essayez-le en direct
10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.
Ça marche. Récupérez une clé API et utilisez-la dans votre projet.
Obtenez une clé APIExtraits de code
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_..."}
)
Exemple de réponse
Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.
{
"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
}