Skip to main content

Upsert receipts

POST 

/v1/receipt

Import or update purchase order receipt records. Supports both incremental updates and full data replacement.

Upsert Key: source_receipt_line_id (ON CONFLICT target)

full_load Behavior:

  • false (default): Incremental upsert — updates existing receipts (matched by source_receipt_line_id), inserts new ones
  • true: Full replacement — deletes ALL existing receipts for the customer, then inserts new data

Required Fields: po_number, po_line_number, receipt_line_number, quantity, unit_price, net_amount, source_document_id, source_line_id, source_receipt_line_id

Referential integrity: every source_line_id must reference an existing purchase_order_line row, or the request is rejected with 400.

Limits: maximum 1000 receipts per request.

Request

Responses

Receipts imported successfully