FEFCO 200
Half slotted container — open top
7 flutes · glue tab · hand holes
TOP PACK · API v1DEVELOPER REFERENCE
PDF, SVG and JSON · millimetres · 1:1 geometry · dimension cotations · CUT / CREASE legend
https://fefcobox.top-pack.tn/api/public/v1/generateSend X-API-Key using the private FEFCO_API_KEY saved for this project. Save the same value in your calling project's secrets and call from its server—not browser code. One project-level key grants generation only; no account or stored files are exposed.
Replace FEFCO_API_KEY in TOP PACK Secrets to revoke the old key. Publish TOP PACK after adding or changing the key or API code to update the live domain. The endpoint above targets this current site; use your published TOP PACK domain for production.
Files are returned directly and are not stored. CORS allows any origin without cookies. Every generation call requires the key. Models and OpenAPI are public. Print at 100% actual size and validate a folding sample before production.
Half slotted container — open top
7 flutes · glue tab · hand holes
Regular slotted container
7 flutes · glue tab · hand holes
Full overlap container
7 flutes · glue tab · hand holes
Self-locking mailer
3 mm · panel dimensions · fixed locks
427 limits: L > 38, H > 30, W > 142 and W > 2H + 14 mm. Dimensions remain adjustable; locking clearances stay fixed.
GET /api/public/v1/models| Field | Type | Rules & defaults |
|---|---|---|
| model | "200" | "201" | "203" | "427" | Required. Model code as a string. |
| length / width / height | number · mm | Required. Positive, finite, ≤ 3000 each. Blank limited to 5000 × 5000 mm. |
| mode | "interior" | "exterior" | "diecut" | 2xx defaults to interior. Exterior converts L−2T, W−2T, H−T; interior/diecut use supplied panel sizes. 427: diecut only (default). |
| flute / thickness | string / number · mm | B by default. F 0.8, E 1.6, B 3, C 4, BF 4, BE 4.5, BC 7 mm. thickness overrides the preset, >0 and ≤20. 427: B / 3 mm only. |
| kerf | number · mm | 0 by default; 0–10. Slot production allowance for 2xx. 427: zero only. |
| glueTab | object · 2xx only | width in mm (>0, ≤3000); angleTopDeg and angleBotDeg in [0,90). Default width clamps W×0.5 to 30–40 mm; both angles 30°. Overlapping chamfers rejected. |
| handHoles | array · 2xx only | Default []. Maximum 16. Each: panel 0=L1, 1=W1, 2=L2, 3=W2; width, height, offsetX, offsetY, cornerR in mm. offsetX from panel centre; offsetY from top crease to hole top. Must fit with 5 mm crease clearance; overlapping bounding boxes rejected. |
| style | object | cutColor / creaseColor: six-digit hex. cutWidth / creaseWidth: >0 to 5 mm. Defaults red cut, blue crease, 0.5 / 0.3 mm. Preview and exports share geometry. |
| withDimensions | boolean | true by default. Includes cotation values, arrows and extension lines; false omits them. PDF always includes CUT/CREASE legend. |
| format | "pdf" | "svg" | "json" | pdf by default. Returns binary PDF, SVG text, or JSON {version, units, result, issues}. JSON includes paths, panels, dimensions, bounds and parameters. |
All unknown fields are rejected. JSON body maximum: 32 KB. Geometrically infeasible requests return 422, never a fallback drawing.
curl 'https://fefcobox.top-pack.tn/api/public/v1/generate' \
-H 'Content-Type: application/json' \
-H "X-API-Key: $FEFCO_API_KEY" \
--data '{"model":"201","length":200,"width":150,"height":120,"mode":"interior","flute":"B","kerf":0.1,"glueTab":{"width":35,"angleTopDeg":30,"angleBotDeg":30},"handHoles":[],"style":{"cutColor":"#dc2626","creaseColor":"#0066cc","cutWidth":0.5,"creaseWidth":0.3},"withDimensions":true,"format":"pdf"}' \
--fail-with-body --output box.pdfUsed for this request only. Not saved in browser storage.
—
200 returns your file, with Content-Disposition, X-Blank-Width-Mm, X-Blank-Height-Mm and X-Box-Warnings (URI-encoded JSON). PDF includes the model, input sizes, board, kerf, blank dimensions and legend.
{
"error": {
"code": "INVALID_GEOMETRY",
"message": "Invalid box geometry",
"issues": [
{
"level": "error",
"message": "Chamfers overlap — reduce tab width or angles"
}
]
}
}400 malformed JSON · 401 invalid key · 413 oversized body · 415 wrong content type · 422 invalid fields/geometry · 500 generation failed · 503 key not configured