Alternative to the file flow (upload-url → import): ERP sends codes as JSON.
Why this method exists
When Excel export is inconvenient. Creates (or reuses) an incoming and inserts codes synchronously. With finalize: true status becomes completed and incoming.completed webhook fires.
When to use
- ≤ 500 codes — one request without
incomingId. - > 500 —
incoming/createthen severalbulk-createwithfinalize: false, last withfinalize: true.
Endpoint
POST /v1/supplier/incoming/codes/bulk-create
Authentication: X-Api-Key (bk_sup_). Do not send supplier/project ids in body.
Scope: supplier:incoming:write
Idempotency-Key: required.
Request example
{
"data": {
"documentNumber": "PM-2026-07-API-001",
"codes": ["QUEEN14-48AMU", { "code": "QUEEN14-49BNX", "validUntil": "2026-12-31" }],
"options": { "finalize": true }
}
}