erp-imports

createErpImport

Register an already-uploaded file (S3 ref) as a pricing-file import job. Returns the job and a file preview. Nothing runs yet: no use case is chosen and no validation starts here. Optionally rank candidates with POST /v2/erp/imports/{importId}:suggest-use-cases, then start validation with POST /v2/erp/imports/{importId}:validate. Pass import_id to repoint an existing PENDING import at a different file instead, keeping its id and its place in the history.

post/v2/erp/imports

Request body

include_previewboolean

Return a sample of the file's first rows in preview. Only controls whether the sample comes BACK — the head is read either way, because that read is how an unreadable file gets refused.

import_idstring

Repoint an EXISTING import at this file instead of registering a new one — same row, same id, so iterating on which file to import leaves one entry in the history rather than one per attempt. Only a PENDING import may be repointed; any other status returns 409 with code IMPORT_NOT_REPLACEABLE. Past the first check the previous verdict is what tells the user what to fix, and a job that reached the execute phase may already have published rows under correlation_id. An id that names nothing returns 404. It never falls back to registering a new import: a stale id must fail loudly rather than quietly produce a second one.

Response

The named import now points at this file. Returned only when import_id was supplied — no Location, because nothing was created.

Changes