> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yume.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Patch deliveries



## OpenAPI

````yaml /openapi/orders.json patch /v1/crm/requests/{request_id}/deliveries/{id}/
openapi: 3.0.3
info:
  title: Yume API — Аренда
  version: 1.0.0
  description: Управление арендой, заявками и заказами.
servers:
  - url: https://api.yume.cloud
    description: Production
  - url: https://api.stage.yume.cloud
    description: Stage
security: []
paths:
  /v1/crm/requests/{request_id}/deliveries/{id}/:
    patch:
      tags:
        - deliveries
      summary: Patch deliveries
      operationId: deliveries_partial_update
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
        - in: path
          name: request_id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedOrderRequestDeliveryFullInfo'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedOrderRequestDeliveryFullInfo'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedOrderRequestDeliveryFullInfo'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderRequestDeliveryFullInfo'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    PatchedOrderRequestDeliveryFullInfo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        request:
          allOf:
            - $ref: '#/components/schemas/BaseOrderRequest'
          readOnly: true
        delivery_place:
          $ref: '#/components/schemas/Geolocation'
        issue_place:
          $ref: '#/components/schemas/Geolocation'
        worker:
          type: integer
          title: Исполнитель
        cancel_comment:
          type: string
          nullable: true
          title: Причина отмены
        delivered_at:
          type: string
          format: date-time
          nullable: true
          title: Доставлено
        issued_at:
          type: string
          format: date-time
          nullable: true
          title: Выдано
        pickup_date:
          type: string
          format: date-time
          nullable: true
          title: Дата забора
        type:
          allOf:
            - $ref: '#/components/schemas/TypeCc7Enum'
          title: Тип
          minimum: -32768
          maximum: 32767
        status:
          allOf:
            - $ref: '#/components/schemas/StatusF7aEnum'
          title: Статус
          minimum: -32768
          maximum: 32767
        comment:
          type: string
          nullable: true
          title: Комментарий
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        price_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        extra:
          title: Доп. данные
        issue:
          type: integer
          nullable: true
          title: Связанная доставка
        phone:
          type: string
          nullable: true
          title: Телефон
          maxLength: 32
        phone_alternative:
          type: string
          nullable: true
          title: Доп. телефон
          maxLength: 32
        images:
          type: array
          items:
            $ref: '#/components/schemas/ImageAttachment'
          readOnly: true
        client:
          allOf:
            - $ref: '#/components/schemas/BaseClient'
          readOnly: true
        manager:
          type: integer
          readOnly: true
        inventories:
          type: array
          items:
            $ref: '#/components/schemas/OrderRequestInventoryList'
          readOnly: true
    OrderRequestDeliveryFullInfo:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        request:
          allOf:
            - $ref: '#/components/schemas/BaseOrderRequest'
          readOnly: true
        delivery_place:
          $ref: '#/components/schemas/Geolocation'
        issue_place:
          $ref: '#/components/schemas/Geolocation'
        worker:
          type: integer
          title: Исполнитель
        cancel_comment:
          type: string
          nullable: true
          title: Причина отмены
        delivered_at:
          type: string
          format: date-time
          nullable: true
          title: Доставлено
        issued_at:
          type: string
          format: date-time
          nullable: true
          title: Выдано
        pickup_date:
          type: string
          format: date-time
          nullable: true
          title: Дата забора
        type:
          allOf:
            - $ref: '#/components/schemas/TypeCc7Enum'
          title: Тип
          minimum: -32768
          maximum: 32767
        status:
          allOf:
            - $ref: '#/components/schemas/StatusF7aEnum'
          title: Статус
          minimum: -32768
          maximum: 32767
        comment:
          type: string
          nullable: true
          title: Комментарий
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        price_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        extra:
          title: Доп. данные
        issue:
          type: integer
          nullable: true
          title: Связанная доставка
        phone:
          type: string
          nullable: true
          title: Телефон
          maxLength: 32
        phone_alternative:
          type: string
          nullable: true
          title: Доп. телефон
          maxLength: 32
        images:
          type: array
          items:
            $ref: '#/components/schemas/ImageAttachment'
          readOnly: true
        client:
          allOf:
            - $ref: '#/components/schemas/BaseClient'
          readOnly: true
        manager:
          type: integer
          readOnly: true
        inventories:
          type: array
          items:
            $ref: '#/components/schemas/OrderRequestInventoryList'
          readOnly: true
      required:
        - client
        - delivery_place
        - id
        - images
        - inventories
        - issue_place
        - manager
        - pickup_date
        - price
        - request
        - type
        - worker
    BaseOrderRequest:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        status:
          allOf:
            - $ref: '#/components/schemas/Status3e1Enum'
          title: Статус
          minimum: 0
          maximum: 32767
        rent_start:
          type: string
          format: date-time
          title: Начало аренды
        rent_fact_start:
          type: string
          format: date-time
          nullable: true
          title: Факт выдачи
        rent_end:
          type: string
          format: date-time
          title: Конец аренды
        rent_fact_end:
          type: string
          format: date-time
          nullable: true
          title: Факт возврата
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        discount_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        price_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        price_inventory:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        price_service:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        discount_inventory_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Скидка на инвентарь
        discount_service_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        payment_status:
          allOf:
            - $ref: '#/components/schemas/PaymentStatusEnum'
          title: Статус оплаты
          minimum: 0
          maximum: 32767
        paid_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        penalty_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        rental_point:
          type: integer
          nullable: true
          title: Точка проката
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        updated_at:
          type: string
          format: date-time
          readOnly: true
          title: Обновлен
        deleted:
          type: boolean
          title: Удалено
        plus_id:
          type: integer
          maximum: 9223372036854776000
          minimum: -9223372036854776000
          format: int64
          nullable: true
          title: Идентификатор Plus
        extra: {}
      required:
        - created_at
        - id
        - rent_end
        - rent_start
        - updated_at
    Geolocation:
      type: object
      properties:
        latitude:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,9})?$
        longitude:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,9})?$
        name:
          type: string
          nullable: true
          maxLength: 255
    TypeCc7Enum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Доставка
        * `1` - Самовывоз
    StatusF7aEnum:
      enum:
        - 0
        - 1
        - 2
        - 3
      type: integer
      description: |-
        * `0` - Ожидает
        * `1` - В работе
        * `2` - Доставлено
        * `3` - Отменено
    ImageAttachment:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        image:
          type: string
          format: uri
          nullable: true
        thumb:
          type: string
          format: uri
          readOnly: true
          nullable: true
        name:
          type: string
          readOnly: true
          nullable: true
        extension:
          type: string
          readOnly: true
        hash:
          type: string
          readOnly: true
          nullable: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
        created_by:
          type: integer
          readOnly: true
          nullable: true
        content_type:
          type: string
          title: Имя класса модели
        object_id:
          type: integer
          maximum: 9223372036854776000
          minimum: 0
          format: int64
        type:
          type: string
          nullable: true
          maxLength: 255
      required:
        - content_type
        - created_at
        - created_by
        - extension
        - hash
        - id
        - name
        - object_id
        - thumb
    BaseClient:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        name:
          type: string
          title: Название
          maxLength: 512
        type:
          allOf:
            - $ref: '#/components/schemas/BaseClientTypeEnum'
          title: Тип
          minimum: 0
          maximum: 2147483647
        avatar:
          type: string
          format: uri
          nullable: true
          title: Фото
        agreement_id:
          type: string
          readOnly: true
          nullable: true
        signed:
          type: boolean
        sign_date:
          type: string
          format: date
          nullable: true
        sign_expires:
          type: string
          format: date
          nullable: true
        phone:
          type: string
          title: Телефон
          maxLength: 32
        email:
          type: string
          format: email
          nullable: true
          maxLength: 254
        legal_type:
          nullable: true
          title: Форма организации
          minimum: 0
          maximum: 2147483647
          oneOf:
            - $ref: '#/components/schemas/LegalTypeEnum'
            - $ref: '#/components/schemas/NullEnum'
        extra:
          title: Доп. данные
      required:
        - agreement_id
        - id
        - name
        - phone
    OrderRequestInventoryList:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        request:
          type: integer
          title: Аренда
        client:
          type: string
          readOnly: true
        inventory_group:
          type: integer
          nullable: true
          title: Группа инвентаря
        inventory:
          allOf:
            - $ref: '#/components/schemas/CarInventory'
          readOnly: true
        tarif:
          type: integer
          nullable: true
          title: Тариф
        tarif_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          title: Цена тарифа
        tarif_duration:
          type: string
          title: Длительность тарифа
        discount:
          type: integer
          nullable: true
          title: Скидка
        additional_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        price_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        penalty_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        start_at:
          type: string
          format: date-time
          nullable: true
          title: Начало периода
        end_at:
          type: string
          format: date-time
          nullable: true
          title: Конец периода
        fact_start_at:
          type: string
          format: date-time
          nullable: true
          title: Факт выдачи
        fact_end_at:
          type: string
          format: date-time
          nullable: true
          title: Факт возврата
        set:
          type: integer
          nullable: true
          title: Комплект
        set_group:
          type: string
          nullable: true
          title: Группа комплекта
        extra:
          title: Доп. данные
        type:
          allOf:
            - $ref: '#/components/schemas/Type9ddEnum'
          title: Тип
          minimum: 0
          maximum: 32767
        created_by:
          type: integer
          nullable: true
          title: Создал
        warehouse:
          type: integer
          nullable: true
          title: Склад
        counterparty:
          type: integer
          nullable: true
          title: Контрагент
        exchange:
          type: integer
          nullable: true
          title: Замена
        autorenewal:
          type: boolean
          readOnly: true
          nullable: true
      required:
        - autorenewal
        - client
        - id
        - inventory
        - request
    Status3e1Enum:
      enum:
        - 0
        - 1
        - 2
        - 3
        - 4
        - 5
        - 6
      type: integer
      description: |-
        * `0` - Запрос
        * `1` - Забронировано
        * `2` - В аренде
        * `3` - Отменено
        * `4` - Завершено
        * `5` - Должник
        * `6` - Просрочка
    PaymentStatusEnum:
      enum:
        - 0
        - 1
        - 2
      type: integer
      description: |-
        * `0` - Ожидается оплата
        * `1` - Оплата произведена
        * `2` - Частичная оплата
    BaseClientTypeEnum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Физ. лицо
        * `1` - Юр. лицо
    LegalTypeEnum:
      enum:
        - 0
        - 1
        - 2
        - 3
      type: integer
      description: |-
        * `0` - ИП
        * `1` - ТОО
        * `2` - АО
        * `3` - ПК
    NullEnum:
      enum:
        - null
    CarInventory:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        group:
          type: integer
          nullable: true
          title: Группа инвентаря
        name:
          type: string
          title: Название
          maxLength: 255
        unique_id:
          type: string
          nullable: true
          title: Артикул
          maxLength: 255
        category:
          type: integer
          nullable: true
          title: Категория
        image:
          type: string
          format: uri
          nullable: true
          title: Изображение
        extra:
          title: Доп. данные
        subleases:
          type: array
          items:
            $ref: '#/components/schemas/InventorySublease'
          readOnly: true
        state:
          type: integer
          nullable: true
          title: Состояние
        disabled:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/DisabledEnum'
            - $ref: '#/components/schemas/NullEnum'
        rental_point:
          type: integer
          nullable: true
          title: Точка проката
        car:
          allOf:
            - $ref: '#/components/schemas/InventoryCar'
          readOnly: true
      required:
        - car
        - id
        - name
        - subleases
    Type9ddEnum:
      enum:
        - 0
        - 1
      type: integer
      description: |-
        * `0` - Аренда
        * `1` - Продажа
    InventorySublease:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        inventory:
          type: integer
          title: Инвентарь
        user:
          type: integer
          title: Владелец субаренды
        percent:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          title: Процент субаренды
        start_at:
          type: string
          format: date-time
          nullable: true
          title: Начало периода
        end_at:
          type: string
          format: date-time
          nullable: true
          title: Конец периода
        is_current:
          type: boolean
          readOnly: true
        created_at:
          type: string
          format: date-time
          readOnly: true
          title: Создан
      required:
        - created_at
        - id
        - inventory
        - is_current
        - percent
        - user
    DisabledEnum:
      enum:
        - 0
        - 1
        - 2
      type: integer
      description: |-
        * `0` - удалить
        * `1` - Архив
        * `2` - Списано
    InventoryCar:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        type:
          $ref: '#/components/schemas/InventoryCarTypeEnum'
        brand:
          type: string
          nullable: true
          maxLength: 255
        model:
          type: string
          nullable: true
          maxLength: 255
        number:
          type: string
          nullable: true
          maxLength: 255
        tech_passport:
          type: string
          nullable: true
          maxLength: 255
        serial:
          type: string
          nullable: true
          maxLength: 255
        vin:
          type: string
          nullable: true
          maxLength: 18
        extra: {}
      required:
        - id
    InventoryCarTypeEnum:
      enum:
        - CAR
        - SCOOTER
        - MOTORCYCLE
      type: string
      description: |-
        * `CAR` - Автомобиль
        * `SCOOTER` - Электросамокат
        * `MOTORCYCLE` - Мотоцикл/Мопед
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````