HandToHuman CLI reference All commands
DocsCLImarket campaign-order

Public command

market campaign-order

Place one order inside a campaign, drawn against its budget.

Exact invocation
handtohuman market campaign-order <CAMPAIGN_ID> <OFFER_ID> [--units <N>] --request <FILE>
01

Inputs and options

<CAMPAIGN_ID>

An open campaign.

<OFFER_ID>

A supplier offer of the campaign’s kind and currency.

--units <N>

Units bought; defaults to 1.

--request <FILE>

File holding the order request JSON.

02

Output and state effect

Result

Creates an order for the campaign’s buyer and stamps it with the campaign id. The order reserves its total plus the campaign’s bonus cap against the remaining budget.

Serialization

Prints the resulting order as pretty-printed JSON, campaign_id included.

Refusals

  • A closed campaign refuses with its state.
  • An offer of another kind refuses with campaign <id> buys <kind> and this offer sells <kind>; a currency mismatch refuses too.
  • All spots filled refuses with campaign <id> has all <n> spots filled.
  • Insufficient budget refuses with campaign <id> has <n> left and this order reserves <n>.