Salta al contenuto principale
← Riferimento API

Il documento order.v1

Ogni ordine registrato dal Configurator è un documento order.v1 firmato: il flusso di lavoro in cui è stato creato, la distinta di taglio, il piano di produzione, il preventivo con il suo token e la sua provenienza. Non contiene dati personali, solo il tuo customerRef opaco.

Percorsi, nomi dei campi, codici di errore, nomi degli header ed esempi di codice restano in inglese: sono il contratto.

Regole valide per ogni ordine

  • Ogni lunghezza è in millimetri; unit è solo l'unità di visualizzazione.
  • Ogni importo è Money in unità minori intere, e ogni valuta è uguale alla currency dell'ordine.
  • Un ordine è un flusso di lavoro: workflow.mode seleziona la forma della distinta di taglio e del piano (oggi panel2d).
  • plan.planHash è lo SHA-256 del piano canonico; il token del preventivo lo vincola, quindi un piano modificato viene rilevato.
  • Il documento è chiuso e solo additivo nella v1: i nuovi campi sono opzionali, nulla viene rimosso o rinominato.

Campi

Le tabelle qui sotto sono generate dal JSON Schema stesso; lo stesso schema è incorporato, invariato, nel documento OpenAPI.

Le descrizioni di questa tabella provengono dal contratto in inglese (il JSON Schema o il documento OpenAPI).

Order

CampoTipoObbligatorioDescrizione
schemaVersion1sì—
idempotencyKeystringsìThe caller's replay key for POST /cfg/v1/order (P2-09): the same key returns the same order.
tenantIdstringsì—
configVersionintegersìThe 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).
workflowWorkflowsì—
customerRefstringnoOpaque reference into the merchant's own customer records. Never a name or an address.
customerGroupstringnoThe tenant-config customer group the price list was chosen for.
locale"en" | "de" | "it" | "fr" | "pl" | "cs" | "ro" | "hu" | "es" | "hr"sì—
unit"mm" | "cm" | "in"sìDisplay unit at ordering time; every length in this document is millimetres.
currencystringsì—
pricingMode"platform" | "external"sì—
createdAtstringsì—
expiresAtstringsìQuote validity; equals the token's exp.
sourceSourcesì—
cutListCutPart[]sìMODE-DISCRIMINATED by workflow.mode (Order.allOf). One branch today: panel2d CutPart.
fullSheetsFullSheetItem[]sìFull stock units bought uncut. MODE-DISCRIMINATED; panel2d: whole sheets.
hardwareHardwareLine[]sìMode-independent (catalogue hardware).
bondedPanelsBondedPanel[]noGlued multi-layer panels (P5-05). MODE-DISCRIMINATED; panel2d only today. Shape may gain optional fields there; this is the v1 minimum.
planPlansìMODE-DISCRIMINATED; the plan carries its own `mode` tag (= workflow.mode), covered by planHash.
quoteQuotesì—
shippingOrderShippingno—
filesFileRef[]no—
signatureSignatureno—

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

CampoTipoObbligatorioDescrizione
idstringsì—
mode"panel2d"sìA BUILT mode (x-cfg-modes.built). Reserved ⇒ `mode_unavailable`; unknown ⇒ `enum`.
profile"furniture"sì—

Source

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

CampoTipoObbligatorioDescrizione
embedVersionstringsì—
engineVersionstringsì= plan.engineVersion (the Engine API's engineVersion).
configVersionintegersì= $.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).

CampoTipoObbligatorioDescrizione
idstringsì—
namestringsìNo C0/C1 control characters (audit P7-01 F1: a newline in a name wrote DXF entities).
wnumbersìThe size the engine was given (after the tenant's dimension convention / edging deduction were applied).
hnumbersì—
qtyintegersì—
materialstringsìCatalogue MaterialItem.id (the API's material partition key).
rotatablebooleanno—
grain"w" | "h"no—
grainGroupstringno—
prioritybooleanno—
edgeBandingEdgeBandingno—
metaobjectnoOpaque passthrough (= ApiPart2D.meta), ≤ 2048 bytes canonical.
groupstringnoRoom / cabinet / project the customer assigned; printed on labels and exports.
machiningMachiningOp[]no—

EdgeBanding

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

CampoTipoObbligatorioDescrizione
topstringno—
rightstringno—
bottomstringno—
leftstringno—

MachiningOp

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

CampoTipoObbligatorioDescrizione
typeIdstringsì—
qtyintegersì—
paramsobjectnoOpen 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

CampoTipoObbligatorioDescrizione
materialIdstringsì—
wnumbersì—
hnumbersì—
qtyintegersì—

HardwareLine

CampoTipoObbligatorioDescrizione
hardwareIdstringsì—
qtyintegersì—

BondedPanel

CampoTipoObbligatorioDescrizione
idstringsì—
wnumbersì—
hnumbersì—
qtyintegersì—
layersBondedLayer[]sì—
namestringno—

BondedLayer

CampoTipoObbligatorioDescrizione
materialIdstringsì—
thicknessMmnumbersì—

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

CampoTipoObbligatorioDescrizione
mode"panel2d"sìThe mode tag — INSIDE the plan so planHash covers it; must equal $.workflow.mode (D15).
engine"heuristic" | "balanced" | "max"sì—
engineVersionstringsì—
deterministicbooleansì—
sheetsSheet[]sì—
metricsMetrics2Dsì—
cutPlanarray | nullsìnull when the layout is not guillotine.
unplacedUnplaced2D[]sì—
warningsstring[]sì—
guillotineValidbooleansì—
planHashstringsìsha256 hex of canonicalize(plan without planHash) — RFC 8785; covers `mode`.

Sheet

= ApiSheet (types.ts).

CampoTipoObbligatorioDescrizione
wnumbersì—
hnumbersì—
pricenumber | nullsìThe engine's unit-less per-sheet price; the issuer passes null.
partsPlacedPart2D[]sì—
offcutsRect[]no—
materialstringno—
grain"w" | "h"no—
metaobjectno—

PlacedPart2D

= ApiPlacedPart2D (types.ts).

CampoTipoObbligatorioDescrizione
namestringsì—
xnumbersì—
ynumbersì—
wnumbersì—
hnumbersì—
rotatedbooleansì—
metaobjectno—

Rect

= ApiRect (types.ts).

CampoTipoObbligatorioDescrizione
xnumbersì—
ynumbersì—
wnumbersì—
hnumbersì—

Metrics2D

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

CampoTipoObbligatorioDescrizione
sheetCountintegersì—
yieldPctnumbersì—
placedintegersì—
totalintegersì—
cutLinesintegersì—
sawPassesintegersì—
cutLengthnumbersì—
totalPricenumbersì—

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.

CampoTipoObbligatorioDescrizione
sheetintegersì—
stepintegersì—
axis"h" | "v"sì—
posnumbersì—
lengthnumbersì—
stageintegersì—

Unplaced2D

= ApiUnplaced2D (types.ts).

CampoTipoObbligatorioDescrizione
namestringsì—
wnumbersì—
hnumbersì—
qtyintegersì—

Quote

CampoTipoObbligatorioDescrizione
pricedbooleansìfalse under pricingMode = external: lines carry quantities, every amount is 0.
linesQuoteLine[]sì—
totalsTotalssì—
quoteTokenstringsìSee x-cfg-quote-token. The merchant's server verifies it with the tenant's key (P4-02 /quote/verify).

QuoteLine

CampoTipoObbligatorioDescrizione
idstringsì—
type"cutPart" | "fullSheet" | "hardware" | "machining" | "bondedPanel" | "edging" | "surcharge" | "shipping" | "tax"sì—
labelstringsì—
qtynumbersìPieces, sheets, metres (edging) — the line's own unit.
unitAmountMoneysì—
amountMoneysìLine total after the tenant's rounding. Σ non-tax amounts = totals.net.
refLineRefno—
metaobjectno—

LineRef

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

CampoTipoObbligatorioDescrizione
partIdstringno—
materialIdstringno—
edgingIdstringno—
hardwareIdstringno—
machiningIdstringno—
zoneIdstringno—
ruleIdstringno—
bondedPanelIdstringno—

Totals

CampoTipoObbligatorioDescrizione
netMoneysì—
taxMoneysì—
grossMoneysì—

Money

CampoTipoObbligatorioDescrizione
amountMinorintegersì—
currencystringsì—

OrderShipping

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

CampoTipoObbligatorioDescrizione
method"delivery" | "pickup"sì—
zoneIdstringno—
pickupLocationIdstringno—

FileRef

CampoTipoObbligatorioDescrizione
kind"pdf" | "labels" | "csv" | "dxf" | "svg" | "xlsx" | "json"sì—
urlstringsì—
sha256stringno—
bytesintegerno—

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

CampoTipoObbligatorioDescrizione
alg"HMAC-SHA256"sì—
keyIdstringsì—
valuestringsì—

Qui non c'è un pulsante "provalo" di proposito: la chiave segreta appartiene al tuo server, mai a un browser. Lo shop demo mostra l'incorporamento e il passaggio dell'ordine in funzione da un capo all'altro.

Note legaliCondizioni del configuratore (EN) ·Accordo sul trattamento dei dati (EN) ·Informativa privacy per gli acquirenti ·Licenze di terze parti (EN)