Factuarea APIDevelopers
Added

Purchase orders, receipts and reorder: lifecycle, receiving, invoice matching and scanner

The purchase order lifecycle and its reads, editable receipts with a receiving plan and a printable sheet, a preview and a lock for reorder acceptance, invoice matching with candidates and unlinking, the scanner's order preview and the product reorder point. 8 new operations, 90 updated ones, 8 new MCP tools and 1 new rejection code.

2 December 2026 — The purchasing side of the omnichannel ERP gains the operations that take a purchase order from draft to receipt and invoice: a lifecycle the order publishes in full, receipts that can be edited and printed, a receiving plan, a reorder that can be previewed before it is accepted, invoice matching that can be read, unlinked and offered as candidates, and a reorder point on the product. The company axis (/v1/companies/{company}/…) is unchanged, and no operation is removed or renamed.

What is new

  • Purchase orders, 2 new operations. purchase_orders.receiving_plan (GET …/receiving-plan) returns what each line can still receive and into which warehouse, and purchase_orders.activities lists the activity feed of the order.
  • Receipts, 2 new operations. goods_receipts.update (PATCH …) edits a receipt that is not posted, and goods_receipts.sheet produces its printable receiving sheet.
  • Invoice matching, 3 new operations. purchase_invoices.match.show reads the match of a purchase invoice, purchase_invoices.match.candidates lists the orders it can be linked to, and purchase_invoices.match.unlink removes the link.
  • Reorder, 1 new operation. purchase_reorder_suggestions.preview shows what accepting a suggestion would create, without creating anything.
  • MCP. 8 new tools: get_purchase_order_receiving_plan, list_purchase_order_activities, update_goods_receipt, get_goods_receipt_sheet, get_purchase_invoice_match, list_purchase_invoice_match_candidates, unlink_purchase_invoice_match and preview_purchase_reorder_suggestions. Twenty-eight existing tools publish a new description or input schema, and the tools that preview an import, return a purchase scan or convert a sales order into delivery notes publish the same changes as their operations. See the tool catalog.
  • Rejection codes. 1 new code, goods_receipt_sheet_not_available (422), and 12 new subcodes of business_rule_violation, resource_already_exists and resource_locked, listed below. See All rejection codes. The purchase order import has its own row code, SUPPLIER_ROLE_MISSING, for a contact without the supplier role.

Summary by group

  • Purchase order. The resource publishes lifecycle, origin, fulfilment, can_receive, next_step and invoices[]. Each line adds additional_description, invoiced_quantity and invoiced_base_quantity. The list accepts the filters pending, delivery and invoice, stats publishes portfolio, PATCH takes lines[] and adjust_quantity, and the lifecycle actions take their optional fields. See Purchasing and receiving.
  • Receipt. Editing, supplier_delivery_note, location_id, the filter purchase_order_reference, the receiving plan and the sheet.
  • Reorder. The list publishes urgency_rank, trigger, not_actionable_code, expected_date, is_overdue, days_overdue and days_in_grace, accepting takes the lock reorder_accept_in_progress, and the product publishes reorder_point and reorder_quantity.
  • Matching and scanner. effect, tolerance, purchase_order_id, match_status, purchase_scan_id and received_unbilled[] on the match, and the preview of an order through include=order_preview on the scan. See Document scanner.
  • Availability and product. The incoming figure of availability publishes is_overdue, days_overdue and days_in_grace, and the stock ledger names the receipt. See Inventory and warehouses.

Ninety operations that already existed describe more in the contract: 24 of purchase orders, 6 of receipts, 12 of purchase invoices, 2 of reorder, 8 of the purchase scanner, 13 of products, 3 of availability, 1 of the stock ledger, 2 of events, 2 of webhook deliveries, the imports of sales orders, warehouses and warehouse stock, which publish the shared import shapes, their templates and error reports, and the conversion of a sales order into delivery notes. Request and response examples are also refreshed in 42 further operations whose contract does not change.

Behaviors the contract defines

  1. Invoiced quantity counts what is matched. PurchaseOrderLine.invoiced_quantity and invoiced_base_quantity, PurchaseOrder.fulfilment and the match (purchase_orders.match, PurchaseOrderInvoice) count the invoices that are matched to the order. Cancelled invoices do not weigh in the aggregate state of the match or in the outcome of closing the order.
  2. The line discount enters the compared cost. The match compares the cost with the discount of each line applied. PurchaseInvoiceMatchLine.effect and invoiced_price_change_percent, PurchaseInvoiceMatch.effect and tolerance, and PurchaseOrderInvoice.lines[].invoiced_unit_price publish the result.
  3. Suggested reorder quantity is whole. suggested_quantity is an integer in the counting unit, and suggested_quantity_exact carries the exact value, in purchase_reorder_suggestions.list.
  4. The default concept of a new line. A line created without a concept takes the concept of the product and does not repeat the supplier reference in it. The optional additional_description of purchase_orders.create, purchase_orders.lines.create and purchase_orders.lines.update carries the free text.
  5. A repeated supplier reference names the field and the order. purchase_orders.create and purchase_orders.update respond 409 with code resource_already_exists, subcode purchase_order_already_exists, param supplier_order_reference and details.purchase_order with the id, number, supplier_name and order_date (YYYY-MM-DD) of the order that already uses it. The reference is unique per company, not per supplier, so supplier_name is the supplier of that order, which may be another one, and it is null when its contact cannot be resolved. In a batch the row fails on its own (behavior 28). The import (purchase_orders.import) and its preview (purchase_orders.preview_import) do not respond 409: they skip the document with reason already_exists, or duplicate_in_file if the reference is repeated in the file, and name the existing order in target_uuid (import) or target_id (preview).
  6. Excess and offer rejections point at the line. 422 with code goods_receipt_exceeds_ordered_quantity and param lines.N.quantity. For supplier offers, 422 with code business_rule_violation and subcodes supplier_offer_not_found (it names offer_id when an offer was indicated), supplier_offer_ambiguous and purchase_order_supplier_offers_missing, with param lines.N.offer_id or lines.N.product_id.
  7. The PDF of a draft or cancelled order. A draft carries the watermark pdf.erp.purchase_order.draft_watermark (DRAFT) and a cancelled order pdf.erp.purchase_order.cancelled_watermark (CANCELLED). In the Classic template the quantity appears in its purchase unit and the supplier reference once.
  8. A sent order accepts receipts, and posting one confirms it. Posting a receipt with goods_receipts.post moves a sent order to lifecycle confirmed, and the webhook purchase_order.confirmed carries the order in that state.
  9. A receipt without a declared warehouse asks for it when lines sit in several. 422 with code business_rule_violation, subcode goods_receipt_warehouse_ambiguous and param warehouse_id, in goods_receipts.create, goods_receipts.update and purchase_orders.receipts.create.
  10. A receipt can be saved empty. The rule of at least one line applies when it is posted: 422 with business_rule_violation and subcode goods_receipt_without_lines (param lines). Creating with the id of the client is idempotent, and an id that is not available for a new receipt responds 409 with code resource_already_exists, subcode goods_receipt_already_exists and param id. The response is the same in every case and asks for another identifier.
  11. Accepting a reorder. A repeated product responds 422 with param items.N.product_id. A simultaneous acceptance responds 409 with code resource_locked, subcode reorder_accept_in_progress and param items. A line whose tax rate cannot be resolved is omitted, and omitted[].code is tax_rate_unresolved. The drafts are created without supplier_order_reference, so accepting does not respond the 409 purchase_order_already_exists.
  12. The warehouse filter matches lines too. The parameter warehouse_id of purchase_orders.list and of the tool search_purchase_orders matches the warehouse of the header and of any line.
  13. Optional fields in the order actions. Cancelling accepts reason, confirming accepts expected_date (the date of the supplier), marking as sent accepts note and sent_on, and sending by email can save the supplier email with save_send_to_contact. A confirmation date earlier than the order responds 422 with purchase_order_expected_date_invalid and param expected_date. Saving the email without the scope contacts:write responds 403 with insufficient_scope.
  14. The task link of a goods receipt. The url of the link between a task and a goods receipt points to the receipts screen, /goods-receipts/{id}.
  15. The ledger names the receipt. StockMovement.source_label and CompanyStockMovement.source_id and source_label carry the number of the goods receipt (for example REC-2026-00031) when the source is goods_receipt, in stock_movements.list and products.stock_movements.list.
  16. Origin and lifecycle in the order and its webhooks. purchase_orders.list and purchase_orders.show publish origin and lifecycle, and so do the purchase_order.* webhooks and the events and webhook deliveries that carry them (events.list, events.show, webhook_endpoints.deliveries.list and .show).
  17. New fields, filters, operations and codes. Matching and scanner: received_unbilled (with quantity and purchase_unit_code), unposted_receipt, pending_to_receive, preview.lines[] (with include=order_preview), deviated_lines, rejected_base_quantity and excluded_line_items. Receipts: receiving-plan with warehouse_id (a uuid or none) and receipt_id, days_until_due, days_in_grace and grace_days in the purchase_order of the receipt, and the filters supplier_delivery_note and purchase_order_reference. Overdue: days_in_grace in the delivery of the order, in reorder and in incoming[] of availability, with is_overdue and days_overdue. Reorder: expected_date per row and per offer, products_with_threshold_count and products_without_threshold_count, conversion_factor and tax_source in the preview, and omitted[].code always present with offer_not_valid and quantity_not_valid. Product: reorder_point and reorder_quantity, also in the body of the product.* events. New code goods_receipt_sheet_not_available. New subcodes: purchase_invoice_not_linked, reorder_accept_in_progress, goods_receipt_not_editable, goods_receipt_warehouse_ambiguous, goods_receipt_location_invalid, purchase_order_supplier_quantity_not_divisible, purchase_order_line_identity_changed, supplier_offer_not_found, supplier_offer_ambiguous, purchase_order_expected_date_invalid, product_invalid_reorder_point and goods_receipt_already_exists.
  18. Sales reservations in the base unit. On sales-order lines that have a presentation, the reserved and available figures that stock_availability.* publish count the real units, measured in the base unit of the product. Lines without a presentation keep their figure.
  19. Lines keep the order they are sent in. purchase_orders.create keeps the lines in the order of the array, and that is the order of the document wherever it is read. In purchase_orders.update, lines replaces the set and its order: a kept line moves without changing its id, and a new one stays where it was sent.
  20. Editing a receipt keeps what the body omits. goods_receipts.update works like every other PATCH of the public API: every property of ReviseGoodsReceiptRequest is optional. null empties warehouse_id, supplier_delivery_note or notes, and received_on does not accept it. When sent, lines replaces the whole set and may be empty; when omitted, the saved lines are kept and checked again against the new header. The tool update_goods_receipt only requires id.
  21. The scanner names the chosen order. The order_matching of a purchase scan publishes purchase_order_number and purchase_order_status of the chosen order, also when it is no longer among the candidates. Both are null without a chosen order or when the order no longer exists. They come in purchase_scans.show, purchase_scans.review, purchase_scans.convert and every operation that returns the scan.
  22. The import preview shows what the execution creates. Each item of preview_import for warehouses, warehouse stock, sales orders and purchase orders publishes in header the normalized values (ISO dates, decimal strings) and the public identifiers it resolved as *_id, such as supplier_id, warehouse_id or offer_id in purchase orders. lines lists the lines as the execution will create them, without internal identifiers, and is empty for warehouses, warehouse stock and skipped documents. A skipped document carries at least its identity as read from the file.
  23. The key of a document. key in the preview, which is also the group_key of the import outcomes, is the order number, SERIES|number when the file declares a series, code#row for a warehouse and warehouse|product|variant#row for warehouse stock, without empty trailing parts: a document without a series is keyed by its number alone. A | or \ inside a value, and a leading #, are escaped with \.
  24. Templates and error reports as they are downloaded. The examples of import_template and imports.errors of warehouses, warehouse stock, sales orders and purchase orders show the downloaded file: a UTF-8 CSV with a BOM, the template with its column labels separated by ;, and the error report with the header row_number,column,field,severity,code,message,received_value, where a skipped row is a warning. A sales order over the monthly limit of the plan carries the code sales_orders_monthly_limit_exceeded, the same in the error report and in the import.
  25. The quantity of a conversion in requested_quantity. The 422 quantity rejections of conversions, such as sales_orders.convert_to_delivery_notes, carry details.line_id, details.pending and details.requested_quantity (decimal string). In the shared Error component, details.requested is the integer number of seats of contracted_seats_selection_required.
  26. A contact without the supplier role in a purchase order import. In purchase_orders.preview_import and purchase_orders.import, and in the tools preview_purchase_orders_import and import_purchase_orders, a row whose supplier_tax_id belongs to a contact of the company without the supplier role fails with the code SUPPLIER_ROLE_MISSING, and a tax ID that is no contact of the company fails with FK_NOT_FOUND. Both point at supplier_tax_id and, in the import (outcomes[].errors[] and first_diagnostics), carry params.tax_id with the tax ID of the file. Assign the supplier role to the contact and import the file again.
  27. Sending a purchase order by email. purchase_orders.send and the tool send_purchase_order respond the same: without to in the request and without an email on the supplier record, 422 with missing_required_param and param to; with the recipient resolved, a mail that cannot be queued for delivery responds 500 with send_failed. In both cases nothing is saved and the order keeps its state.
  28. A batch row with a repeated supplier reference names the order. In purchase_orders.bulk_create and the tool bulk_create_purchase_orders, a row whose supplier_order_reference another purchase order of the company already carries, also one created earlier in the same batch, fails on its own and the other rows go on. Its item in failures[] carries error_code resource_already_exists, subcode purchase_order_already_exists, param supplier_order_reference and details.purchase_order (id, number, supplier_name, order_date), the same as the 409 of the single create. The shared BulkPartialSuccessResult component declares subcode, param and details as optional on every failures[] item, and purchase_orders.bulk_create is the operation that fills them.

The activity feed of a sales order (sales_orders.activities) documents its 400 for an invalid pagination parameter.

Where to read more

Purchasing and receiving, Inventory and warehouses, Document scanner, the tool catalog and All rejection codes.

New endpoints8

EndpointDescription
GET/v1/companies/{company}/goods-receipts/{goods_receipt}/sheetDownload goods receipt sheet
PATCH/v1/companies/{company}/goods-receipts/{goods_receipt}Update a goods receipt
GET/v1/companies/{company}/purchase-invoices/{purchase_invoice}/match/candidatesList purchase orders a purchase invoice can be linked to
GET/v1/companies/{company}/purchase-invoices/{purchase_invoice}/matchGet the three-way match of a purchase invoice
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/match/unlinkUnlink a purchase invoice from its purchase order
GET/v1/companies/{company}/purchase-orders/{purchase_order}/activitiesList purchase order activity
GET/v1/companies/{company}/purchase-orders/{purchase_order}/receiving-planRetrieve the receiving plan of a purchase order
POST/v1/companies/{company}/purchase-reorder-suggestions/previewPreview the drafts of a reorder acceptance

Updated endpoints90

EndpointDescription
GET/v1/companies/{company}/eventsList all events
GET/v1/companies/{company}/events/{event}Retrieve an event
POST/v1/companies/{company}/goods-receipts/{goods_receipt}/cancelCancel a goods receipt
POST/v1/companies/{company}/goods-receiptsRegister a goods receipt
GET/v1/companies/{company}/goods-receipts/{goods_receipt}/linesList the lines of a goods receipt
GET/v1/companies/{company}/goods-receiptsList all goods receipts
POST/v1/companies/{company}/goods-receipts/{goods_receipt}/postPost a goods receipt
GET/v1/companies/{company}/goods-receipts/{goods_receipt}Retrieve a goods receipt
POST/v1/companies/{company}/products/{product}/base-unit-replacementReplace a product by changing its base unit
POST/v1/companies/{company}/productsCreate a product
POST/v1/companies/{company}/products/find-by-external-idFind a product by external ID
POST/v1/companies/{company}/products/find-by-skuFind a product by SKU
GET/v1/companies/{company}/productsList all products
GET/v1/companies/{company}/products/low-stock-reportList products below the stock threshold
GET/v1/companies/{company}/products/searchSearch products
GET/v1/companies/{company}/products/{product}Retrieve a product
GET/v1/companies/{company}/products/{product}/stock-movementsList stock movements of a product
POST/v1/companies/{company}/products/{product}/toggle-activeToggle product active state
PATCH/v1/companies/{company}/products/{product}Update a product
PATCH/v1/companies/{company}/products/{product}/stockUpdate product stock
POST/v1/companies/{company}/products/{product}/videoUpload a video to a product
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/attach-fileAttach a file to an expense
POST/v1/companies/{company}/purchase-invoicesCreate an expense
POST/v1/companies/{company}/purchase-invoices/find-by-external-idFind an expense by external ID
GET/v1/companies/{company}/purchase-invoicesList all expenses
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/mark-paidMark expense as paid
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/match/acceptAccept the deviation of a purchase invoice match
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/match/linkLink a purchase invoice to a purchase order
POST/v1/companies/{company}/purchase-invoices/{purchase_invoice}/match/rejectReject a purchase invoice match
GET/v1/companies/{company}/purchase-invoices/overdueList overdue expenses
GET/v1/companies/{company}/purchase-invoices/pendingList pending expenses
GET/v1/companies/{company}/purchase-invoices/{purchase_invoice}Retrieve an expense
PATCH/v1/companies/{company}/purchase-invoices/{purchase_invoice}Update an expense
POST/v1/companies/{company}/purchase-orders/bulk-createBulk create purchase orders
POST/v1/companies/{company}/purchase-orders/{purchase_order}/cancelCancel a purchase order
POST/v1/companies/{company}/purchase-orders/{purchase_order}/closeClose a purchase order
POST/v1/companies/{company}/purchase-orders/{purchase_order}/confirmConfirm a purchase order
POST/v1/companies/{company}/purchase-ordersCreate a purchase order
POST/v1/companies/{company}/purchase-orders/find-by-supplier-referenceFind a purchase order by supplier reference
POST/v1/companies/{company}/purchase-orders/importImport purchase orders
GET/v1/companies/{company}/purchase-orders/import/templateDownload the purchase order import template
GET/v1/companies/{company}/purchase-orders/imports/{id}/errors.csvDownload purchase order import errors
GET/v1/companies/{company}/purchase-orders/imports/{id}Retrieve a purchase order import
POST/v1/companies/{company}/purchase-orders/{purchase_order}/linesAdd a line to a purchase order
DEL/v1/companies/{company}/purchase-orders/{purchase_order}/lines/{line}Delete a line of a purchase order
GET/v1/companies/{company}/purchase-orders/{purchase_order}/linesList the lines of a purchase order
PATCH/v1/companies/{company}/purchase-orders/{purchase_order}/lines/{line}Update a line of a purchase order
GET/v1/companies/{company}/purchase-ordersList all purchase orders
POST/v1/companies/{company}/purchase-orders/{purchase_order}/mark-as-sentMark a purchase order as sent
GET/v1/companies/{company}/purchase-orders/{purchase_order}/matchRetrieve the three-way match of a purchase order
POST/v1/companies/{company}/purchase-orders/import/previewPreview an import of purchase orders
POST/v1/companies/{company}/purchase-orders/{purchase_order}/receiptsRegister a goods receipt for a purchase order
GET/v1/companies/{company}/purchase-orders/{purchase_order}/receiptsList the goods receipts of a purchase order
POST/v1/companies/{company}/purchase-orders/{purchase_order}/sendSend a purchase order to its supplier
GET/v1/companies/{company}/purchase-orders/{purchase_order}Retrieve a purchase order
GET/v1/companies/{company}/purchase-orders/statsRetrieve purchase order stats
PATCH/v1/companies/{company}/purchase-orders/{purchase_order}Update a purchase order
POST/v1/companies/{company}/purchase-reorder-suggestions/acceptAccept a reorder suggestion
GET/v1/companies/{company}/purchase-reorder-suggestionsList reorder suggestions
DEL/v1/companies/{company}/purchase-scans/{purchase_scan}Archive a purchase scan
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/convertCreate the expense from a scan
POST/v1/companies/{company}/purchase-scansUpload documents to the purchase scanner
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/duplicate-resolutionResolve a duplicate purchase scan
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/restoreRestore an archived purchase scan
POST/v1/companies/{company}/purchase-scans/{purchase_scan}/retryRetry a failed purchase scan
PATCH/v1/companies/{company}/purchase-scans/{purchase_scan}/reviewSave the review of a purchase scan
GET/v1/companies/{company}/purchase-scans/{purchase_scan}Retrieve a purchase scan
GET/v1/companies/{company}/sales-orders/{sales_order}/activitiesList sales order activity
POST/v1/companies/{company}/sales-orders/{sales_order}/convert-to-delivery-notesServe a sales order from several warehouses
POST/v1/companies/{company}/sales-orders/importImport sales orders
GET/v1/companies/{company}/sales-orders/import/templateDownload the sales order import template
GET/v1/companies/{company}/sales-orders/imports/{id}/errors.csvDownload sales order import errors
GET/v1/companies/{company}/sales-orders/imports/{id}Retrieve a sales order import
POST/v1/companies/{company}/sales-orders/import/previewPreview an import of sales orders
POST/v1/companies/{company}/stock-availability/batchRetrieve stock availability in batch
GET/v1/companies/{company}/stock-availabilityList stock availability
GET/v1/companies/{company}/stock-availability/{product}Retrieve the stock availability of an article
GET/v1/companies/{company}/stock-movementsList the stock movements of the company
POST/v1/companies/{company}/warehouse-stock/importImport initial stock per warehouse
GET/v1/companies/{company}/warehouse-stock/import/templateDownload the warehouse stock import template
GET/v1/companies/{company}/warehouse-stock/imports/{id}/errors.csvDownload warehouse stock import errors
GET/v1/companies/{company}/warehouse-stock/imports/{id}Retrieve a warehouse stock import
POST/v1/companies/{company}/warehouse-stock/import/previewPreview an import of initial stock per warehouse
POST/v1/companies/{company}/warehouses/importImport warehouses
GET/v1/companies/{company}/warehouses/import/templateDownload the warehouse import template
GET/v1/companies/{company}/warehouses/imports/{id}/errors.csvDownload warehouse import errors
GET/v1/companies/{company}/warehouses/imports/{id}Retrieve a warehouse import
POST/v1/companies/{company}/warehouses/import/previewPreview an import of warehouses
GET/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/deliveriesList webhook deliveries
GET/v1/companies/{company}/webhook-endpoints/{webhook_endpoint}/deliveries/{delivery}Retrieve webhook delivery

On this page

Need a hand?Contact support