Preview unit cost bulk update

POST /api/v1/inventory/products/unit-costs/preview

Validate parsed CSV rows and preview cost changes before applying.

Operation ID: preview_unit_cost_bulk_update_api_v1_inventory_products_unit_costs_preview_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

rows array · UnitCostBulkUpdateRowInput requiredUnitCostBulkUpdateRowInput

Rows from the uploaded CSV after client-side parsing.

4 fields
row_number integer required

1-based row number from the spreadsheet.

sku string required

Variant SKU.

variant_id string

Optional variant UUID; when set, used instead of SKU matching.

new_unit_cost_cents integer

New unit cost in cents. Omit or null to skip the row.

Responses

201 Successful Response

total_rows integer required
to_update integer required
unchanged integer required
skipped integer required
errors integer required
rows array · UnitCostBulkPreviewRow requiredUnitCostBulkPreviewRow
9 fields
row_number integer required
variant_id string
sku string required
product_name string
variant_name string
current_unit_cost_cents integer
new_unit_cost_cents integer
status string required

update | unchanged | skip | error

error_message string

400 Bad Request - Invalid input

422 Validation Error - Invalid data format