Дерево страниц

Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

Данный API предназначен для интеграции внешней системы контроля остатков товаров с кассовой программой УКМ 5. Более подробно процесс контроля остатков описан в соответствующей статье.

Open API (Swagger) Viewer
openapi: 3.0.1
info:
  title: Сервис контроля остатков товаров
servers:
- url: http://192.168.10.242:9200
security: []
tags:
- name: Reservations
paths:
  /api/1.0/reservationItem/{store}/{pos}/{reservation}:
    post:
      tags:
      - Reservations
      summary: Резервирование позиции товара
      description: Резервирование позиции товара, с заданныим количеством
      operationId: makeReservation
      parameters:
      - name: store
        in: path
        description: Внешний Id магазина
        required: true
        schema:
          type: string
      - name: pos
        in: path
        description: Номер кассы
        required: true
        schema:
          type: string
      - name: reservation
        in: path
        description: Guid резервирования
        required: true
        schema:
          type: string
      - name: sku
        in: query
        description: Артикул товара
        schema:
          type: string
      - name: quantity
        in: query
        description: Колличество товара
        schema:
          type: string
      responses:
        200:
          description: Успешное резервирование товара
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
        400:
          description: Резервирование не удалось
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsuccessResult'
        500:
          description: Ошибка обработки
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
    delete:
      tags:
      - Reservations
      summary: Отмена резервирования
      description: Отмена резервирования товара, с заданныим количеством
      operationId: cancelReservation
      parameters:
      - name: store
        in: path
        description: Внешний Id магазина
        required: true
        schema:
          type: string
      - name: pos
        in: path
        description: Номер кассы
        required: true
        schema:
          type: string
      - name: reservation
        in: path
        description: Guid резервирования
        required: true
        schema:
          type: string
      - name: sku
        in: query
        description: Артикул товара
        schema:
          type: string
      - name: quantity
        in: query
        description: Колличество товара
        schema:
          type: string
      responses:
        200:
          description: Успешная отмена резервирования
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResult'
        400:
          description: Отмена резервирования не удалась
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnsuccessResult'
        500:
          description: Ошибка обработки
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
components:
  schemas:
    ErrorResult:
      required:
      - msg
      type: object
      properties:
        msg:
          type: string
          description: Сообщение об ошибке
      description: Ошибочный результат
    UnsuccessReason:
      type: object
      description: 'Причина неудачи: Imposible - невозможно, NoItem - нет товара,
        CanNotSellItem - нет в достаточном количестве'
    UnsuccessResult:
      required:
      - msg
      - reason
      type: object
      properties:
        reason:
          $ref: '#/components/schemas/UnsuccessReason'
        msg:
          type: string
          description: Сообщение о неудаче
      description: Нет такого товара
    SuccessResult:
      required:
      - msg
      type: object
      properties:
        msg:
          type: string
          description: Сообщение об успехе
      description: Успешный результат