WinFactor Docs

Configuration Sessions

Read a live configuration session and write price adjustments

Both endpoints authenticate via the capability token in the path — delivered inside pricing.calculated events, rotated per event. No Authorization header. Concepts and full examples: Configuration sessions & price adjustments.

GET /configuration-sessions/{token}

Returns the live session state.

{
  "sessionId": "k97…",
  "organizationId": "org_2abc…",
  "templateId": "k12…",
  "origin": "org_customize",
  "status": "active",
  "configuration": { "width": 2400, "height": 1800, "components": [  ] },
  "configHash": "sha256:7be1…",
  "submissionId": null,
  "locale": "en",
  "basePricing": { "lineItems": [  ], "subtotal": 1240.5 },
  "adjustments": { "configHash": "sha256:7be1…", "lineItems": [  ], "subtotal": 1390.5, "receivedAt": 1781100212000 }
}

status: active (customer configuring) → submitted (frozen) → expired (idle >24h). adjustments is your latest write for the current configHash, or null.

PUT /configuration-sessions/{token}/adjustments

Idempotent full replace of the visible breakdown for one configHash.

Request body:

FieldTypeNotes
configHashstringFrom the event you are answering
lineItems[]array≤200 items — becomes the entire breakdown
lineItems[].descriptionstringRequired, ≤2000 chars (HTML is stripped)
lineItems[].quantitynumber> 0
lineItems[].unitPricenumber≥ 0 — subtotal is computed server-side
lineItems[].itemTypestring?window door panel separator labor material other
lineItems[].itemKeystring?Echoed from base items; preserved for your reference
lineItems[].sortOffsetnumber?Display order
lineItems[].externalRefstring?Your identifier, round-tripped

Responses: 200 { "applied": true, "isCurrentConfiguration": true|false } · 409 stale_config_hash (+ details.currentConfigHash) · 403 window_expired · 410 session_expired · 422 validation_error · 401 unauthorized.

On this page