PurchaseOrders

Receives purchase-order lines into stock (the app's receiving panel).

Requires ManagePurchaseOrders and an Idempotency-Key header. Body: { "lines": [ { "lineId": 1207, "quantity": 4 }, { "lineId": 1208, "quantity": 1, "locationId": 11 } ] }. Same code path and rules as receiving in the app: only an order whose status is Delivered or PartialReceived can be received (409 otherwise, e.g. for a Cancelled, Ordered or fully Received order); every line is checked before anything is written (one bad line and nothing is received); a quantity above the line's quantityRemaining is refused (over-receipt, also when a concurrent receipt of the same line got there first); locationId defaults to the order's receivingLocationId. An item line creates one stock item per unit at that location, with the template's properties, barcodes and category, a Cost property from the line's unitPrice, and Shipping Cost / Total Cost properties when the line is on a shipment with a shipping cost; a bundle line creates one bundle per unit with its items. The order status is then recomputed from its shipments: it becomes Received when every unit is received and every shipment is delivered, otherwise PartialReceived. The receipt is attributed to the key's creator. Returns the order as GET /api/v1/purchase-orders/{id} does.

post/api/v1/purchase-orders/{id}/receive

Request

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

Path parameters

idinteger required

Purchase-order id from /api/v1/purchase-orders. Example: 412.

Request body

Response

The purchase order after the receipt.

idinteger

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

syncIdstring uuid

Stable cross-device identifier (GUID) — also the pagination cursor value. Example: 3c9d1a2b-7e4f-4b6a-8c1d-5e6f7a8b9c0d.

orderNumberstring

The organization's purchase-order number. Example: PO-ACME-20260915-01.

externalOrderNumberstring nullable

The vendor's own order or confirmation number; null when not recorded. Example: SO-88213.

statusstring

Order status name, derived by the app from the order's shipments and received quantities. One of Draft (no shipment yet), Ordered, Shipped, PartialShipped, Delivered (at the receiving location, nothing received yet), PartialReceived, Received (every unit received and every shipment delivered), Cancelled.

vendorIdinteger nullable

Id of the vendor record; null for a one-off vendor typed on the order.

vendorNamestring nullable

Vendor name (the vendor record's name, else the one-off name on the order). Example: Acme Supply. Null when neither is set.

orderDatestring date-time

Order date as entered in the app: the organization's local calendar date, yyyy-MM-ddT00:00:00 with no UTC offset (the date-time format here is a local date, not an RFC 3339 instant; do not convert it between time zones). Example: 2026-09-15T00:00:00.

expectedDeliveryDatestring date-time nullable

Expected delivery date as entered in the app, same local calendar-date format as orderDate (no UTC offset). Example: 2026-09-22T00:00:00. Null when unknown.

receivedDatestring date-time nullable

When the order became fully Received, ISO-8601 UTC; null until then.

totalCostnumber double nullable

Order total in currency as recorded on the order; null when not calculated. Example: 1249.50.

currencystring

ISO-4217 currency code of the prices on the order. Example: USD.

receivingLocationIdinteger

Id of the location stock is received at by default (see /api/v1/locations). Example: 10.

receivingLocationNamestring nullable

Name of receivingLocationId. Example: Main Warehouse.

lineCountinteger

Number of lines on the order. Example: 3.

quantityOrderedinteger

Units ordered across all lines. Example: 40.

quantityReceivedinteger

Units received across all lines. Example: 25.

createdAtstring date-time

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

updatedAtstring date-time nullable

Last modification time (including a receipt), ISO-8601 UTC; null when never modified since creation.

notesstring nullable

Free-text notes on the order. Example: Deliver to dock 3. Null when none.

Changes

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