Upload promo code shipment (JSON)

File alternative: send codes as JSON. Create a new incoming and insert in one call, or append to a draft in batches of up to 500.

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/create then several bulk-create with finalize: false, last with finalize: 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 }
  }
}

See also

wiki.ratingPrompt

0 (0 оценок)