Preskoči na glavni sadržaj
← Referenca API-ja

Dokument order.v1

Svaka narudžba koju konfigurator zabilježi jedan je potpisani dokument order.v1: workflow u kojem je nastala, popis rezanja, plan proizvodnje, ponuda s cijenom i njezin token te odakle dolazi. Ne sadrži osobne podatke, samo vaš neprozirni customerRef.

Putanje, nazivi polja, kodovi pogrešaka, nazivi zaglavlja i primjeri kôda ostaju na engleskom: oni su ugovor.

Pravila koja vrijede za svaku narudžbu

  • Svaka duljina je u milimetrima; unit je samo prikazna jedinica.
  • Svaki iznos je Money u cijelim najmanjim jedinicama i svaka valuta jednaka je currency narudžbe.
  • Jedna narudžba je jedan workflow: workflow.mode određuje oblik popisa rezanja i plana (danas panel2d).
  • plan.planHash je SHA-256 kanonskog plana; token ponude ga veže, pa se promijenjeni plan otkriva.
  • Dokument je zatvoren i unutar v1 samo aditivan: nova polja su neobvezna, ništa se ne uklanja niti preimenuje.

Polja

Tablice ispod generirane su iz same JSON Schema; ista shema ugrađena je, nepromijenjena, i u dokument OpenAPI.

Opisi u ovoj tablici potječu iz engleskog ugovora (JSON Schema ili dokumenta OpenAPI).

Order

PoljeTipObveznoOpis
schemaVersion1da—
idempotencyKeystringdaThe caller's replay key for POST /cfg/v1/order (P2-09): the same key returns the same order.
tenantIdstringda—
configVersionintegerdaThe tenant-config snapshot this order was priced against. Capped at 2^53−1 (one JSON text per integer, so one hash / token claim per version).
workflowWorkflowda—
customerRefstringneOpaque reference into the merchant's own customer records. Never a name or an address.
customerGroupstringneThe tenant-config customer group the price list was chosen for.
locale"en" | "de" | "it" | "fr" | "pl" | "cs" | "ro" | "hu" | "es" | "hr"da—
unit"mm" | "cm" | "in"daDisplay unit at ordering time; every length in this document is millimetres.
currencystringda—
pricingMode"platform" | "external"da—
createdAtstringda—
expiresAtstringdaQuote validity; equals the token's exp.
sourceSourceda—
cutListCutPart[]daMODE-DISCRIMINATED by workflow.mode (Order.allOf). One branch today: panel2d CutPart.
fullSheetsFullSheetItem[]daFull stock units bought uncut. MODE-DISCRIMINATED; panel2d: whole sheets.
hardwareHardwareLine[]daMode-independent (catalogue hardware).
bondedPanelsBondedPanel[]neGlued multi-layer panels (P5-05). MODE-DISCRIMINATED; panel2d only today. Shape may gain optional fields there; this is the v1 minimum.
planPlandaMODE-DISCRIMINATED; the plan carries its own `mode` tag (= workflow.mode), covered by planHash.
quoteQuoteda—
shippingOrderShippingne—
filesFileRef[]ne—
signatureSignaturene—

Workflow

The tenant workflow this order was made in (tenant-config.v1 workflows[].id, or `default` for the implicit workflow). `mode` and `profile` are repeated so a consumer can dispatch without fetching the config; the quote token binds `id` and `mode`.

PoljeTipObveznoOpis
idstringda—
mode"panel2d"daA BUILT mode (x-cfg-modes.built). Reserved ⇒ `mode_unavailable`; unknown ⇒ `enum`.
profile"furniture"da—

Source

Provenance: which embed build collected the list, which engine version produced the plan, which config snapshot priced it.

PoljeTipObveznoOpis
embedVersionstringda—
engineVersionstringda= plan.engineVersion (the Engine API's engineVersion).
configVersionintegerda= $.configVersion.

CutPart

panel2d cut-list row = Engine API ApiPart2D (name, w, h, qty, rotatable, grain, grainGroup, priority, edgeBanding, material, meta) + the order's own id, group and machining. name/qty/material are REQUIRED here (optional on the API).

PoljeTipObveznoOpis
idstringda—
namestringdaNo C0/C1 control characters (audit P7-01 F1: a newline in a name wrote DXF entities).
wnumberdaThe size the engine was given (after the tenant's dimension convention / edging deduction were applied).
hnumberda—
qtyintegerda—
materialstringdaCatalogue MaterialItem.id (the API's material partition key).
rotatablebooleanne—
grain"w" | "h"ne—
grainGroupstringne—
prioritybooleanne—
edgeBandingEdgeBandingne—
metaobjectneOpaque passthrough (= ApiPart2D.meta), ≤ 2048 bytes canonical.
groupstringneRoom / cabinet / project the customer assigned; printed on labels and exports.
machiningMachiningOp[]ne—

EdgeBanding

Per-edge banding TYPE references (catalogue EdgingItem.id); an absent side is not banded (= ApiPart2D.edgeBanding).

PoljeTipObveznoOpis
topstringne—
rightstringne—
bottomstringne—
leftstringne—

MachiningOp

A machining operation on the part (catalogue MachiningType.id). `params` stays open in v1; P5-04 types its known keys additively (see params).

PoljeTipObveznoOpis
typeIdstringda—
qtyintegerda—
paramsobjectneOpen object; the KNOWN keys are typed (P5-04, additive): corner, measure, xMm, yMm, diameterMm, radiusMm, lengthMm, widthMm, depthMm. Per catalogue kind: hole/hinge = corner+measure+xMm+yMm+diameterMm[+depthMm]; groove = corner(top-left|top-right)+xMm+lengthMm[+widthMm+depthMm]; radius = corner+radiusMm. Any other key stays valid.

FullSheetItem

PoljeTipObveznoOpis
materialIdstringda—
wnumberda—
hnumberda—
qtyintegerda—

HardwareLine

PoljeTipObveznoOpis
hardwareIdstringda—
qtyintegerda—

BondedPanel

PoljeTipObveznoOpis
idstringda—
wnumberda—
hnumberda—
qtyintegerda—
layersBondedLayer[]da—
namestringne—

BondedLayer

PoljeTipObveznoOpis
materialIdstringda—
thicknessMmnumberda—

Plan

The panel2d production plan as the Engine API returned it (ApiOptimize2DResponse fields), plus the `mode` tag and planHash. Numbers are the engine's own, in millimetres; sheets[].price / metrics.totalPrice are the engine's unit-less price fields, NOT money (prices live in `quote`).

PoljeTipObveznoOpis
mode"panel2d"daThe mode tag — INSIDE the plan so planHash covers it; must equal $.workflow.mode (D15).
engine"heuristic" | "balanced" | "max"da—
engineVersionstringda—
deterministicbooleanda—
sheetsSheet[]da—
metricsMetrics2Dda—
cutPlanarray | nulldanull when the layout is not guillotine.
unplacedUnplaced2D[]da—
warningsstring[]da—
guillotineValidbooleanda—
planHashstringdasha256 hex of canonicalize(plan without planHash) — RFC 8785; covers `mode`.

Sheet

= ApiSheet (types.ts).

PoljeTipObveznoOpis
wnumberda—
hnumberda—
pricenumber | nulldaThe engine's unit-less per-sheet price; the issuer passes null.
partsPlacedPart2D[]da—
offcutsRect[]ne—
materialstringne—
grain"w" | "h"ne—
metaobjectne—

PlacedPart2D

= ApiPlacedPart2D (types.ts).

PoljeTipObveznoOpis
namestringda—
xnumberda—
ynumberda—
wnumberda—
hnumberda—
rotatedbooleanda—
metaobjectne—

Rect

= ApiRect (types.ts).

PoljeTipObveznoOpis
xnumberda—
ynumberda—
wnumberda—
hnumberda—

Metrics2D

= ApiMetrics2D (types.ts), unchanged: cutLines (collinear cuts merged), sawPasses (every strip crossed), cutLength (mm, convention-independent).

PoljeTipObveznoOpis
sheetCountintegerda—
yieldPctnumberda—
placedintegerda—
totalintegerda—
cutLinesintegerda—
sawPassesintegerda—
cutLengthnumberda—
totalPricenumberda—

CutStep

= ApiCutStep (types.ts): sheet is the 0-based index into plan.sheets, step restarts at 1 per sheet, stage is the 1-based machine pass.

PoljeTipObveznoOpis
sheetintegerda—
stepintegerda—
axis"h" | "v"da—
posnumberda—
lengthnumberda—
stageintegerda—

Unplaced2D

= ApiUnplaced2D (types.ts).

PoljeTipObveznoOpis
namestringda—
wnumberda—
hnumberda—
qtyintegerda—

Quote

PoljeTipObveznoOpis
pricedbooleandafalse under pricingMode = external: lines carry quantities, every amount is 0.
linesQuoteLine[]da—
totalsTotalsda—
quoteTokenstringdaSee x-cfg-quote-token. The merchant's server verifies it with the tenant's key (P4-02 /quote/verify).

QuoteLine

PoljeTipObveznoOpis
idstringda—
type"cutPart" | "fullSheet" | "hardware" | "machining" | "bondedPanel" | "edging" | "surcharge" | "shipping" | "tax"da—
labelstringda—
qtynumberdaPieces, sheets, metres (edging) — the line's own unit.
unitAmountMoneyda—
amountMoneydaLine total after the tenant's rounding. Σ non-tax amounts = totals.net.
refLineRefne—
metaobjectne—

LineRef

What the line prices. At least one id when present.

PoljeTipObveznoOpis
partIdstringne—
materialIdstringne—
edgingIdstringne—
hardwareIdstringne—
machiningIdstringne—
zoneIdstringne—
ruleIdstringne—
bondedPanelIdstringne—

Totals

PoljeTipObveznoOpis
netMoneyda—
taxMoneyda—
grossMoneyda—

Money

PoljeTipObveznoOpis
amountMinorintegerda—
currencystringda—

OrderShipping

Ids only — the delivery address is the merchant shop's data, not the contract's.

PoljeTipObveznoOpis
method"delivery" | "pickup"da—
zoneIdstringne—
pickupLocationIdstringne—

FileRef

PoljeTipObveznoOpis
kind"pdf" | "labels" | "csv" | "dxf" | "svg" | "xlsx" | "json"da—
urlstringda—
sha256stringne—
bytesintegerne—

Signature

HMAC-SHA256 over canonicalize(order without signature). keyId names the tenant key (P2-07: derived from a master, the DB holds only the id).

PoljeTipObveznoOpis
alg"HMAC-SHA256"da—
keyIdstringda—
valuestringda—

Gumba „isprobaj“ ovdje namjerno nema: tajni ključ pripada vašem poslužitelju, nikad pregledniku. Demo web shop prikazuje ugradnju i predaju narudžbe u radu od početka do kraja.

Pravne informacijeUvjeti konfiguratora (EN) ·Ugovor o obradi podataka (EN) ·Obavijest o privatnosti za kupce ·Licencije trećih strana (EN)