HandToHuman CLI reference All commands
DocsCLImarketmarket order-create

Public command

market order-create

Reserve active offer capacity and create an unfunded order.

Exact invocation
handtohuman market order-create <BUYER_ID> <OFFER_ID> [--units <COUNT>] (--request <FILE> | --draft <DRAFT_ID>)
01

Inputs and options

<BUYER_ID>

Required existing customer or dual-role account.

<OFFER_ID>

Required existing offer id.

--units <COUNT>

Optional positive unit count; defaults to 1.

--request <FILE>

File containing the kind-specific request as valid JSON. Required unless --draft is used.

--draft <DRAFT_ID>

Existing retained work request. Required unless --request is used and mutually exclusive with it.

02

Output and state effect

Result

Atomically decrements the offer’s available units, creates an order in created state, and prints the order JSON. Total cents is unit price multiplied by units. A draft-backed order preserves the complete retained request and carries its draft_id.

Serialization

Successful output is pretty-printed JSON. Marketplace leaves always print to stdout.

Refusals

  • Refuses zero or two request sources: exactly one of --request and --draft is required.
  • Refuses a missing draft or a draft whose kind differs from the offer before reserving capacity.
  • Refuses non-positive units, buyers whose role is not customer or both, inactive offers, and offers without enough capacity.
  • Refuses an overflowing order total and direct request files that are unreadable or invalid JSON.