Skip to main content
POST
Upload an external stock batch

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

clinic_id
string<uuid>
required

Body

application/json
batch_id
string<uuid>
required

Client-generated. Doubles as the idempotency key — a replay returns the stored result, never reprocesses.

as_of
string<date-time>
required

Clamped server-side to [now-30d, now].

feed_source
string
required
rows
object[]
required
Maximum array length: 5000

Response

OK.

ok
boolean
required
batch_id
string<uuid>
required
item_count
integer | null
matched_count
integer | null
unmatched_count
integer | null
rejected
boolean | null
rejected_reason
enum<string> | null
Available options:
suspicious_shrink,
invalid_rows,
empty,
null
replayed
boolean | null