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

# Track Order with Packages

> Get tracking information for a return order, including a breakdown of packages and the items in each package



## OpenAPI

````yaml GET /tracking/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:
  /tracking/order:
    get:
      description: >-
        Get tracking information for a return order, including a breakdown of
        packages and the items in each package
      parameters:
        - name: order_id
          in: query
          description: The return order ID to track
          required: true
          schema:
            type: string
            default: ZG12345678
      responses:
        '200':
          description: Tracking information for the order
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderTrackingResponse'
              example:
                order_id: ZG12345678
                current_status: hub dropoff
                tracking_updates:
                  - status: order created
                    timestamp: '2025-03-15T12:00:00Z'
                    description: Return order created
                  - status: detail
                    timestamp: '2025-03-15T14:23:17Z'
                    description: Package scanned and received at a dropoff point
                  - status: hub dropoff
                    timestamp: '2025-03-16T09:12:48Z'
                    description: Package arrived at consolidation hub
                total_updates: 3
                packages:
                  - package_id: 550e8400e29b41d4a716446655440000_02-010005
                    items:
                      - id: abc123
                        sku: SHIRT-BLU-LG
                        title: Blue Shirt
                        description: Classic blue button-down shirt
                        variant_description: Large
                        quantity: 1
                        image: https://example.com/shirt.jpg
        '400':
          description: Missing or invalid order ID
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    OrderTrackingResponse:
      type: object
      properties:
        order_id:
          description: The order ID that was looked up
          type: string
        current_status:
          description: The most recent status across all packages in the order
          type: string
        tracking_updates:
          description: Array of tracking updates in chronological order
          type: array
          items:
            $ref: '#/components/schemas/TrackingUpdate'
        total_updates:
          description: Total number of tracking updates
          type: integer
        packages:
          description: Array of packages in the order, each containing their line items
          type: array
          items:
            $ref: '#/components/schemas/Package'
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    TrackingUpdate:
      type: object
      properties:
        return_order_id:
          description: The return order ID for this tracking update
          type: string
        status:
          description: Status code for this update
          type: string
        timestamp:
          description: ISO 8601 timestamp of the update
          type: string
          format: date-time
        description:
          description: Human-readable description of the status
          type: string
    Package:
      type: object
      properties:
        package_id:
          description: >-
            Encoded package identifier combining return_order_id and
            spot_order_key. Null if the package has not yet been assigned a
            spot_order_key.
          type: string
          nullable: true
        items:
          description: Array of items in this package
          type: array
          items:
            $ref: '#/components/schemas/TrackingItem'
    TrackingItem:
      type: object
      properties:
        id:
          description: Line item identifier
          type: string
        sku:
          description: Product SKU
          type: string
        title:
          description: Product title
          type: string
        description:
          description: Product description
          type: string
        variant_description:
          description: Product variant description
          type: string
        quantity:
          description: Quantity of this item in the package
          type: integer
        image:
          description: URL to the product image
          type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic

````