graft orders
Orders, their lifecycle, payments and payment links.
| Command | Does |
|---|---|
graft orders create |
Create an order. |
graft orders delete |
Delete an order that is still active and release what it reserved. |
graft orders get |
One order with its lines, totals and payments. |
graft orders ledger get |
The order, every invoice against it, and what is still outstanding. |
graft orders list |
List orders. |
graft orders payment-link send |
Email the payment link to the order’s customer from Graft. |
graft orders payment-link-delete |
Remove the order’s payment link. |
graft orders payment-link-set |
Attach a Stripe Payment Link (https://buy.stripe.com/…) or hosted invoice (https://invoice.stripe.com/…). |
graft orders payments |
Record money received by hand (cash, bank transfer). |
graft orders transitions |
Move the order through its lifecycle. |
graft orders update |
Change the line items, deposit, notes or customer of an order that is still active. |
graft orders create
Section titled “graft orders create”Create an order. Send line items with kind (resource, addon, fee, discount), quantity and unitAmountMinor; the server computes every amount. Money is integer minor units (cents) plus a currency code. A discount line is negative, every other kind is not.
Endpoint: POST /api/v1/orders
graft orders create -d '{"currency":"EUR","customerRecordId":"000000000000000000000020","lineItems":[{"kind":"resource","description":"24ft pontoon, 4 hours","quantity":1,"unitAmountMinor":60000}],"deposit":null}'graft orders delete <orderId>
Section titled “graft orders delete <orderId>”Delete an order that is still active and release what it reserved.
Endpoint: DELETE /api/v1/orders/:orderId · Arguments: <orderId>
graft orders delete <orderId>Asks for confirmation; pass --yes to skip it (required in scripts).
graft orders get <orderId>
Section titled “graft orders get <orderId>”One order with its lines, totals and payments.
Endpoint: GET /api/v1/orders/:orderId · Arguments: <orderId>
graft orders get <orderId>graft orders ledger get <orderId>
Section titled “graft orders ledger get <orderId>”The order, every invoice against it, and what is still outstanding.
Endpoint: GET /api/v1/orders/:orderId/ledger · Arguments: <orderId>
graft orders ledger get <orderId>graft orders list
Section titled “graft orders list”List orders. Cursor-paginated: pass limit (default 25, max 100) and cursor from the previous response’s meta.cursor. Filter with status, customerRecordId, from and to.
Endpoint: GET /api/v1/orders
graft orders listAdd --all to fetch every page.
graft orders payment-link send <orderId>
Section titled “graft orders payment-link send <orderId>”Email the payment link to the order’s customer from Graft. Replies go to the sender. No body.
Endpoint: POST /api/v1/orders/:orderId/payment-link/send · Arguments: <orderId>
graft orders payment-link send <orderId>graft orders payment-link-delete <orderId>
Section titled “graft orders payment-link-delete <orderId>”Remove the order’s payment link.
Endpoint: DELETE /api/v1/orders/:orderId/payment-link · Arguments: <orderId>
graft orders payment-link-delete <orderId>Asks for confirmation; pass --yes to skip it (required in scripts).
graft orders payment-link-set <orderId>
Section titled “graft orders payment-link-set <orderId>”Attach a Stripe Payment Link (https://buy.stripe.com/…) or hosted invoice (https://invoice.stripe.com/…). Any other host is refused.
Endpoint: PUT /api/v1/orders/:orderId/payment-link · Arguments: <orderId>
graft orders payment-link-set <orderId> -d '{"url":"https://buy.stripe.com/test_abc123"}'graft orders payments <orderId>
Section titled “graft orders payments <orderId>”Record money received by hand (cash, bank transfer).
Endpoint: POST /api/v1/orders/:orderId/payments · Arguments: <orderId>
graft orders payments <orderId> -d '{"amountMinor":15000,"reference":"Bank transfer 4421"}'graft orders transitions <orderId>
Section titled “graft orders transitions <orderId>”Move the order through its lifecycle. Allowed: draft to pending_payment, confirmed or cancelled; pending_payment to confirmed or cancelled; confirmed to in_progress, completed or cancelled; in_progress to completed or cancelled. completed and cancelled are final. Anything else is 409 CONFLICT.
Endpoint: POST /api/v1/orders/:orderId/transitions · Arguments: <orderId>
graft orders transitions <orderId> -d '{"status":"confirmed"}'graft orders update <orderId>
Section titled “graft orders update <orderId>”Change the line items, deposit, notes or customer of an order that is still active.
Endpoint: PATCH /api/v1/orders/:orderId · Arguments: <orderId>
graft orders update <orderId>