Aller au contenu principal
← Référence de l’API

Le document order.v1

Chaque commande enregistrée par le Configurator est un document order.v1 signé : le workflow dans lequel elle a été créée, la liste de découpe, le plan de production, le devis chiffré avec son jeton, et son origine. Il ne contient aucune donnée personnelle, seulement votre customerRef opaque.

Les chemins, noms de champs, codes d’erreur, noms d’en-têtes et exemples de code restent en anglais : ils font partie du contrat.

Règles valables pour chaque commande

  • Toute longueur est en millimètres ; unit n’est que l’unité d’affichage.
  • Tout montant est un Money en unités mineures entières, et chaque devise est égale à la currency de la commande.
  • Une commande correspond à un workflow : workflow.mode choisit la forme de la liste de découpe et du plan (aujourd’hui panel2d).
  • plan.planHash est le SHA-256 du plan canonique ; le jeton de devis le lie, de sorte qu’un plan modifié est détecté.
  • Le document est fermé et uniquement additif au sein de la v1 : les nouveaux champs sont optionnels, rien n’est supprimé ni renommé.

Champs

Les tableaux ci-dessous sont générés à partir du schéma JSON lui-même ; le même schéma est intégré, tel quel, dans le document OpenAPI.

Les descriptions de ce tableau proviennent du contrat en anglais (le schéma JSON ou le document OpenAPI).

Order

ChampTypeObligatoireDescription
schemaVersion1oui—
idempotencyKeystringouiThe caller's replay key for POST /cfg/v1/order (P2-09): the same key returns the same order.
tenantIdstringoui—
configVersionintegerouiThe 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).
workflowWorkflowoui—
customerRefstringnonOpaque reference into the merchant's own customer records. Never a name or an address.
customerGroupstringnonThe tenant-config customer group the price list was chosen for.
locale"en" | "de" | "it" | "fr" | "pl" | "cs" | "ro" | "hu" | "es" | "hr"oui—
unit"mm" | "cm" | "in"ouiDisplay unit at ordering time; every length in this document is millimetres.
currencystringoui—
pricingMode"platform" | "external"oui—
createdAtstringoui—
expiresAtstringouiQuote validity; equals the token's exp.
sourceSourceoui—
cutListCutPart[]ouiMODE-DISCRIMINATED by workflow.mode (Order.allOf). One branch today: panel2d CutPart.
fullSheetsFullSheetItem[]ouiFull stock units bought uncut. MODE-DISCRIMINATED; panel2d: whole sheets.
hardwareHardwareLine[]ouiMode-independent (catalogue hardware).
bondedPanelsBondedPanel[]nonGlued multi-layer panels (P5-05). MODE-DISCRIMINATED; panel2d only today. Shape may gain optional fields there; this is the v1 minimum.
planPlanouiMODE-DISCRIMINATED; the plan carries its own `mode` tag (= workflow.mode), covered by planHash.
quoteQuoteoui—
shippingOrderShippingnon—
filesFileRef[]non—
signatureSignaturenon—

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

ChampTypeObligatoireDescription
idstringoui—
mode"panel2d"ouiA BUILT mode (x-cfg-modes.built). Reserved ⇒ `mode_unavailable`; unknown ⇒ `enum`.
profile"furniture"oui—

Source

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

ChampTypeObligatoireDescription
embedVersionstringoui—
engineVersionstringoui= plan.engineVersion (the Engine API's engineVersion).
configVersionintegeroui= $.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).

ChampTypeObligatoireDescription
idstringoui—
namestringouiNo C0/C1 control characters (audit P7-01 F1: a newline in a name wrote DXF entities).
wnumberouiThe size the engine was given (after the tenant's dimension convention / edging deduction were applied).
hnumberoui—
qtyintegeroui—
materialstringouiCatalogue MaterialItem.id (the API's material partition key).
rotatablebooleannon—
grain"w" | "h"non—
grainGroupstringnon—
prioritybooleannon—
edgeBandingEdgeBandingnon—
metaobjectnonOpaque passthrough (= ApiPart2D.meta), ≤ 2048 bytes canonical.
groupstringnonRoom / cabinet / project the customer assigned; printed on labels and exports.
machiningMachiningOp[]non—

EdgeBanding

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

ChampTypeObligatoireDescription
topstringnon—
rightstringnon—
bottomstringnon—
leftstringnon—

MachiningOp

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

ChampTypeObligatoireDescription
typeIdstringoui—
qtyintegeroui—
paramsobjectnonOpen 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

ChampTypeObligatoireDescription
materialIdstringoui—
wnumberoui—
hnumberoui—
qtyintegeroui—

HardwareLine

ChampTypeObligatoireDescription
hardwareIdstringoui—
qtyintegeroui—

BondedPanel

ChampTypeObligatoireDescription
idstringoui—
wnumberoui—
hnumberoui—
qtyintegeroui—
layersBondedLayer[]oui—
namestringnon—

BondedLayer

ChampTypeObligatoireDescription
materialIdstringoui—
thicknessMmnumberoui—

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

ChampTypeObligatoireDescription
mode"panel2d"ouiThe mode tag — INSIDE the plan so planHash covers it; must equal $.workflow.mode (D15).
engine"heuristic" | "balanced" | "max"oui—
engineVersionstringoui—
deterministicbooleanoui—
sheetsSheet[]oui—
metricsMetrics2Doui—
cutPlanarray | nullouinull when the layout is not guillotine.
unplacedUnplaced2D[]oui—
warningsstring[]oui—
guillotineValidbooleanoui—
planHashstringouisha256 hex of canonicalize(plan without planHash) — RFC 8785; covers `mode`.

Sheet

= ApiSheet (types.ts).

ChampTypeObligatoireDescription
wnumberoui—
hnumberoui—
pricenumber | nullouiThe engine's unit-less per-sheet price; the issuer passes null.
partsPlacedPart2D[]oui—
offcutsRect[]non—
materialstringnon—
grain"w" | "h"non—
metaobjectnon—

PlacedPart2D

= ApiPlacedPart2D (types.ts).

ChampTypeObligatoireDescription
namestringoui—
xnumberoui—
ynumberoui—
wnumberoui—
hnumberoui—
rotatedbooleanoui—
metaobjectnon—

Rect

= ApiRect (types.ts).

ChampTypeObligatoireDescription
xnumberoui—
ynumberoui—
wnumberoui—
hnumberoui—

Metrics2D

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

ChampTypeObligatoireDescription
sheetCountintegeroui—
yieldPctnumberoui—
placedintegeroui—
totalintegeroui—
cutLinesintegeroui—
sawPassesintegeroui—
cutLengthnumberoui—
totalPricenumberoui—

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.

ChampTypeObligatoireDescription
sheetintegeroui—
stepintegeroui—
axis"h" | "v"oui—
posnumberoui—
lengthnumberoui—
stageintegeroui—

Unplaced2D

= ApiUnplaced2D (types.ts).

ChampTypeObligatoireDescription
namestringoui—
wnumberoui—
hnumberoui—
qtyintegeroui—

Quote

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

QuoteLine

ChampTypeObligatoireDescription
idstringoui—
type"cutPart" | "fullSheet" | "hardware" | "machining" | "bondedPanel" | "edging" | "surcharge" | "shipping" | "tax"oui—
labelstringoui—
qtynumberouiPieces, sheets, metres (edging) — the line's own unit.
unitAmountMoneyoui—
amountMoneyouiLine total after the tenant's rounding. Σ non-tax amounts = totals.net.
refLineRefnon—
metaobjectnon—

LineRef

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

ChampTypeObligatoireDescription
partIdstringnon—
materialIdstringnon—
edgingIdstringnon—
hardwareIdstringnon—
machiningIdstringnon—
zoneIdstringnon—
ruleIdstringnon—
bondedPanelIdstringnon—

Totals

ChampTypeObligatoireDescription
netMoneyoui—
taxMoneyoui—
grossMoneyoui—

Money

ChampTypeObligatoireDescription
amountMinorintegeroui—
currencystringoui—

OrderShipping

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

ChampTypeObligatoireDescription
method"delivery" | "pickup"oui—
zoneIdstringnon—
pickupLocationIdstringnon—

FileRef

ChampTypeObligatoireDescription
kind"pdf" | "labels" | "csv" | "dxf" | "svg" | "xlsx" | "json"oui—
urlstringoui—
sha256stringnon—
bytesintegernon—

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

ChampTypeObligatoireDescription
alg"HMAC-SHA256"oui—
keyIdstringoui—
valuestringoui—

Il n’y a volontairement pas de bouton « essayer » ici : la clé secrète appartient à votre serveur, jamais à un navigateur. La boutique de démonstration montre l’intégration et la transmission de la commande de bout en bout.

Mentions légalesConditions du configurateur (EN) ·Accord de traitement des données (EN) ·Notice de confidentialité pour les acheteurs ·Licences tierces (EN)