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



## OpenAPI

````yaml /openapi/shop.json patch /v1/shop/sales/{sale_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/shop/sales/{sale_id}/:
    patch:
      tags:
        - sales
      summary: Patch sales
      operationId: sales_partial_update
      parameters:
        - in: path
          name: sale_id
          schema:
            type: integer
          required: true
        - $ref: '#/components/parameters/TenantId'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedOrderSale'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedOrderSale'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedOrderSale'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderSale'
          description: ''
      security:
        - jwtAuth: []
components:
  parameters:
    TenantId:
      name: X-Tenant-Id
      in: header
      required: false
      schema:
        type: integer
      description: >-
        Компания, в контексте которой выполняется запрос — её id из `GET
        /v1/tenant/`. Пользователь должен состоять в этой компании: чужой id
        доступа к данным не даёт. Без заголовка компания определяется по домену
        запроса.
  schemas:
    PatchedOrderSale:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        client:
          type: integer
          nullable: true
          title: Клиент
        agent:
          type: integer
          nullable: true
          title: Агент
        discount:
          type: integer
          nullable: true
          title: Скидка
        additional_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        discount_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        price_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        paid_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        created_by:
          type: integer
        rental_point:
          type: integer
          readOnly: true
          nullable: true
          title: Точка проката
        status:
          allOf:
            - $ref: '#/components/schemas/Status518Enum'
          readOnly: true
          title: Статус
    OrderSale:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        client:
          type: integer
          nullable: true
          title: Клиент
        agent:
          type: integer
          nullable: true
          title: Агент
        discount:
          type: integer
          nullable: true
          title: Скидка
        additional_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
        discount_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        price:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        price_discount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        paid_amount:
          type: string
          format: decimal
          pattern: ^-?\d{0,14}(?:\.\d{0,2})?$
          readOnly: true
        created_by:
          type: integer
        rental_point:
          type: integer
          readOnly: true
          nullable: true
          title: Точка проката
        status:
          allOf:
            - $ref: '#/components/schemas/Status518Enum'
          readOnly: true
          title: Статус
      required:
        - discount_amount
        - id
        - paid_amount
        - price
        - price_discount
        - rental_point
        - status
    Status518Enum:
      enum:
        - 0
        - 1
        - 2
      type: integer
      description: |-
        * `0` - черновик
        * `1` - Продано
        * `2` - Отменено
  securitySchemes:
    jwtAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````