---
title: "Создать документ по операции внешнего склада"
method: POST
path: "/api/v1/stock/wms/operations/{id}/create"
tags: ["Stock warehouses"]
---

# Создать документ по операции внешнего склада

`POST /api/v1/stock/wms/operations/{id}/create`

## Request

- Base URL: `https://erp.akeda.ru`
- URL: `https://erp.akeda.ru/api/v1/stock/wms/operations/{id}/create`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-Api-Key`
  - OAuth 2
    - Authorization code: `https://erp.akeda.ru/oauth2/authorize`
    - Token URL: `https://erp.akeda.ru/oauth2/token` scopes: `akeda:delegate`
  - HTTP bearer

Черновик документа склада по факту оператора датой операции, строки — товары и партии оператора. shipment с order_id — привязка к заказу.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-Tenant` string, required

## Request body

- StockWMSOperationCreateInput
  - `document_kind` 'shipment' | 'writeoff' | 'transfer' | 'receipt' | 'capitalization' | 'customer_return' | 'inventory', required
  - `date` string, date: Пусто — день операции
  - `order_id` string, uuid, nullable
  - `reason_id` string, uuid, nullable
  - `contact_id` string, uuid, nullable
  - `target_warehouse_id` string, uuid, nullable
  - `reason` string: Название причины списания; для writeoff обязательно

## Response `200`

Карточка операции

- StockWMSOperationCard
  - [`StockWMSOperation`](https://skmtc.dev/akeda/apis/akeda-erp-client-api/revisions/084f7bbc939c/schema?at=%2Fcomponents%2Fschemas%2FStockWMSOperation)
  - object
    - `lines` StockWMSOperationLine[], required
      - `product_id` string, uuid, nullable
      - `product_name` string
      - `article` string
      - `lot` string
      - `expiry` string, nullable
      - `qty` string
      - `unit` string
      - `operator_product_id` string
      - `item_ids` string[]
      - `place_code` string
    - `document_lines` StockWMSOperationLine[], required
      - `product_id` string, uuid, nullable
      - `product_name` string
      - `article` string
      - `lot` string
      - `expiry` string, nullable
      - `qty` string
      - `unit` string
      - `operator_product_id` string
      - `item_ids` string[]
      - `place_code` string
    - `candidates` StockWMSOperationCandidate[], required
      - `target_kind` 'document' | 'order'
      - `target_id` string, uuid
      - `number` string
      - `title` string
      - `date` string
      - `score` integer
      - `reason` string
      - `exact` boolean

## Other responses

- `400`: Некорректный запрос или нарушение бизнес-правила
- `401`: Сессия, ключ или кабинет не подтверждены
- `403`: Текущая роль не имеет требуемого права
- `404`: Запись не найдена или не видима текущему пользователю
- `409`: Конфликт версии, идемпотентности или бизнес-состояния

## Changes

- **2026-12-04** `e00d83df905a`: 2 info
  - added the new optional request property `contact_id`
  - added the new optional request property `target_warehouse_id`
- **2026-12-04** `62756b6cbb14`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/akeda/apis/akeda-erp-client-api/changes/api/v1/stock/wms/operations/:id/create/post.md)

---

[API](https://skmtc.dev/akeda/apis/akeda-erp-client-api.md) - [All operations](https://skmtc.dev/akeda/apis/akeda-erp-client-api/llms.txt) - [OpenAPI document](https://skmtc.dev/akeda/apis/akeda-erp-client-api/revisions/084f7bbc939c?raw)
