Create incoming document

Creates draft incoming document before file upload.

Creates draft incoming document before file upload.

Why this method exists

Creates draft incoming document before file upload.

When to use

First step: create → upload → import.

Typical workflow

  1. Select supplier and document meta.
  2. Get incomingId.
  3. Upload file.
  4. Call import.

Endpoint

POST /v1/internal/promo-code-incoming/create

Authentication: JWT via Authorization: Bearer <token>. User must have project access and inventory_promo_codes permission.

Permission: inventory_promo_codes.create

Request example

{
  "meta": { "requestId": "optional-uuid" },
  "data": { "projectId": "a1b2…", "supplierId": "c219ef09-…", "documentNumber": "PM-2026-07-002", "documentDate": "2026-07-13", "importMaskId": null, "notes": "Подписка QUEEN14" }
}

Response example

{
  "success": true,
  "data": {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "status": "draft",
    "supplierId": "c219ef09-ae2f-4d08-af11-7cd51006fae4",
    "documentNumber": "PM-2026-07-002",
    "documentDate": "2026-07-13"
  }
}

Errors

  • UNAUTHORIZED / ACCESS_DENIED — access denied
  • VALIDATION_ERROR — invalid body
  • NOT_FOUND — resource not found
  • RATE_LIMIT_EXCEEDED (429) — rate limit

cURL

curl -X POST "https://api-external.promanta.ru/v1/internal/promo-code-incoming/create" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_JWT" \
  -d '{"data": { "projectId": "a1b2…", "supplierId": "c219ef09-…", "documentNumber": "PM-2026-07-002", "documentDate": "2026-07-13", "importMaskId": null, "notes": "Подписка QUEEN14" }}'

See also

wiki.ratingPrompt

0 (0 оценок)