> ## 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.

# Create deliveries



## OpenAPI

````yaml /openapi/orders.json post /v1/crm/requests/{request_id}/deliveries/
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/:
    post:
      tags:
        - deliveries
      summary: Create deliveries
      operationId: deliveries_create
      parameters:
        - in: path
          name: request_id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderRequestDeliveryBase'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/OrderRequestDeliveryBase'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/OrderRequestDeliveryBase'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderRequestDeliveryBase'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    OrderRequestDeliveryBase:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        request:
          type: integer
          readOnly: true
          title: Аренда
        delivery_place:
          $ref: '#/components/schemas/Geolocation'
        issue_place:
          $ref: '#/components/schemas/Geolocation'
        worker:
          type: integer
          title: Исполнитель
        cancel_comment:
          type: string
          readOnly: true
          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
      required:
        - cancel_comment
        - delivery_place
        - id
        - images
        - issue_place
        - pickup_date
        - price
        - request
        - type
        - worker
    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
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````