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

# Tracking Update

> Sends order tracking updates to your endpoint when the status of an order changes. Each update includes the packages that belong to the order, along with the items in each package.

<Note>
  This is a webhook that we send to your endpoint. You cannot call this endpoint.
</Note>


## OpenAPI

````yaml POST /endpoint/tracking-webhook
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:
  /endpoint/tracking-webhook:
    post:
      description: >-
        Sends order tracking updates to your endpoint when the status of an
        order changes. Each update includes the packages that belong to the
        order, along with the items in each package.
      requestBody:
        description: Tracking update notification
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPayload'
            example:
              return_order_id: ZG12345678
              store_id: hou-store-042
              status: detail
              timestamp: '2025-03-15T14:23:17Z'
              description: Package scanned and received at a dropoff point
              packages:
                - package_id: 01044ed53ce747ec8c115009233f759d_02-010012
                  items:
                    - id: 050f5297-e022-4903-ac21-0e1c36f63850
                      sku: SHIRT-BLU-LG
                      title: Blue Shirt
                      description: Classic blue button-down shirt
                      variant_description: Large
                      quantity: 1
                      image: https://example.com/shirt.jpg
components:
  schemas:
    WebhookPayload:
      type: object
      example:
        return_order_id: ZG12345678
        store_id: hou-store-042
        status: detail
        timestamp: '2025-03-15T14:23:17Z'
        description: Package scanned and received at a dropoff point
        packages:
          - package_id: 01044ed53ce747ec8c115009233f759d_02-010012
            items:
              - id: 050f5297-e022-4903-ac21-0e1c36f63850
                sku: SHIRT-BLU-LG
                title: Blue Shirt
                description: Classic blue button-down shirt
                variant_description: Large
                quantity: 1
                image: https://example.com/shirt.jpg
      properties:
        return_order_id:
          description: The return order ID for this tracking update
          type: string
        store_id:
          description: The external ID of the store where the package was dropped off
          type: string
        status:
          description: The new status of the order
          type: string
        timestamp:
          description: ISO 8601 timestamp of the status update
          type: string
          format: date-time
        description:
          description: Human-readable description of the status
          type: string
        packages:
          description: >-
            Packages belonging to this order that have been assigned a package
            ID. Items not yet assigned to a package are excluded.
          type: array
          items:
            $ref: '#/components/schemas/Package'
    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

````