Skip to main content
POST
Ingest records

Authorizations

Authorization
string
header
required

An InsightChain API key: ic_live_... for your organization, ic_test_... for its sandbox

Headers

Idempotency-Key
string

Makes a retry safe: the same key and body answers from the first run without storing anything again (replayed: true), another body is 422 idempotency_key_reused, a request still running is 409 idempotency_key_in_use

Required string length: 1 - 128
Pattern: ^[\x21-\x7E]{1,128}$

Body

application/json
entities
object
required

1-1000 records across all entities: at least one entity with at least one record. A record that lacks a required field is reported in the response and the others are stored

connection
string

Connection name (default 'default')

Maximum string length: 100

Response

OK

run_id
string<uuid>
required

The ingest run; GET /v1/sync_runs lists it

connection
string | null
required

The connection the records were stored under; null only on a replay whose connection has since been removed

status
enum<string>
required

success: every record stored. partial: some refused. failed: none stored

Available options:
success,
partial,
failed
results
object
required

Counts per entity (suppliers, items, locations, purchase_orders, ...); every entity is listed, sent or not

error_count
integer
required

Records refused, in full

errors
object[]
required
duration_ms
integer | null
required
request_id
string
required

Quote this when asking about the request; also the X-Request-ID header

replayed
any

Present when the Idempotency-Key was already used with the same body: this is the first run's result, nothing was processed again

original_request_id
string<uuid>

With replayed: the request_id of the run that did the work