Skip to main content
POST
Compose a demand exchange revision

Authorizations

Authorization
string
header
required

API key or access token

Path Parameters

runId
integer
required

Surrogate id of the chef compose run that anchors this exchange (the demand-inbox ledger row id).

Required range: 1 <= x <= 9007199254740991
Example:

42

Body

application/json

Declare posture, price, and product-count overrides in the merchandising simulator's own grammar and compose a silent draft revision through the real merchandising engine.

overrides
object
required

Response

Compose a demand exchange revision

A seller-composed adjustment to a live demand exchange: silent while draft or awaiting approval, and a real pass on the exchange's compose run once sent.

id
string
required
exchangeId
string
required
state
enum<string>
required
Available options:
draft,
awaiting_approval,
sent,
discarded
overrides
object
required
composeResult
enum<string>
required
Available options:
ok,
error
composeError
object | null
required

The merchandising engine's own error, kept mounted (with the seller's declared overrides) when composition failed, rather than the sheet being torn down.

proposalPreview
any | null
required

The draft response envelope, in the same shape the canonical proposal card already renders (redacted). Null when compose failed.

proposalPreviewSnapshots
any | null
required

The draft product snapshots keyed by product id, paired with proposalPreview so the canonical proposal card renders a draft with no builder-specific projection. Null when compose failed.

settlementCurrency
string | null
required
buyerStatedCurrencies
string[] | null
required

Read once from the persisted brief request at compose time. A draft never converts into these or issues a rate hold — that is the buyer-facing response path's job, not a discardable draft's.

composedByUserId
integer | null
required
Required range: -9007199254740991 <= x <= 9007199254740991
composedAt
string
required
approval
object
required
send
object
required

How a sent revision cleared. Null until sent. An auto send never carries a human decision record.

sentProposalArtifactId
string | null
required
delivery
object | null
required

Truthful buyer-visibility (build-5 ruling): null until sent. A sent revision always reports not_delivered/no_delivery_lane today — investigation found no seller-to-buyer lane for a subsequent proposal and no honest staging lane either. The UI states the buyer's agent was not notified; it never claims a notification that did not happen.

canApprove
boolean
required

False when the caller is this revision's own composer (maker-checker) or the revision is not awaiting approval.

canAmend
boolean
required

True for a draft (fresh or bounced back after rejection) composed by the caller; false once submitted, sent, or discarded, or when a different storefront user composed it.

canSubmit
boolean
required

True when the caller composed this draft, it hasn't been submitted, sent, or discarded, and its last compose succeeded. A draft whose compose failed can only be discarded or re-composed via amend.

canDiscard
boolean
required

True for a draft (fresh or bounced back after rejection) composed by the caller; false once submitted, sent, or discarded, or when a different storefront user composed it.

submissionGeneration
integer
required

Bumped on every submit, resubmit, and amend. A decision must be made against this exact value or it is refused as stale.

Required range: -9007199254740991 <= x <= 9007199254740991
amendCount
integer
required

How many times this row has been amended in place. Counts toward the lifetime adjustment cap alongside the row itself.

Required range: -9007199254740991 <= x <= 9007199254740991