API Reference · Templates
API Reference

Templates: the catalog, as JSON

The same 11-template catalog that drives the galleries, the 3D generators, and the dieline generators — served verbatim, no auth required. The catalog is small enough that a single list call returns everything.

GET/templatesNo auth

Lists templates, optionally filtered. Both filters combine (AND). category must be one of the ids below; q is a case-insensitive substring match over the template id, name, and description (max 200 chars).

FieldTypeDescription
categoryquery stringA template category id from the table below.
qquery stringFree-text search over id, name, and description.
curl — filter by category
curl "http://localhost/api/templates?category=mailer-boxes"
200 OK
{
  "templates": [
    {
      "id": "mailer-box",
      "name": "Mailer Box",
      "category": "mailer-boxes",
      "kind": "box",
      "defaultDimensions": { "widthMm": 230, "heightMm": 160, "depthMm": 70 },
      "materials": ["cardboard", "kraft", "corrugated"],
      "finishes": ["matte", "gloss", "soft-touch", "foil"],
      "dielineAvailable": true,
      "description": "Self-locking e-commerce mailer with tuck-in flaps. The workhorse of subscription boxes and DTC shipping."
    }
  ],
  "total": 1,
  "categories": [
    { "id": "folding-cartons", "label": "Folding Cartons", "count": 1 },
    { "id": "mailer-boxes", "label": "Mailer Boxes", "count": 1 },
    …
  ]
}

total counts the filtered results, while categories always reports counts over the full catalog — faceted UIs stay stable while filters change.

FieldTypeDescription
400ApiError“Unknown template category '<id>'.” — the category is not one of the ten ids.
GET/templates/:idNo auth

Fetches a single template definition by id.

curl
curl http://localhost/api/templates/rsc-box
200 OK
{
  "template": {
    "id": "rsc-box",
    "name": "RSC Shipping Box",
    "category": "shipping-boxes",
    "kind": "box",
    "defaultDimensions": { "widthMm": 300, "heightMm": 220, "depthMm": 180 },
    "materials": ["corrugated", "kraft"],
    "finishes": ["matte"],
    "dielineAvailable": true,
    "description": "Regular Slotted Container — the standard corrugated shipping box, FEFCO 0201 style."
  }
}
FieldTypeDescription
404ApiError“Template '<id>' was not found.”

Category ids

idlabel
folding-cartonsFolding Cartons
mailer-boxesMailer Boxes
rigid-boxesRigid Boxes
shipping-boxesShipping Boxes
product-boxesProduct Boxes
bottles-jarsBottles & Jars
cans-tinsCans & Tins
pouches-bagsPouches & Bags
tubesTubes
labels-sleevesLabels & Sleeves

The ParametricTemplate shape

FieldTypeDescription
idstringStable identifier — used in editor URLs and project creation.
namestringDisplay name.
categorystringOne of the ten category ids above.
kindstringbox · bottle · jar · can · pouch · tube.
defaultDimensionsobject{ widthMm, heightMm, depthMm } — millimetres. On round containers, width/depth are the diameter.
materialsstring[]Allowed material ids: cardboard, kraft, corrugated, plastic, glass, aluminum.
finishesstring[]Allowed finish ids: matte, gloss, soft-touch, foil.
dielineAvailablebooleanTrue for the six box templates; false for containers (no folding blank).
descriptionstringOne-line human description.

Continue to project endpoints