Layers3D API v1

Programmatic access to your shop — orders, quotes, and account info.

Enterprise plan feature. The API is available on the Enterprise tier. Generate and rotate your API key under Settings → Shop in the admin.

Authentication

Send your shop API key in the x-api-key header on every request. All endpoints are scoped to your shop.

curl https://your-domain/api/v1/me \
  -H "x-api-key: pf_your_api_key_here"

Base URL: /api/v1 · Rate limit: 120 requests/minute · Machine-readable spec: GET /api/v1/openapi.json

Endpoints

GET/me

Your shop, current plan, and usage this month.

{ "shop": { "id": "…", "name": "Cambridge 3D Prints", "email": "…" },
  "plan": "enterprise", "status": "active",
  "usage": { "quotes_used": 312, "quotes_limit": null, "quotes_remaining": null } }
GET/orders

List your orders, newest first. Query params: status, limit (max 200), page.

curl "https://your-domain/api/v1/orders?status=printing&limit=50" \
  -H "x-api-key: pf_…"
GET/orders/{id}

A single order with its full event timeline.

POST/quotes

Create a quote / inquiry programmatically (e.g. from your own website or CRM). Counts toward your monthly quota.

curl -X POST https://your-domain/api/v1/quotes \
  -H "x-api-key: pf_…" -H "Content-Type: application/json" \
  -d '{ "customer_name": "Acme Eng", "customer_email": "buyer@acme.com",
        "project_name": "Bracket prototype", "notes": "PETG, 10 off" }'

Returns 201 with { "quote": { "id", "order_number", "status" } }.

Errors

Errors return a non-2xx status with a JSON body: { "error": "code" }. Common codes: 401 (bad/missing key), 402 (upgrade_required — API is Enterprise-only), 404 (order_not_found), 429 (rate limited).