Failure Download Endpoints
Legacy entity CSV alias:
GET /entities/automatic/bulk/imports/{jobId}/failures.csv.
β¦/failures.csvβ CSV file download (Content-Type: text/csv)β¦/failuresβ JSON body (Content-Type: application/json)
Overview
Batch imports expose failures at three layers:
Row-level failures always include a stable
code (machine-readable) and message (human detail). Legacy jobs may only have free-text error; the API normalizes them on read.
Entity Row Outcomes (Created / Skipped / Failed)
Duplicate taxId (Entities)
Bulk manual default uses duplicateTaxIdPolicy: skip_existing:
- Same
taxId+ sametypealready in org βskipped_existing, skip codeSKIPPED_DUPLICATE_TAX_ID - Does not appear in
failures.csv
skipped_existing
refresh: false(default when omitted):SKIPPED_ENTITY_ALREADY_EXISTSβ no re-enrichmentrefresh: true:SKIPPED_ENTITY_ALREADY_EXISTS_REFRESHEDβ creation skipped, re-enrichment ran
Row-level failure codes (BATCH_IMPORT_ITEM_FAILURE_CODES)
Skip reason codes (BATCH_IMPORT_SKIP_REASON_CODES)
Not failures β used when outcome=skipped_existing:
Risk matrix / business rules: rule execution runs after the row is created. Rule outcomes do not appear in
failures.csv / JSON failures[] and do not roll back the row. Use alerts, risk score, and audit timelines for rule results.Job-level codes (BATCH_IMPORT_JOB_FAILURE_CODES)
Scenario Matrix (Client FAQ)
Reproducible Test Scenarios
User events (simplest row failures): valid CSV + mapping; one row with empty required field βGET β¦/user-event-jobs/{jobId}/failures.
Entities (manual): create entity with external_id=X, import another row with same external_id β DUPLICATE_EXTERNAL_ID.
Transactions (job-level): validateExistingEntity=true + originExternalId=DOES_NOT_EXIST β job failed, jobFailure.code=INVALID_ENTITY_REFERENCES.
Transactions (row-level): batchErrorHandling=continue_collect_errors + mix valid rows with DB constraint violations β row entries in failures endpoint.
Limits
- Max 500 row failures persisted per transaction batch job (CSV + JSON may truncate; JSON exposes
truncated+failuresTotal).