SalesOrders

Edits a sales order's header — the app's inline edits on the Details page (order number, PO, terms, dates, notes, tax rate, shipping cost).

Requires ManageSalesOrders and an Idempotency-Key header. Partial update: omitted members are unchanged, "" clears an optional text field, clearRequestedDeliveryDate: true clears the date. Example: { "shippingCost": 25.00, "taxRate": 8.25 }. Same code path and rules as the Details page: every field is checked before anything is written; a tax-rate or shipping change recomputes taxAmount / totalAmount and the payment status and updates the order's draft invoices (their subtotal, tax rate and "Shipping & Handling" line). updatedAt moves; no history entry is written (as in the app). Complete and Cancelled orders cannot be edited.

patch/api/v1/sales-orders/{id}

Request

  • Base URL: https://app.flexonthejob.com
  • URL: https://app.flexonthejob.com/api/v1/sales-orders/{id}
  • Auth: HTTP bearer

Path parameters

idinteger required

Sales-order id. Example: 318.

Request body

orderNumberstring nullable

New order number, 1–50 characters after trimming (blank is 422). Example: SO26090007-B.

customerPONumberstring nullable

The customer's purchase-order reference, up to 100 characters; "" clears it. Example: PO-7781.

paymentTermsstring nullable

Payment terms: one of Due on Receipt, Net 15, Net 30, Net 45, Net 60, COD, Prepaid (the Details page's list; anything else is 422); "" clears them. Example: Net 30.

requestedDeliveryDatestring date-time nullable

Requested delivery date, an organization-local calendar date (yyyy-MM-dd, no UTC offset). Example: 2026-09-30.

clearRequestedDeliveryDateboolean

true clears the requested delivery date; then omit requestedDeliveryDate. Default false.

notesstring nullable

Free-text notes on the order, stored as sent; "" clears them. Example: Leave at loading dock.

taxRatenumber double nullable

Tax rate in percent, 0–100 (8.25 = 8.25 %); must stay 0 for a tax-exempt customer (422). Recomputes taxAmount and totalAmount. Example: 8.25.

shippingCostnumber double nullable

Shipping charged on the order, in the organization's currency, 0–1,000,000,000. Recomputes totalAmount; draft invoices get a matching "Shipping & Handling" line. Example: 25.00.

Response

Updated; body is the order as GET /api/v1/sales-orders/{id} returns it.

idinteger

Numeric id used in /api/v1/sales-orders/{id}. Unique within this organization. Example: 318.

syncIdstring uuid

Stable cross-device identifier (GUID) — also the pagination cursor value. Example: 7b1e2c3d-4f5a-4b6c-9d8e-0f1a2b3c4d5e.

orderNumberstring

Order number assigned by the app, SO + two-digit year + two-digit month + a four-digit sequence per month. Example: SO26090007.

statusstring

Order status. One of Pending (created, lines can be added, fulfilment not started or not covering every line), Picking (a pick transfer covers every line and items are being picked), Packed (everything picked), Shipped (every transfer has shipping info), Delivered (every transfer completed), Complete (terminal: marked complete, or delivered and fully invoiced and paid) and Cancelled (terminal). Legacy rows may still say the deprecated Confirmed. Over the API /fulfill starts fulfilment and the later statuses follow from /pick, /complete-pick, /ship and /deliver, as in the app.

paymentStatusstring nullable

Payment status: Pending, Partial, Paid, Overdue, Refunded, Invoiced or Cancelled. Example: Pending. Null on some legacy rows.

fulfillmentStatusstring nullable

Aggregate status of the order's transfers (the earliest one wins): None (no transfer yet), Draft, Pending, InTransit, AtWaypoint, InTransitToWaypoint, InTransitToDestination, Completed, Cancelled, Failed. Example: Pending.

customerIdinteger

Customer id (see /api/v1/customers/{id}). Example: 42.

customerNamestring nullable

Customer name at read time. Example: Acme Plumbing.

customerPONumberstring nullable

The customer's own purchase-order reference; null when none. Example: PO-7781.

orderDatestring date-time

Order date as entered in the app: the organization's local calendar date with no UTC offset (not an instant; do not convert it between time zones). Example: 2026-09-23T00:00:00.

requestedDeliveryDatestring date-time nullable

Requested delivery date, same organization-local calendar-date format as orderDate; null when none. Example: 2026-09-30T00:00:00.

subTotalnumber double

Sum of the line totals, in the organization's currency. Example: 1250.00.

taxRatenumber double

Tax rate in percent (8.25 = 8.25 %). 0 for a tax-exempt customer. Example: 8.25.

taxAmountnumber double

Tax, subTotal × taxRate / 100, in the organization's currency. Example: 103.13.

shippingCostnumber double

Shipping charged on the order, in the organization's currency. Example: 25.00.

totalAmountnumber double

Order total, subTotal + taxAmount + shippingCost, in the organization's currency. Example: 1378.13.

amountPaidnumber double

Amount paid so far, in the organization's currency. Example: 500.00.

balanceDuenumber double

Still owed: totalAmount − amountPaid − store credit applied, in the organization's currency. Example: 878.13.

lineCountinteger

Number of lines on the order (removed lines excluded). Example: 3.

createdAtstring date-time

Creation time, ISO-8601 UTC. Example: 2026-09-23T14:05:00Z.

updatedAtstring date-time nullable

Last recorded modification (header or line edits, lines added or removed, status change, fulfilment and pick progress, fulfillmentStatus change), ISO-8601 UTC; null when never modified since creation. Payments do not move it (paymentStatus / amountPaid / balanceDue can change without it). Example: 2026-09-23T15:12:00Z.

deliveryAddressIdinteger nullable

Id of the customer address the order is delivered to; null when none. Example: 77.

paymentTermsstring nullable

Payment terms text. Example: Net 30. Null when none.

notesstring nullable

Free-text notes on the order. Example: Leave at loading dock. Null when none.

Changes

No recorded changes to this operation across all 1 revision of this API.