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
- Select supplier and document meta.
- Get incomingId.
- Upload file.
- 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 deniedVALIDATION_ERROR— invalid bodyNOT_FOUND— resource not foundRATE_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" }}'