Akeda Stock handling units API

Модуль stock (склад) — физические единицы хранения, их состояние и подсказки размещения

Operations 4

GET /api/v1/stock/handling-units Получить список физических складских единиц #
GET /api/v1/stock/handling-units/suggestions Подобрать физические единицы под требуемое количество #
GET /api/v1/stock/handling-units/{id} Получить карточку физической складской единицы #
PATCH /api/v1/stock/handling-units/{id}/status Изменить статус физической складской единицы #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/akeda-ru:akeda-ru-stock-handling-units-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

akeda-ru-stock-handling-units-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Akeda ERP Client Stock handling units API
  version: 0.21.0-core-public
  summary: Проверяемый публичный контракт Go API Akeda ERP
  license:
    name: Proprietary
    identifier: LicenseRef-Akeda-Proprietary
  description: 'Этот контракт описывает API Akeda ERP. Полный исходный файл используют

    проверки живых Go-маршрутов, внутренние клиенты и реестр MCP. Скачиваемый

    клиентский контракт в `/docs` содержит только отобранные внешние методы;

    административные методы кабинета показаны отдельно после входа, а

    платформенные операторские методы остаются во внутреннем источнике.

    Стадия `public` означает обещание совместимости; `preview` допускает

    изменение формы. Аудитория, стадия и `security` — разные признаки:

    наличие метода в полном файле само по себе не выдаёт вызывающему право.

    Сервер отдельно проверяет тип токена, кабинет, scope и права на запись.

    Актуальные числа покрытия берите из генерируемой карты маршрутов и

    каталога покрытия, а не из описательного текста.'
servers:
- url: https://erp.akeda.ru
  description: PROD
security:
- erpUserToken: []
- tenantApiKey: []
- mcpOAuth:
  - akeda:delegate
tags:
- name: Stock handling units
  description: Модуль stock (склад) — физические единицы хранения, их состояние и подсказки размещения
paths:
  /api/v1/stock/handling-units:
    get:
      tags:
      - Stock handling units
      operationId: stockListHandlingUnits
      summary: Получить список физических складских единиц
      description: Остаток, резерв и склад считаются из движений регистров, а не хранятся на самой единице.
      x-akeda-module: stock
      x-akeda-release-stage: preview
      x-akeda-audience: external
      x-akeda-permission: stock:read
      security:
      - erpUserToken: []
      - tenantApiKey: []
      - mcpOAuth:
        - akeda:delegate
      - installationToken: []
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      - name: company_id
        in: query
        schema:
          $ref: '#/components/schemas/UUID'
      - name: warehouse_id
        in: query
        description: Отбор идёт только по единицам с одним местом хранения
        schema:
          $ref: '#/components/schemas/UUID'
      - name: product_id
        in: query
        schema:
          $ref: '#/components/schemas/UUID'
      - name: batch_id
        in: query
        schema:
          $ref: '#/components/schemas/UUID'
      - name: status
        in: query
        description: 'Показать только эти вычисленные состояния state (не поле status), через запятую: opened,sealed'
        style: form
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/StockHandlingUnitState'
      - name: exclude_status
        in: query
        description: 'Скрыть эти вычисленные состояния, через запятую. Экран списка по умолчанию шлёт retired: черновик прихода выводит прежние единицы при каждой правке'
        style: form
        explode: false
        schema:
          type: array
          items:
            $ref: '#/components/schemas/StockHandlingUnitState'
      - name: q
        in: query
        description: Код единицы, название или SKU товара
        schema:
          type: string
      - name: code
        in: query
        description: 'Отбор столбца «Код»: подстрока кода без учёта регистра'
        schema:
          type: string
      - name: product
        in: query
        description: 'Отбор столбца «Товар»: подстрока названия или SKU'
        schema:
          type: string
      - name: initial_from
        in: query
        description: 'Отбор столбца «Принято»: от, включительно'
        schema:
          type: string
          pattern: ^-?[0-9]+([.,][0-9]+)?$
      - name: initial_to
        in: query
        description: 'Отбор столбца «Принято»: до, включительно'
        schema:
          type: string
          pattern: ^-?[0-9]+([.,][0-9]+)?$
      - name: balance_from
        in: query
        description: 'Отбор столбца «Остаток»: от, включительно (свёртка движений)'
        schema:
          type: string
          pattern: ^-?[0-9]+([.,][0-9]+)?$
      - name: balance_to
        in: query
        description: 'Отбор столбца «Остаток»: до, включительно'
        schema:
          type: string
          pattern: ^-?[0-9]+([.,][0-9]+)?$
      - name: cost_from
        in: query
        description: 'Отбор столбца «Стоимость»: от, включительно'
        schema:
          type: string
          pattern: ^-?[0-9]+([.,][0-9]+)?$
      - name: cost_to
        in: query
        description: 'Отбор столбца «Стоимость»: до, включительно'
        schema:
          type: string
          pattern: ^-?[0-9]+([.,][0-9]+)?$
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 200
      - name: offset
        in: query
        schema:
          type: integer
          minimum: 0
          default: 0
      responses:
        '200':
          description: Страница физических складских единиц
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockHandlingUnitPage'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
  /api/v1/stock/handling-units/suggestions:
    get:
      tags:
      - Stock handling units
      operationId: stockSuggestHandlingUnits
      summary: Подобрать физические единицы под требуемое количество
      description: Подбор идёт по вскрытым и запечатанным активным единицам в порядке выдачи; complete=false означает, что склада не хватило.
      x-akeda-module: stock
      x-akeda-release-stage: preview
      x-akeda-audience: external
      x-akeda-permission: stock:read
      security:
      - erpUserToken: []
      - tenantApiKey: []
      - mcpOAuth:
        - akeda:delegate
      - installationToken: []
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      - name: business_id
        in: query
        required: false
        description: Бизнес подбора; нужен бизнес или юрлицо. Без юрлица подбираются только единицы без юрлица этого бизнеса
        schema:
          $ref: '#/components/schemas/UUID'
      - name: company_id
        in: query
        required: false
        description: Юрлицо подбора; при заданном business_id обязано относиться к нему
        schema:
          $ref: '#/components/schemas/UUID'
      - name: warehouse_id
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - name: product_id
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - name: qty
        in: query
        required: true
        description: Положительный decimal в базовой единице товара
        schema:
          type: string
      responses:
        '200':
          description: Раскладка подбора
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockHandlingUnitSuggestionResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/stock/handling-units/{id}:
    get:
      tags:
      - Stock handling units
      operationId: stockGetHandlingUnit
      summary: Получить карточку физической складской единицы
      description: Вместе с единицей отдаются её движения по регистру stock.
      x-akeda-module: stock
      x-akeda-release-stage: preview
      x-akeda-audience: external
      x-akeda-permission: stock:read
      security:
      - erpUserToken: []
      - tenantApiKey: []
      - mcpOAuth:
        - akeda:delegate
      - installationToken: []
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      - name: id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      - name: limit
        in: query
        description: Ограничение на число возвращаемых движений
        schema:
          type: integer
          minimum: 1
          maximum: 1000
          default: 200
      responses:
        '200':
          description: Карточка единицы с движениями
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockHandlingUnitCard'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/stock/handling-units/{id}/status:
    patch:
      tags:
      - Stock handling units
      operationId: stockUpdateHandlingUnitStatus
      summary: Изменить статус физической складской единицы
      description: Выведенную из оборота единицу вернуть нельзя; вывод из оборота требует нулевого остатка.
      x-akeda-module: stock
      x-akeda-release-stage: preview
      x-akeda-audience: external
      x-akeda-permission: stock:write
      security:
      - erpUserToken: []
      - tenantApiKey: []
      - mcpOAuth:
        - akeda:delegate
      - installationToken: []
      parameters:
      - $ref: '#/components/parameters/TenantHeader'
      - name: id
        in: path
        required: true
        schema:
          $ref: '#/components/schemas/UUID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StockHandlingUnitStatusPatch'
      responses:
        '200':
          description: Единица с новым статусом
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockHandlingUnit'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
components:
  parameters:
    TenantHeader:
      name: X-Tenant
      in: header
      required: true
      description: Slug выбранного кабинета; кабинет не является юрлицом
      schema:
        type: string
        minLength: 1
  responses:
    BadRequest:
      description: Некорректный запрос или нарушение бизнес-правила
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Сессия, ключ или кабинет не подтверждены
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Текущая роль не имеет требуемого права
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Запись не найдена или не видима текущему пользователю
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Conflict:
      description: Конфликт версии, идемпотентности или бизнес-состояния
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    CoreDocumentStatus:
      type: string
      enum:
      - draft
      - posted
      - cancelled
    StockHandlingUnitCard:
      type: object
      additionalProperties: false
      required:
      - handling_unit
      - entries
      properties:
        handling_unit:
          $ref: '#/components/schemas/StockHandlingUnit'
        entries:
          type: array
          items:
            $ref: '#/components/schemas/CoreRegisterEntry'
          description: Движения единицы по регистру stock
    StockHandlingUnitState:
      type: string
      enum:
      - pending
      - sealed
      - opened
      - empty
      - cancelled
      - blocked
      - retired
      - location_conflict
      description: Вычисленное состояние единицы; выводится из статуса, документа-основания и остатков регистра
    StockHandlingUnitSuggestion:
      type: object
      additionalProperties: false
      required:
      - handling_unit_id
      - code
      - batch_id
      - qty
      - available_before
      - available_after
      - state_before
      properties:
        handling_unit_id:
          $ref: '#/components/schemas/UUID'
        code:
          type: string
        batch_id:
          $ref: '#/components/schemas/UUID'
        qty:
          type: string
        available_before:
          type: string
        available_after:
          type: string
        state_before:
          $ref: '#/components/schemas/StockHandlingUnitState'
    StockHandlingUnitStatus:
      type: string
      enum:
      - active
      - blocked
      - retired
      description: Статус, который оператор назначает физической единице руками
    StockHandlingUnitSuggestionResult:
      type: object
      additionalProperties: false
      required:
      - requested_qty
      - allocated_qty
      - complete
      - allocations
      properties:
        requested_qty:
          type: string
        allocated_qty:
          type: string
        complete:
          type: boolean
          description: false означает, что доступных единиц не хватило на всё количество
        allocations:
          type: array
          items:
            $ref: '#/components/schemas/StockHandlingUnitSuggestion'
    Error:
      type: object
      additionalProperties: false
      required:
      - detail
      properties:
        detail:
          type: string
          description: One human sentence in the request language (Accept-Language, echoed as Content-Language)
        code:
          type: string
          description: Stable module error code when the endpoint defines one
        field:
          type: string
          description: Request body path of the field the refusal is about, e.g. content.commercial.amount or due_date; present when the endpoint names the field
        reason:
          type: string
          description: Machine code of the field refusal reason, e.g. required, format, total_mismatch; present together with field when the endpoint defines reasons
        request_id:
          type: string
          format: uuid
          description: Case id. Always present on 5xx and on any error produced by the server itself; the same value is returned in the X-Request-ID header and recorded in the access log and the incident. Quote it to support instead of the cause, which the response never carries.
    CoreRegisterEntry:
      type: object
      additionalProperties: false
      required:
      - id
      - register_id
      - register_key
      - register_name
      - registrar_type
      - registrar_type_key
      - registrar_type_name
      - registrar_id
      - registrar_number
      - registrar_date
      - registrar_status
      - date
      - sign
      - dims
      - values
      - created_at
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        register_id:
          $ref: '#/components/schemas/UUID'
        register_key:
          type: string
        register_name:
          type: string
        registrar_type:
          $ref: '#/components/schemas/UUID'
        registrar_type_key:
          type: string
        registrar_type_name:
          type: string
        registrar_id:
          $ref: '#/components/schemas/UUID'
        registrar_number:
          type: string
        registrar_date:
          type: string
          format: date
        registrar_status:
          $ref: '#/components/schemas/CoreDocumentStatus'
        date:
          type: string
          format: date
        sign:
          type: integer
          enum:
          - -1
          - 1
        dims:
          type: object
          additionalProperties: true
        values:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
    StockHandlingUnitPage:
      type: object
      additionalProperties: false
      required:
      - count
      - limit
      - offset
      - results
      properties:
        count:
          type: integer
          minimum: 0
        limit:
          type: integer
          minimum: 0
        offset:
          type: integer
          minimum: 0
        results:
          type: array
          items:
            $ref: '#/components/schemas/StockHandlingUnit'
    StockHandlingUnitStatusPatch:
      type: object
      additionalProperties: false
      required:
      - status
      properties:
        status:
          $ref: '#/components/schemas/StockHandlingUnitStatus'
    UUID:
      type: string
      format: uuid
    StockHandlingUnit:
      type: object
      additionalProperties: false
      required:
      - id
      - batch_id
      - company_id
      - company_name
      - product_id
      - product_sku
      - product_name
      - base_unit
      - source_document_id
      - source_document_number
      - source_document_status
      - source_line_id
      - code
      - initial_base_qty
      - remaining_base_qty
      - reserved_base_qty
      - amount
      - status
      - state
      - warehouse_name
      - is_remnant
      - custom
      - received_at
      - created_at
      - updated_at
      properties:
        id:
          $ref: '#/components/schemas/UUID'
        batch_id:
          $ref: '#/components/schemas/UUID'
        business_id:
          $ref: '#/components/schemas/UUID'
        company_id:
          $ref: '#/components/schemas/UUID'
          description: Нулевой UUID — единица без юрлица
        company_name:
          type: string
        product_id:
          $ref: '#/components/schemas/UUID'
        product_sku:
          type: string
        product_name:
          type: string
        base_unit:
          type: string
        source_document_id:
          $ref: '#/components/schemas/UUID'
        source_document_number:
          type: string
        source_document_status:
          $ref: '#/components/schemas/CoreDocumentStatus'
        source_line_id:
          $ref: '#/components/schemas/UUID'
        code:
          type: string
        initial_base_qty:
          type: string
        remaining_base_qty:
          type: string
          description: Считается из движений регистра stock
        is_remnant:
          type: boolean
          description: 'Остаток меньше порога обрезка у единицы товара: вычисляется по остатку, а не хранится'
        reserved_base_qty:
          type: string
          description: Считается из движений регистра stock_reserved
        amount:
          type: string
        status:
          $ref: '#/components/schemas/StockHandlingUnitStatus'
        state:
          $ref: '#/components/schemas/StockHandlingUnitState'
        warehouse_id:
          oneOf:
          - $ref: '#/components/schemas/UUID'
          - type: 'null'
          description: Отдаётся только когда положительный остаток лежит в одном месте хранения
        warehouse_name:
          type: string
        custom:
          type: object
          additionalProperties: true
        received_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  securitySchemes:
    erpUserToken:
      type: http
      scheme: bearer
      bearerFormat: go_session
      description: Пользовательский ERP token, полученный через ORY Kratos session bridge
    tenantApiKey:
      type: apiKey
      in: header
      name: X-Api-Key
      description: Tenant-scoped сервисный API-ключ Akeda
    installationToken:
      type: http
      scheme: bearer
      bearerFormat: akeda_installation_token
      description: 'Краткосрочный токен установки приложения (`ai_…`). Выдаёт его человек: публичной двери обмена учётных данных на токен нет и не будет, пока нет брокера долгой половины секрета, асимметричного подтверждения и ограничителя с аудитом неудачных попыток. Токен принимается и в заголовке X-Api-Key, и живёт минуты — вместо показа его ротируют'
    developerSessionToken:
      type: http
      scheme: bearer
      bearerFormat: akeda_developer_session
      description: 'Сессия аккаунта разработчика (`ad_…`). Своя схема, а не пользовательский токен ERP: у разработчика нет кабинета, роли и прав, а хеш этого токена лежит в отдельном хранилище — на кабинетных маршрутах он не находится ничем. Выдаёт его обмен одноразовой ссылки из письма; пароля в этом контуре нет вовсе'
    developerAppKey:
      type: http
      scheme: bearer
      bearerFormat: akeda_developer_app_key
      description: 'Учётные данные приложения (`adk_…`) — это машина конвейера издателя, а не человек. Ключ привязан к ОДНОМУ приложению внешним ключом, и достижимая им поверхность — маршруты `/api/v1/developer` этого приложения. Обменять его на токен установки нельзя: такой двери нет, и ни одного маршрута к данным кабинета за ним не существует. Выпуск, ротацию и отзыв учётных данных этот ключ не выполняет: ключ, умеющий выпустить следующий ключ, не отзывается никогда. Значение показывается один раз, при выдаче; в хранилище лежит хеш'
    mcpOAuth:
      type: oauth2
      description: OAuth 2.1 delegation для MCP; кабинетные права проверяются на каждом вызове
      flows:
        authorizationCode:
          authorizationUrl: https://erp.akeda.ru/oauth2/authorize
          tokenUrl: https://erp.akeda.ru/oauth2/token
          scopes:
            akeda:delegate: Делегировать текущие пользовательские права MCP-подключению
x-akeda-contract-coverage:
- dashboard-metrics
- tasks-lifecycle
- tasks-collaboration
- tasks-workflow
- tasks-organization
- tasks-automation
- tasks-planning
- tasks-project-hub
- tasks-files
- calendar-events
- calendar-availability
- calendar-booking
- calendar-notifications
- calendar-connectors
- chat-conversations
- chat-messages
- chat-receipts
- chat-mentions
- chat-realtime
- core-directories
- core-folders
- core-contacts
- core-products
- core-documents
- core-orders
- core-registers
- core-accounting
- core-ledger
- core-items
- core-employees
- core-employee-operations
- core-currency-rates
- core-preferences
- core-ui-state
- core-external-refs
- core-product-imports
- core-product-exports
- core-gl-opening-imports
- core-reference
- core-change-feed
- finance-accounts
- finance-statements
- finance-transactions
- finance-connectors
- finance-connector-sync
- finance-requisites
- finance-counterparty-terms
- finance-operations
- finance-settlements
- finance-trade
- finance-exchange
- finance-imports
- finance-payment-calendar
- finance-pnl-layouts
- finance-registers
- finance-reports
- crm-pipelines
- crm-deals
- crm-leads
- crm-customers
- crm-links
- crm-inbox
- crm-automation
- crm-analytics
- knowledge-spaces
- knowledge-pages
- knowledge-access
- knowledge-files
- knowledge-search
- files-drives
- files-content
- files-access
- files-uploads
- files-shares
- stock-documents
- stock-inventory
- stock-warehouses
- stock-handling-units
- stock-batches
- stock-product-units
- stock-references
- stock-imports
- stock-exports
- stock-reports
- stock-valuation
- stock-reorder-rules
- stock-settings
- stock-purchasing
- marking-settings
- marking-connections
- marking-products
- marking-codes
- marking-labels
- marking-stock-codes
- marking-orders
- marking-gismt-documents
- marking-boxes
- marketplace-stores
- marketplace-ozon
- marketplace-wildberries
- marketplace-yandex
- marketplace-product-groups
- marketplace-accounting
- marketplace-catalog
- settings-companies
- settings-roles
- settings-members
- settings-fields
- settings-api-keys
- finance-payroll
- finance-report-details
- knowledge-tags
- knowledge-revisions
- knowledge-approval
- chat-attachments
- chat-reactions
- chat-folders
- platform-apps
- platform-app-installations
- platform-app-tokens
- platform-app-deliveries
- platform-app-publishers
- platform-app-publication
- platform-app-rollouts
- platform-app-runtime
- platform-app-access
- platform-app-blocks
- platform-demo-data
- billing-usage
- platform-analytics
- finance-staffing
- platform-tenants
- platform-users
- platform-access
- platform-mcp-publication
- platform-incidents
- platform-health
- settings-apps
- docflow-connections
- docflow-mirror
- docflow-signing
- docflow-actions
- docflow-outgoing
- docflow-intake
- docflow-flow
- docflow-approvals
- docflow-flow-accounting
- mail-accounts
- mail-folders
- mail-messages
- mail-rules
- mail-outbound
- mail-attachments
- billing-plans
- billing-subscriptions
- billing-invoices
- billing-analytics
- settings-subscription
- billing-payments
- billing-public
x-akeda-docs-path: /docs
x-akeda-default-release-stage: internal
x-akeda-default-audience: operator