Skip to content

Order commands: create, get, list

The Order Verbs create, get, list as CLI commands, with inputs, result, refusals and an example.

Reference for Order, one group of Order commands.

Order.create

Creates an Order. Verb page.

Text
npx startup-builder do Order.create --json '<input>' [--try | --send | --do]

Emits Order.created.

Inputs

InputTypeRequiredDescription
totalmoneyrequiredThe amount charged.
merchantOfRecordPartyThe Party that charges and books the revenue.
outsidebooleanComputed: true when its Customer shares no owner, Studio account, Agreement, or sibling chain with the Startup.
linesjsonEach Offer bought, its quantity, amount and the Party that charges for it; a Service line carries its own verdict.
fulfillmentstringWhere a Service Order’s work stands between paid and fulfilled.
paymentstringauthorized when the Quote is accepted; captured on the Event the Outcome Contract earns names.
revisionsUsedintegerRevisions the Customer has asked for, counted against the Outcome Contract’s revisions.
risknumberThe payment’s fraud risk score from 0 to 99 at screening, as Stripe scored it.
taxmoneyThe sales tax, VAT or GST computed at placement for the buyer’s location and the Offer’s tax category.
taxJurisdictionstringWhere the tax is owed, such as US-CA or EU-DE, or none when no registration applies.
briefjsonThe scope a Service Order bought, from its Quote request: sizes, inputs and turnaround. Intake checks the inputs against it.
dueAtdatetimeWhen a Service Order’s work is due; time waiting on the Customer moves it later.
collectedBystringThe id of the venue that charged the buyer and pays the Startup; unset when the Startup’s own checkout collected.
customerCustomerA Customer commits to one-time purchases as Orders.

Returns

OutputTypeRequiredDescription
orderOrderrequiredThe Order.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
npx startup-builder do Order.create --json '{"total":{"amount":29,"currency":"USD"}}'

Order.get

Returns one Order by id. Verb page.

Text
npx startup-builder do Order.get --json '<input>' [--try]

Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Order.
atstringA time or Version name: the record as it stood then. Unset: as it stands now.

Returns

OutputTypeRequiredDescription
orderOrderrequiredThe Order.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
npx startup-builder do Order.get --json '{"id":"order_dswDnxf2vt"}'

Order.list

Returns Orders, newest first, one page at a time. Verb page.

Text
npx startup-builder do Order.list --json '<input>' [--try]

Reads only: it emits no Event.

Inputs

InputTypeRequiredDescription
limitintegerAt most this many records, up to 100. The default is 20.
afterstringThe cursor from the previous page.
wherestringA filter over the properties, such as paidAt = null and total.amount > 500.
sortstringProperties to sort by, comma-separated; a leading minus sorts descending.
totalbooleanTrue adds the match count as meta.total, exact up to 10,000 matches and estimated above.
facetsstringProperties to count by value, comma-separated, returned as meta.facets.
fieldsstringProperties to return on each record, comma-separated; $id and $type always return.
includestringRelated records to embed in place of their URLs, comma-separated.
depthintegerHow many levels of related records to embed. The default is 1.
qstringWords to match across the text properties, ranked by relevance.
matchstringRanks the search by words, or meaning; words is the default.

Returns

OutputTypeRequiredDescription
orderslist of OrderrequiredOne page of Orders.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
npx startup-builder do Order.list --json '{"limit":20}'