Skip to main content

Validate Cost Entry Source Line Import

POST 

/api/cost-entries/:costEntry/source-lines/import/validate

Turns mapped rows of a vendor detail file into source lines and previews them, without writing anything. Each row comes back with its resolved charge type, matched product and per-row errors; lines is the normalised payload to send to Record Cost Entry Source Lines; dry_run reports what recording them would do to allocations (only when no row has errors).

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Body: rows (required, 1–20,000) — objects keyed by external_reference, description, charge_type (product, fee, unknown, rounding, adjustment, credit, other, or the enum value), charge_group, quantity, unit, rate, amount (required; accepts $, thousands separators and (1.23) negatives), period_start, period_end, basis, basis_note, basis_as_of. A row with a reference and no charge type is a product charge. Optional default_basis, default_basis_note, default_basis_as_of apply to rows without a basis; optional allocation_mode (as for recording) shapes the dry run.

Authentication: Requires Bearer token (scope purchase-orders:write).

Request​

Responses​

OK

Response Headers
    Content-Type