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

# Update order line

> Updates an existing order line's product, variant, quantity, pricing, and tax information. Validates that the product and variant exist. Publishes an order updated event.



## OpenAPI

````yaml /swagger/management-api.json patch /api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines/{line_id}
openapi: 3.0.0
info:
  contact:
    email: support@enad.io
    name: API support
    url: http://enad.io/support
  description: This is the documentation for Public API v1
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  termsOfService: http://enad.io/terms/
  title: Public API
  version: '1.0'
servers:
  - url: //api.enad.io
security: []
paths:
  /api/v1/{team_slug}/{app_slug}/orders/{order_id}/lines/{line_id}:
    patch:
      tags:
        - Orders
      summary: Update order line
      description: >-
        Updates an existing order line's product, variant, quantity, pricing,
        and tax information. Validates that the product and variant exist.
        Publishes an order updated event.
      parameters:
        - description: App slug
          in: path
          name: app_slug
          required: true
          schema:
            type: string
        - description: Team slug
          in: path
          name: team_slug
          required: true
          schema:
            type: string
        - description: Order ID (UUID)
          in: path
          name: order_id
          required: true
          schema:
            type: string
        - description: Order line ID (UUID)
          in: path
          name: line_id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/internal_pkg_webserver_v1.InputOrderLine'
        description: Order line update data
        required: true
      responses:
        '200':
          description: Order line updated successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/internal_pkg_webserver_v1.OkResponse-internal_pkg_webserver_v1_OrderLineResponse
        '400':
          description: >-
            Invalid request (validation error, product/variant not found, line
            doesn't belong to order)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '401':
          description: Unauthorized access
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '404':
          description: Order or order line not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/internal_pkg_webserver_v1.ErrorMessage'
      security:
        - BearerAuth: []
components:
  schemas:
    internal_pkg_webserver_v1.InputOrderLine:
      properties:
        base_price_amount:
          minimum: 0
          type: number
        currency_code:
          type: string
        product_id:
          type: string
        quantity:
          minimum: 1
          type: integer
        tax_group_id:
          type: string
        total_discount_amount:
          minimum: 0
          type: number
        total_price_amount:
          minimum: 0
          type: number
        total_tax_amount:
          minimum: 0
          type: number
        variant_id:
          type: string
      required:
        - base_price_amount
        - currency_code
        - product_id
        - quantity
        - total_price_amount
        - variant_id
      type: object
    internal_pkg_webserver_v1.OkResponse-internal_pkg_webserver_v1_OrderLineResponse:
      properties:
        data:
          $ref: '#/components/schemas/internal_pkg_webserver_v1.OrderLineResponse'
        details:
          description: >-
            Additional contextual information about the response. Used to
            provide supplementary details beyond the main data payload, such as
            validation warnings or processing notes
          items:
            type: string
          type: array
        success:
          type: boolean
      type: object
    internal_pkg_webserver_v1.ErrorMessage:
      properties:
        details:
          items:
            type: string
          type: array
        message:
          type: string
        success:
          type: boolean
      type: object
    internal_pkg_webserver_v1.OrderLineResponse:
      properties:
        base_price_amount:
          type: number
        created_at:
          type: string
        currency_code:
          type: string
        first_image_path:
          type: string
        id:
          type: string
        order_id:
          type: string
        product_id:
          type: string
        product_name:
          type: string
        product_number:
          type: string
        quantity:
          type: integer
        short_description:
          type: string
        tax_group_id:
          type: string
        total_discount_amount:
          type: number
        total_price_amount:
          type: number
        total_sale_price:
          type: number
        total_tax_amount:
          type: number
        updated_at:
          type: string
        variant_id:
          type: string
        variant_name:
          type: string
        variant_number:
          type: string
      type: object

````