Skip to main content

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 + same type already in org β†’ skipped_existing, skip code SKIPPED_DUPLICATE_TAX_ID
  • Does not appear in failures.csv
Bulk automatic: existing main entity β†’ skipped_existing
  • refresh: false (default when omitted): SKIPPED_ENTITY_ALREADY_EXISTS β€” no re-enrichment
  • refresh: true: SKIPPED_ENTITY_ALREADY_EXISTS_REFRESHED β€” creation skipped, re-enrichment ran
Hard failures:

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).
See also: Bulk imports overview.