Przejdź do głównej treści
← Dokumentacja API

Dokument order.v1

Każde zamówienie zapisane przez Configurator to jeden podpisany dokument order.v1: przepływ, w którym powstało, lista formatek, plan produkcji, wycena z cenami wraz z tokenem oraz informacja, skąd pochodzi. Nie zawiera danych osobowych, tylko Twój nieprzejrzysty customerRef.

Ścieżki, nazwy pól, kody błędów, nazwy nagłówków i przykłady kodu pozostają po angielsku: to jest kontrakt.

Zasady obowiązujące w każdym zamówieniu

  • Każda długość jest w milimetrach; unit to tylko jednostka wyświetlania.
  • Każda kwota to Money w całych jednostkach podstawowych, a każda waluta jest równa currency zamówienia.
  • Jedno zamówienie to jeden przepływ: workflow.mode wybiera kształt listy formatek i planu (obecnie panel2d).
  • plan.planHash to SHA-256 planu kanonicznego; token wyceny go wiąże, więc zmieniony plan zostanie wykryty.
  • Dokument jest zamknięty i w v1 tylko addytywny: nowe pola są opcjonalne, nic nie jest usuwane ani przemianowywane.

Pola

Tabele poniżej są generowane z samego schematu JSON; ten sam schemat jest osadzony bez zmian w dokumencie OpenAPI.

Opisy w tej tabeli pochodzą z angielskiego kontraktu (schematu JSON lub dokumentu OpenAPI).

Order

PoleTypWymaganeOpis
schemaVersion1tak—
idempotencyKeystringtakThe caller's replay key for POST /cfg/v1/order (P2-09): the same key returns the same order.
tenantIdstringtak—
configVersionintegertakThe 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).
workflowWorkflowtak—
customerRefstringnieOpaque reference into the merchant's own customer records. Never a name or an address.
customerGroupstringnieThe tenant-config customer group the price list was chosen for.
locale"en" | "de" | "it" | "fr" | "pl" | "cs" | "ro" | "hu" | "es" | "hr"tak—
unit"mm" | "cm" | "in"takDisplay unit at ordering time; every length in this document is millimetres.
currencystringtak—
pricingMode"platform" | "external"tak—
createdAtstringtak—
expiresAtstringtakQuote validity; equals the token's exp.
sourceSourcetak—
cutListCutPart[]takMODE-DISCRIMINATED by workflow.mode (Order.allOf). One branch today: panel2d CutPart.
fullSheetsFullSheetItem[]takFull stock units bought uncut. MODE-DISCRIMINATED; panel2d: whole sheets.
hardwareHardwareLine[]takMode-independent (catalogue hardware).
bondedPanelsBondedPanel[]nieGlued multi-layer panels (P5-05). MODE-DISCRIMINATED; panel2d only today. Shape may gain optional fields there; this is the v1 minimum.
planPlantakMODE-DISCRIMINATED; the plan carries its own `mode` tag (= workflow.mode), covered by planHash.
quoteQuotetak—
shippingOrderShippingnie—
filesFileRef[]nie—
signatureSignaturenie—

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`.

PoleTypWymaganeOpis
idstringtak—
mode"panel2d"takA BUILT mode (x-cfg-modes.built). Reserved ⇒ `mode_unavailable`; unknown ⇒ `enum`.
profile"furniture"tak—

Source

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

PoleTypWymaganeOpis
embedVersionstringtak—
engineVersionstringtak= plan.engineVersion (the Engine API's engineVersion).
configVersionintegertak= $.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).

PoleTypWymaganeOpis
idstringtak—
namestringtakNo C0/C1 control characters (audit P7-01 F1: a newline in a name wrote DXF entities).
wnumbertakThe size the engine was given (after the tenant's dimension convention / edging deduction were applied).
hnumbertak—
qtyintegertak—
materialstringtakCatalogue MaterialItem.id (the API's material partition key).
rotatablebooleannie—
grain"w" | "h"nie—
grainGroupstringnie—
prioritybooleannie—
edgeBandingEdgeBandingnie—
metaobjectnieOpaque passthrough (= ApiPart2D.meta), ≤ 2048 bytes canonical.
groupstringnieRoom / cabinet / project the customer assigned; printed on labels and exports.
machiningMachiningOp[]nie—

EdgeBanding

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

PoleTypWymaganeOpis
topstringnie—
rightstringnie—
bottomstringnie—
leftstringnie—

MachiningOp

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

PoleTypWymaganeOpis
typeIdstringtak—
qtyintegertak—
paramsobjectnieOpen 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

PoleTypWymaganeOpis
materialIdstringtak—
wnumbertak—
hnumbertak—
qtyintegertak—

HardwareLine

PoleTypWymaganeOpis
hardwareIdstringtak—
qtyintegertak—

BondedPanel

PoleTypWymaganeOpis
idstringtak—
wnumbertak—
hnumbertak—
qtyintegertak—
layersBondedLayer[]tak—
namestringnie—

BondedLayer

PoleTypWymaganeOpis
materialIdstringtak—
thicknessMmnumbertak—

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`).

PoleTypWymaganeOpis
mode"panel2d"takThe mode tag — INSIDE the plan so planHash covers it; must equal $.workflow.mode (D15).
engine"heuristic" | "balanced" | "max"tak—
engineVersionstringtak—
deterministicbooleantak—
sheetsSheet[]tak—
metricsMetrics2Dtak—
cutPlanarray | nulltaknull when the layout is not guillotine.
unplacedUnplaced2D[]tak—
warningsstring[]tak—
guillotineValidbooleantak—
planHashstringtaksha256 hex of canonicalize(plan without planHash) — RFC 8785; covers `mode`.

Sheet

= ApiSheet (types.ts).

PoleTypWymaganeOpis
wnumbertak—
hnumbertak—
pricenumber | nulltakThe engine's unit-less per-sheet price; the issuer passes null.
partsPlacedPart2D[]tak—
offcutsRect[]nie—
materialstringnie—
grain"w" | "h"nie—
metaobjectnie—

PlacedPart2D

= ApiPlacedPart2D (types.ts).

PoleTypWymaganeOpis
namestringtak—
xnumbertak—
ynumbertak—
wnumbertak—
hnumbertak—
rotatedbooleantak—
metaobjectnie—

Rect

= ApiRect (types.ts).

PoleTypWymaganeOpis
xnumbertak—
ynumbertak—
wnumbertak—
hnumbertak—

Metrics2D

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

PoleTypWymaganeOpis
sheetCountintegertak—
yieldPctnumbertak—
placedintegertak—
totalintegertak—
cutLinesintegertak—
sawPassesintegertak—
cutLengthnumbertak—
totalPricenumbertak—

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.

PoleTypWymaganeOpis
sheetintegertak—
stepintegertak—
axis"h" | "v"tak—
posnumbertak—
lengthnumbertak—
stageintegertak—

Unplaced2D

= ApiUnplaced2D (types.ts).

PoleTypWymaganeOpis
namestringtak—
wnumbertak—
hnumbertak—
qtyintegertak—

Quote

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

QuoteLine

PoleTypWymaganeOpis
idstringtak—
type"cutPart" | "fullSheet" | "hardware" | "machining" | "bondedPanel" | "edging" | "surcharge" | "shipping" | "tax"tak—
labelstringtak—
qtynumbertakPieces, sheets, metres (edging) — the line's own unit.
unitAmountMoneytak—
amountMoneytakLine total after the tenant's rounding. Σ non-tax amounts = totals.net.
refLineRefnie—
metaobjectnie—

LineRef

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

PoleTypWymaganeOpis
partIdstringnie—
materialIdstringnie—
edgingIdstringnie—
hardwareIdstringnie—
machiningIdstringnie—
zoneIdstringnie—
ruleIdstringnie—
bondedPanelIdstringnie—

Totals

PoleTypWymaganeOpis
netMoneytak—
taxMoneytak—
grossMoneytak—

Money

PoleTypWymaganeOpis
amountMinorintegertak—
currencystringtak—

OrderShipping

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

PoleTypWymaganeOpis
method"delivery" | "pickup"tak—
zoneIdstringnie—
pickupLocationIdstringnie—

FileRef

PoleTypWymaganeOpis
kind"pdf" | "labels" | "csv" | "dxf" | "svg" | "xlsx" | "json"tak—
urlstringtak—
sha256stringnie—
bytesintegernie—

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).

PoleTypWymaganeOpis
alg"HMAC-SHA256"tak—
keyIdstringtak—
valuestringtak—

Nie ma tu przycisku „wypróbuj” celowo: klucz tajny należy do Twojego serwera, nigdy do przeglądarki. Sklep demonstracyjny pokazuje osadzenie i przekazanie zamówienia działające od początku do końca.

Informacje prawneWarunki konfiguratora (EN) ·Umowa powierzenia przetwarzania danych (EN) ·Informacja o prywatności dla kupujących ·Licencje stron trzecich (EN)