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

# Update Order

> Update a return order with customer information and line items



## OpenAPI

````yaml PATCH /order
openapi: 3.1.0
info:
  title: R4 API
  description: API for integrating dry cleaning location services and order tracking
  version: 1.0.0
servers:
  - url: https://dev.api.r4technology.io
security:
  - basicAuth: []
paths:
  /order:
    patch:
      description: Update a return order with customer information and line items
      requestBody:
        description: Order details including customer information and items to return
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OrderUpdateRequest'
        required: true
      responses:
        '200':
          description: Order received successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderResponse'
              example:
                code: Success
                message: Order received successfully.
                return_order_id: TRNZABCDEFGHIJKLMNOP
                qr_code_url: >-
                  https://the-return-public-assets.s3.amazonaws.com/qr-codes/TRNZABCDEFGHIJKLMNOP.png
        '400':
          description: Invalid order data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrderUpdateRequest:
      required:
        - return_order_id
        - items
      type: object
      properties:
        return_order_id:
          description: R4 return order identifier to update
          type: string
        email:
          description: Customer email address
          type: string
          format: email
        name:
          description: Customer name
          type: string
        items:
          description: Array of line items to return
          type: array
          items:
            $ref: '#/components/schemas/LineItem'
        destination_id:
          description: >-
            Destination identifier where the package will ultimately be
            transfered to from our consolidation hub
          type: string
        seller_id:
          description: Seller identifier that identifies the original seller of the item
          type: string
        expiration_date:
          description: >-
            The date after which the order will no longer be accepted at a
            dropoff location
          type: string
          format: date
        delivery_address:
          description: Optional delivery address for the order
          type: object
          properties:
            address_line_1:
              description: Primary street address
              type: string
            address_line_2:
              description: Secondary address line (apartment, suite, etc.)
              type: string
            city:
              description: City name
              type: string
            state:
              description: State abbreviation
              type: string
            zip:
              description: ZIP code
              type: string
    OrderResponse:
      type: object
      properties:
        code:
          description: Response status code
          type: string
        message:
          description: Response message
          type: string
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    LineItem:
      required:
        - id
        - sku
        - title
        - price
      type: object
      properties:
        id:
          description: Line item identifier
          type: string
        sku:
          description: Product SKU
          type: string
        variant_id:
          description: Product variant identifier
          type: string
        title:
          description: Product title with variant details
          type: string
        description:
          description: Product description
          type: string
        price:
          description: Item price
          type: string
        return_reason:
          description: Reason for return
          type: string
        dry_clean_service:
          description: Whether dry cleaning service is requested for this item
          type: boolean
        photo_url:
          description: URL to the product photo
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````