Upsert purchase orders
POST/v1/purchaseorder
Import or update purchase orders. Supports both incremental updates and full data replacement.
Upsert Key: source_document_id (ON CONFLICT target)
full_load Behavior:
- false (default): Incremental upsert — updates existing records (matched by source_document_id), inserts new ones
- true: Full replacement — deletes ALL existing purchase orders for the customer, then inserts new data
Required Fields: po_number, supplier_code, organization_unit_code, source_document_id, source_system
Limits: maximum 1000 purchase orders per request.
Request
Responses
- 200
- 400
- 401
- 403
- 500
Purchase orders inserted or updated successfully
Bad request - validation error
Unauthorized - invalid or missing API key
Forbidden - insufficient permissions
Internal server error