Create purchase order from import

POST /api/v1/inventory/po-import/apply

Create a draft purchase order from confirmed line items and vendor. Unmatched SKUs require variant_id overrides or must be skipped.

Operation ID: apply_po_import_api_v1_inventory_po_import_apply_post · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

file_id string required
vendor_id string required
po_number string required
name string required
description string
line_decisions array · POLineDecision POLineDecision
3 fields
row_number integer required
action string

One of: include, skip

variant_id string

Override variant UUID for unmatched/ambiguous lines.

selected_sheets array · string required
sheet_mappings array · POSheetMappingConfirmation requiredPOSheetMappingConfirmation
4 fields
sheet_name string required
mapping object required

Map of standard field name → 0-based column index.

data_start_row integer
exclude_rows array · integer

Responses

201 Successful Response

success boolean
order_id string
po_number string
lines_created integer
lines_skipped integer
errors array · string

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

422 Validation Error - Invalid data format