{
  "openapi": "3.0.3",
  "info": {
    "title": "Owlery Developer Portal API",
    "description": "The API URL is `https://api.owlery.ai/api/ext/v1`. Access is handled via an API key passed as Bearer Token. Contact `support@owlery.ai` for an API Key. Endpoints are grouped by audience: [Shipper](/open/api#api-1/tag/shipper-overview), [Carrier](/open/api#api-1/tag/carrier-overview), and [Facility](/open/api#api-1/tag/facility-overview).",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.owlery.ai"
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "shipper-overview",
      "x-displayName": "Overview",
      "description": "Shipper-facing APIs for planning, load search, document search/download, items, rate quotes, tendering, and shipper webhooks. Direct link: `/open/api#api-1/tag/shipper-overview`."
    },
    {
      "name": "carrier-overview",
      "x-displayName": "Overview",
      "description": "Carrier-facing APIs for invoices, load creation, tracking updates, document submission, rate quote responses, tender responses, and carrier webhooks. Direct link: `/open/api#api-1/tag/carrier-overview`."
    },
    {
      "name": "facility-overview",
      "x-displayName": "Overview",
      "description": "Facility-facing APIs for creating/updating facility child orders and confirming orders. Direct link: `/open/api#api-1/tag/facility-overview`."
    },
    {
      "name": "shipper-plan",
      "x-displayName": "Plan",
      "description": "Create transportation plans for one or more orders."
    },
    {
      "name": "shipper-loads",
      "x-displayName": "Loads",
      "description": "Search loads."
    },
    {
      "name": "shipper-documents",
      "x-displayName": "Documents",
      "description": "Search and download documents attached to loads and orders."
    },
    {
      "name": "shipper-items",
      "x-displayName": "Items",
      "description": "Create, update, or delete inventory items."
    },
    {
      "name": "shipper-rate-quote",
      "x-displayName": "Rate Quote",
      "description": "Request freight rate quotes from existing orders or standalone quote data."
    },
    {
      "name": "shipper-tender",
      "x-displayName": "Tender",
      "description": "Tender a specific rate quote response at its quoted price."
    },
    {
      "name": "shipper-webhooks",
      "x-displayName": "Webhooks",
      "description": "Webhooks sent by Owlery when orders, tenders, invoices, order-level load stop dates, or loads are updated."
    },
    {
      "name": "carrier-invoices",
      "x-displayName": "Invoices",
      "description": "Submit invoices directly to Owlery."
    },
    {
      "name": "carrier-loads",
      "x-displayName": "Loads",
      "description": "Create loads in Owlery."
    },
    {
      "name": "carrier-tracking",
      "x-displayName": "Tracking",
      "description": "Push load tracking status updates to Owlery."
    },
    {
      "name": "carrier-documents",
      "description": "Submit load documents to Owlery.",
      "x-displayName": "Documents"
    },
    {
      "name": "carrier-rate-quotes",
      "x-displayName": "Rate Quotes",
      "description": "Submit carrier quote responses asynchronously to Owlery."
    },
    {
      "name": "carrier-tender-responses",
      "x-displayName": "Tender Responses",
      "description": "Carrier responses to original tenders and tender edits."
    },
    {
      "name": "carrier-webhooks",
      "x-displayName": "Webhooks",
      "description": "Rate quote, tender, tender edit, and cancel webhooks sent by Owlery to carrier systems. Authentication is provided through carrier-configured request headers, not body fields."
    },
    {
      "name": "facility-orders",
      "x-displayName": "Orders",
      "description": "Create or update facility child orders for inbound receiving and outbound shipping work."
    }
  ],
  "paths": {
    "/api/ext/v1/plan": {
      "post": {
        "tags": [
          "shipper-overview",
          "shipper-plan"
        ],
        "summary": "Create a Plan",
        "description": "This endpoint creates a transportation plan for one or more orders.\n\nEach order may include pallet rows in `loadItems`. Pallet rows are checked before anything in the request is saved: if any order has invalid pallet rows (`400`) or omits the pallet rows of an order that already has them (`409`), the whole request is rejected and nothing is saved. A `200` response means only that the orders were saved; existing quotes and loads are not recalculated when an order's items or pallet rows change.",
        "operationId": "createPlan",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UpsertOrder"
                }
              },
              "examples": {
                "standardOrder": {
                  "summary": "Order without pallet rows",
                  "value": [
                    {
                      "type": "transfer",
                      "isTest": true,
                      "orderNumber": "TEST-123",
                      "source": "NetSuite",
                      "sourceId": "123456",
                      "status": "open",
                      "items": [
                        {
                          "expectedQuantity": 200,
                          "unitOfMeasure": "case",
                          "inventory": {
                            "sku": "A01-COFFEE",
                            "name": "Night Owl Coffee"
                          }
                        }
                      ],
                      "stops": [
                        {
                          "index": 0,
                          "type": "pickup",
                          "facility": {
                            "lookupCode": "INT",
                            "source": "NetSuite",
                            "sourceId": "F100001",
                            "location": {
                              "street": "123 Main Street",
                              "city": "Joliet",
                              "state": "IL",
                              "zipcode": "60436"
                            }
                          },
                          "orderDates": {
                            "startAt": "2023-02-23"
                          },
                          "preventSendOrder": false
                        },
                        {
                          "index": 1,
                          "type": "dropoff",
                          "facility": {
                            "lookupCode": "NJ",
                            "source": "NetSuite",
                            "sourceId": "F100002",
                            "location": {
                              "street": "456 First Ave",
                              "city": "Newfield",
                              "state": "NJ",
                              "zipcode": "08344"
                            }
                          },
                          "orderDates": {
                            "startAt": "2023-02-26"
                          },
                          "preventSendOrder": false
                        }
                      ]
                    }
                  ]
                },
                "orderWithPalletRows": {
                  "summary": "Order with pallet rows",
                  "description": "Each pallet row lists the positions of its items in `items`. Every item is on exactly one row.",
                  "value": [
                    {
                      "type": "sales",
                      "isTest": true,
                      "orderNumber": "TEST-124",
                      "source": "NetSuite",
                      "sourceId": "123457",
                      "status": "open",
                      "items": [
                        {
                          "expectedQuantity": 200,
                          "unitOfMeasure": "case",
                          "inventory": {
                            "sku": "A01-COFFEE",
                            "name": "Night Owl Coffee"
                          }
                        },
                        {
                          "expectedQuantity": 120,
                          "unitOfMeasure": "case",
                          "inventory": {
                            "sku": "A02-TEA",
                            "name": "Early Bird Tea"
                          }
                        }
                      ],
                      "loadItems": [
                        {
                          "quantity": {
                            "count": 2,
                            "unit": "pallet"
                          },
                          "dimensions": {
                            "length": 48,
                            "width": 40,
                            "height": 50,
                            "unit": "in"
                          },
                          "weight": {
                            "value": 1800,
                            "unit": "lb"
                          },
                          "class": "CLASS_70",
                          "isStackable": false,
                          "isTurnable": true,
                          "orderItemIndexes": [
                            0
                          ]
                        },
                        {
                          "quantity": {
                            "count": 1,
                            "unit": "pallet"
                          },
                          "dimensions": {
                            "length": 48,
                            "width": 40,
                            "height": 45,
                            "unit": "in"
                          },
                          "weight": {
                            "value": 650,
                            "unit": "lb"
                          },
                          "class": "CLASS_85",
                          "nmfcCode": "12345",
                          "description": "Tea cases",
                          "isStackable": true,
                          "isTurnable": true,
                          "orderItemIndexes": [
                            1
                          ]
                        }
                      ],
                      "stops": [
                        {
                          "index": 0,
                          "type": "pickup",
                          "facility": {
                            "lookupCode": "INT",
                            "sourceId": "F100001",
                            "location": {
                              "street": "123 Main Street",
                              "city": "Joliet",
                              "state": "IL",
                              "zipcode": "60436"
                            }
                          },
                          "orderDates": {
                            "startAt": "2023-02-23"
                          },
                          "preventSendOrder": false
                        },
                        {
                          "index": 1,
                          "type": "dropoff",
                          "facility": {
                            "lookupCode": "NJ",
                            "sourceId": "F100002",
                            "location": {
                              "street": "456 First Ave",
                              "city": "Newfield",
                              "state": "NJ",
                              "zipcode": "08344"
                            }
                          },
                          "orderDates": {
                            "startAt": "2023-02-26"
                          },
                          "preventSendOrder": false
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Plan created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanOrderResponse"
                },
                "example": {
                  "createdOrders": [
                    {
                      "orderNumber": "TEST-INT20230201NJ"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Pallet rows are invalid. Nothing in the request is saved. `detail.validationIssues` lists each value to fix.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanValidationErrorResponse"
                },
                "examples": {
                  "invalidPalletRow": {
                    "summary": "Invalid pallet row value",
                    "value": {
                      "statusCode": 400,
                      "message": "Pallet rows on order TEST-124 are missing or invalid. Send 1 to 100 rows, each with a pallet count and the quantity unit \"pallet\", positive dimensions, a total weight, a freight class such as CLASS_70, and stackable and turnable flags, then send the order again.",
                      "userFacingMessages": [],
                      "detail": {
                        "validationIssues": [
                          {
                            "path": [
                              0,
                              "loadItems",
                              1,
                              "weight",
                              "value"
                            ],
                            "message": "Enter a value that is greater than 0."
                          }
                        ]
                      }
                    }
                  },
                  "itemNotOnPalletRow": {
                    "summary": "Item not on any pallet row",
                    "value": {
                      "statusCode": 400,
                      "message": "Add A02-TEA to a pallet row on order TEST-124, then send the order again. Every item must be on one pallet row.",
                      "userFacingMessages": [],
                      "detail": {
                        "validationIssues": [
                          {
                            "path": [
                              0,
                              "items",
                              1
                            ],
                            "message": "Add this item to a pallet row."
                          }
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "An order in the request already has pallet rows but was sent without `loadItems`. Nothing in the request is saved. Send the whole request again with every pallet row of each order in `detail.orderNumbers`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlanConflictErrorResponse"
                },
                "example": {
                  "statusCode": 409,
                  "message": "Pallet rows already exist on TEST-124, so nothing in this request was saved. Send the whole request again with every pallet row of each listed order in loadItems.",
                  "userFacingMessages": [],
                  "detail": {
                    "orderNumbers": [
                      "TEST-124"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/facility-orders": {
      "post": {
        "tags": [
          "facility-overview",
          "facility-orders"
        ],
        "summary": "Upsert Facility Orders",
        "description": "Create or update one or more facility child orders. The integration source is configured in the Bearer token and must not be included in the request body. Send `inbound` orders for receiving work and `outbound` orders for shipping work. Each facility order must include `sourceId` and the target stop: dropoff at index `1` for inbound orders or pickup at index `0` for outbound orders. The target stop must include a facility and at least one planned, actual, or appointment date. The non-target stop is optional; when provided, pickup must use index `0` and dropoff must use index `1`.",
        "operationId": "upsertFacilityOrders",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/FacilityOrderUpsert"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/FacilityOrderUpsert"
                    }
                  }
                ]
              },
              "example": [
                {
                  "type": "inbound",
                  "isTest": false,
                  "orderNumber": "BY-INB-1001",
                  "sourceId": "BY-INB-1001-source",
                  "status": "open",
                  "stops": [
                    {
                      "index": 1,
                      "type": "dropoff",
                      "sourceId": "BY-INB-1001-dropoff",
                      "facility": {
                        "sourceId": "FAC-BY-001",
                        "name": "RealCold Rialto",
                        "location": {
                          "street": "1744 N Laurel Ave",
                          "city": "Rialto",
                          "state": "CA",
                          "zipcode": "92376"
                        }
                      },
                      "orderDates": {
                        "startAt": "2026-08-01"
                      }
                    }
                  ],
                  "items": [
                    {
                      "expectedQuantity": 10,
                      "unitOfMeasure": "case",
                      "inventory": {
                        "sku": "A01-COFFEE",
                        "name": "Night Owl Coffee"
                      }
                    }
                  ],
                  "referenceNumbers": [
                    {
                      "type": "PO",
                      "value": "BY-INB-1001-po"
                    }
                  ]
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "All facility orders were upserted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacilityOrderUpsertResponse"
                },
                "example": {
                  "createdOrders": [
                    {
                      "orderNumber": "BY-INB-1001",
                      "type": "inbound"
                    }
                  ],
                  "failures": []
                }
              }
            }
          },
          "207": {
            "description": "Partial success - some facility orders failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacilityOrderUpsertResponse"
                },
                "example": {
                  "createdOrders": [
                    {
                      "orderNumber": "BY-INB-1001",
                      "type": "inbound"
                    }
                  ],
                  "failures": [
                    {
                      "failureErrorString": "Order BY-OUT-1002 has missing facility"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "No facility orders were accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FacilityOrderUpsertResponse"
                },
                "example": {
                  "createdOrders": [],
                  "failures": [
                    {
                      "failureErrorString": "No facility orders received"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/orders-updated": {
      "post": {
        "x-webhook": true,
        "tags": [
          "shipper-webhooks"
        ],
        "summary": "Orders Updated",
        "description": "Webhook payload sent when orders are updated. Webhooks are sent when orders are marked as `closed` and no webhook has been sent previously (unless manually re-triggered). Orders reach `closed` status through: (1) Owlery API Order Confirmation via `/api/ext/v1/order/confirm`, (2) EDI Transactions (944/945), or (3) Integration Sync (e.g. WMS).",
        "operationId": "webhookOrdersUpdated",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WebhookOrder"
                }
              },
              "example": [
                {
                  "type": "inbound",
                  "orderNumber": "SO11112",
                  "source": "NetSuite",
                  "sourceId": "123456",
                  "items": [
                    {
                      "sku": "CT-BL",
                      "name": "Coffee table [DEMO]",
                      "expectedQuantity": 50,
                      "actualQuantity": 40,
                      "sourceId": "1234",
                      "details": [
                        {
                          "unitOfMeasure": "case",
                          "actualQuantity": 10,
                          "lotCode": "L123458",
                          "expirationDate": "2022-01-25"
                        },
                        {
                          "unitOfMeasure": "case",
                          "actualQuantity": 30,
                          "lotCode": "L123459",
                          "expirationDate": "2022-01-26"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "message": "Orders updated successfully"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/tenders-updated": {
      "post": {
        "x-webhook": true,
        "tags": [
          "shipper-webhooks"
        ],
        "summary": "Tenders Updated",
        "description": "Webhook payload sent when tenders are created, accepted, or BOLs are generated. Tender webhooks are sent when a tender reaches one of the following statuses: BOL Created, Carrier Selected, or Tendered. The `loadNumber` field is optional at this stage: some carriers do not return a load number until the tender is accepted. Before acceptance, Owlery only sends `loadNumber` when a real load number is already available, or when Universal Shipment ID enforcement is enabled for a supported Manual/EDI-style tender and the carrier/source tender identifier is intentionally used as the Owlery load number.",
        "operationId": "webhookTendersUpdated",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TenderWebhookMessage"
                }
              },
              "examples": {
                "singleTender": {
                  "summary": "Single tender",
                  "value": [
                    {
                      "id": "507f1f77bcf86cd799439011",
                      "loadNumber": "LOAD-12345",
                      "referenceNumbers": [
                        {
                          "type": "PO",
                          "value": "PO-12345"
                        },
                        {
                          "type": "BOL",
                          "value": "BOL-67890"
                        }
                      ],
                      "mode": "FTL",
                      "equipmentType": "Reefer",
                      "reeferSettings": {
                        "minTemperature": 34,
                        "maxTemperature": 38,
                        "unit": "F",
                        "sentryMode": "Continuous"
                      },
                      "isTeamRate": false,
                      "isContractRate": true,
                      "isDirectTender": false,
                      "shipmentMode": "Normal",
                      "stops": [
                        {
                          "index": 0,
                          "type": "Pickup",
                          "orders": [
                            {
                              "orderNumber": "ORD-10001"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776758400000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776765600000
                              }
                            },
                            "appointmentDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776762000000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776763800000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Origin Warehouse",
                            "location": {
                              "street": "123 Main St",
                              "city": "Chicago",
                              "state": "IL",
                              "zipcode": "60601",
                              "countryCode": "US"
                            }
                          }
                        },
                        {
                          "index": 1,
                          "type": "Dropoff",
                          "orders": [
                            {
                              "orderNumber": "ORD-10001"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776870000000
                              },
                              "endAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776873600000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Destination DC",
                            "location": {
                              "street": "456 First Ave",
                              "city": "New York",
                              "state": "NY",
                              "zipcode": "10001",
                              "countryCode": "US"
                            }
                          }
                        }
                      ],
                      "orders": [
                        {
                          "orderNumber": "ORD-10001",
                          "pickupStopIndex": 0,
                          "dropoffStopIndex": 1,
                          "pickupSequenceNumber": 0,
                          "dropoffSequenceNumber": 0
                        }
                      ],
                      "price": {
                        "cents": 125000,
                        "currencyCode": "USD"
                      },
                      "lineItems": [
                        {
                          "description": "Line haul",
                          "category": "lineHaul",
                          "total": 100000,
                          "code": "LH001",
                          "unitCount": 1,
                          "unitPrice": 100000
                        },
                        {
                          "description": "Fuel surcharge",
                          "category": "fuelSurcharge",
                          "total": 25000,
                          "code": "FSC"
                        }
                      ],
                      "broker": {
                        "name": "Great Freight LLC",
                        "address": "789 Carrier Blvd, Dallas, TX 75201",
                        "phone": "+12145551234",
                        "email": "dispatch@greatfreight.com",
                        "mcNumber": "MC123456",
                        "dotNumber": "DOT789012",
                        "scac": "GRFT"
                      },
                      "status": "Tendered",
                      "updatedAtInMs": 1776787200000,
                      "updatedBy": "user@example.com"
                    }
                  ]
                },
                "consolidatedTender": {
                  "summary": "Consolidated tender with header-level order mapping",
                  "value": [
                    {
                      "id": "507f1f77bcf86cd799439022",
                      "loadNumber": "LOAD-98765",
                      "referenceNumbers": [
                        {
                          "type": "PO",
                          "value": "PO-12345"
                        },
                        {
                          "type": "BOL",
                          "value": "BOL-67890"
                        }
                      ],
                      "mode": "FTL",
                      "equipmentType": "Reefer",
                      "reeferSettings": {
                        "minTemperature": 34,
                        "maxTemperature": 38,
                        "unit": "F",
                        "sentryMode": "Continuous"
                      },
                      "isTeamRate": false,
                      "isContractRate": true,
                      "isDirectTender": false,
                      "shipmentMode": "Normal",
                      "stops": [
                        {
                          "index": 0,
                          "type": "Pickup",
                          "orders": [
                            {
                              "orderNumber": "ORD-10001"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776758400000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776765600000
                              }
                            },
                            "appointmentDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776762000000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776763800000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Origin Warehouse",
                            "location": {
                              "street": "123 Main St",
                              "city": "Chicago",
                              "state": "IL",
                              "zipcode": "60601",
                              "countryCode": "US"
                            }
                          }
                        },
                        {
                          "index": 1,
                          "type": "Pickup",
                          "orders": [
                            {
                              "orderNumber": "ORD-10002"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776758400000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776765600000
                              }
                            },
                            "appointmentDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776762000000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776763800000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Second Origin Warehouse",
                            "location": {
                              "street": "500 Dock Rd",
                              "city": "Milwaukee",
                              "state": "WI",
                              "zipcode": "53202",
                              "countryCode": "US"
                            }
                          }
                        },
                        {
                          "index": 2,
                          "type": "Dropoff",
                          "orders": [
                            {
                              "orderNumber": "ORD-10001"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776870000000
                              },
                              "endAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776873600000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Destination DC",
                            "location": {
                              "street": "456 First Ave",
                              "city": "New York",
                              "state": "NY",
                              "zipcode": "10001",
                              "countryCode": "US"
                            }
                          }
                        },
                        {
                          "index": 3,
                          "type": "Dropoff",
                          "orders": [
                            {
                              "orderNumber": "ORD-10002"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776870000000
                              },
                              "endAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776873600000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Second Destination DC",
                            "location": {
                              "street": "900 Harbor Ave",
                              "city": "Newark",
                              "state": "NJ",
                              "zipcode": "07114",
                              "countryCode": "US"
                            }
                          }
                        }
                      ],
                      "orders": [
                        {
                          "orderNumber": "ORD-10001",
                          "pickupStopIndex": 0,
                          "dropoffStopIndex": 2,
                          "pickupSequenceNumber": 0,
                          "dropoffSequenceNumber": 0
                        },
                        {
                          "orderNumber": "ORD-10002",
                          "pickupStopIndex": 1,
                          "dropoffStopIndex": 3,
                          "pickupSequenceNumber": 1,
                          "dropoffSequenceNumber": 1
                        }
                      ],
                      "price": {
                        "cents": 125000,
                        "currencyCode": "USD"
                      },
                      "lineItems": [
                        {
                          "description": "Line haul",
                          "category": "lineHaul",
                          "total": 100000,
                          "code": "LH001",
                          "unitCount": 1,
                          "unitPrice": 100000
                        },
                        {
                          "description": "Fuel surcharge",
                          "category": "fuelSurcharge",
                          "total": 25000,
                          "code": "FSC"
                        }
                      ],
                      "broker": {
                        "name": "Great Freight LLC",
                        "address": "789 Carrier Blvd, Dallas, TX 75201",
                        "phone": "+12145551234",
                        "email": "dispatch@greatfreight.com",
                        "mcNumber": "MC123456",
                        "dotNumber": "DOT789012",
                        "scac": "GRFT"
                      },
                      "status": "Tendered",
                      "updatedAtInMs": 1776787200000,
                      "updatedBy": "user@example.com"
                    }
                  ]
                },
                "multiOrderDifferentStopIndexes": {
                  "summary": "Multiple orders with different route and stop-type indexes",
                  "description": "Demonstrates that pickupStopIndex/dropoffStopIndex are route stop indexes, while pickupSequenceNumber/dropoffSequenceNumber are zero-based within pickup or dropoff stops only.",
                  "value": [
                    {
                      "id": "507f1f77bcf86cd799439033",
                      "loadNumber": "LOAD-24680",
                      "referenceNumbers": [
                        {
                          "type": "PO",
                          "value": "PO-MULTI-ORDER"
                        },
                        {
                          "type": "BOL",
                          "value": "BOL-MULTI-ORDER"
                        }
                      ],
                      "mode": "FTL",
                      "equipmentType": "Reefer",
                      "reeferSettings": {
                        "minTemperature": 34,
                        "maxTemperature": 38,
                        "unit": "F",
                        "sentryMode": "Continuous"
                      },
                      "isTeamRate": false,
                      "isContractRate": true,
                      "isDirectTender": false,
                      "shipmentMode": "Normal",
                      "stops": [
                        {
                          "index": 0,
                          "type": "Pickup",
                          "orders": [
                            {
                              "orderNumber": "ORD-10001"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776758400000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776765600000
                              }
                            },
                            "appointmentDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776762000000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776763800000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Order 10001 Pickup",
                            "location": {
                              "street": "123 Main St",
                              "city": "Chicago",
                              "state": "IL",
                              "zipcode": "60601",
                              "countryCode": "US"
                            }
                          }
                        },
                        {
                          "index": 1,
                          "type": "Pickup",
                          "orders": [
                            {
                              "orderNumber": "ORD-10002"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776758400000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776765600000
                              }
                            },
                            "appointmentDates": {
                              "startAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776762000000
                              },
                              "endAt": {
                                "timeZone": "America/Chicago",
                                "isDateOnly": false,
                                "tsInMs": 1776763800000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Order 10002 Pickup",
                            "location": {
                              "street": "500 Dock Rd",
                              "city": "Milwaukee",
                              "state": "WI",
                              "zipcode": "53202",
                              "countryCode": "US"
                            }
                          }
                        },
                        {
                          "index": 2,
                          "type": "Dropoff",
                          "orders": [
                            {
                              "orderNumber": "ORD-10002"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776870000000
                              },
                              "endAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776873600000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Order 10002 Dropoff",
                            "location": {
                              "street": "456 First Ave",
                              "city": "New York",
                              "state": "NY",
                              "zipcode": "10001",
                              "countryCode": "US"
                            }
                          }
                        },
                        {
                          "index": 3,
                          "type": "Dropoff",
                          "orders": [
                            {
                              "orderNumber": "ORD-10001"
                            }
                          ],
                          "items": [
                            {
                              "quantity": {
                                "count": 10,
                                "unit": "Pallet"
                              },
                              "weight": {
                                "value": 1200,
                                "unit": "LB"
                              },
                              "description": "Frozen prepared meals"
                            }
                          ],
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776870000000
                              },
                              "endAt": {
                                "timeZone": "America/New_York",
                                "isDateOnly": false,
                                "tsInMs": 1776873600000
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Order 10001 Dropoff",
                            "location": {
                              "street": "900 Harbor Ave",
                              "city": "Newark",
                              "state": "NJ",
                              "zipcode": "07114",
                              "countryCode": "US"
                            }
                          }
                        }
                      ],
                      "orders": [
                        {
                          "orderNumber": "ORD-10001",
                          "pickupStopIndex": 0,
                          "dropoffStopIndex": 3,
                          "pickupSequenceNumber": 0,
                          "dropoffSequenceNumber": 1
                        },
                        {
                          "orderNumber": "ORD-10002",
                          "pickupStopIndex": 1,
                          "dropoffStopIndex": 2,
                          "pickupSequenceNumber": 1,
                          "dropoffSequenceNumber": 0
                        }
                      ],
                      "price": {
                        "cents": 125000,
                        "currencyCode": "USD"
                      },
                      "lineItems": [
                        {
                          "description": "Line haul",
                          "category": "lineHaul",
                          "total": 100000,
                          "code": "LH001",
                          "unitCount": 1,
                          "unitPrice": 100000
                        },
                        {
                          "description": "Fuel surcharge",
                          "category": "fuelSurcharge",
                          "total": 25000,
                          "code": "FSC"
                        }
                      ],
                      "broker": {
                        "name": "Great Freight LLC",
                        "address": "789 Carrier Blvd, Dallas, TX 75201",
                        "phone": "+12145551234",
                        "email": "dispatch@greatfreight.com",
                        "mcNumber": "MC123456",
                        "dotNumber": "DOT789012",
                        "scac": "GRFT"
                      },
                      "status": "Tendered",
                      "updatedAtInMs": 1776787200000,
                      "updatedBy": "user@example.com"
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "message": "Tenders processed successfully"
                }
              }
            }
          },
          "400": {
            "description": "Receiver rejected the webhook as invalid. Owlery logs the failed delivery and does not mark that payload as sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "invalidPayload": {
                    "summary": "Invalid payload",
                    "value": {
                      "error": "Bad Request",
                      "message": "Missing required field: id",
                      "details": [
                        "id is required"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Receiver rejected the webhook because custom authentication headers were missing or invalid. Owlery logs the failed delivery and does not mark that payload as sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Unauthorized",
                    "value": {
                      "error": "Unauthorized",
                      "message": "Invalid webhook signature or API key"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Receiver failed while processing the webhook. Owlery logs the failed delivery and does not mark that payload as sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "receiverError": {
                    "summary": "Receiver error",
                    "value": {
                      "error": "Internal Server Error",
                      "message": "Unable to process tender webhook"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/order-load-stop-dates-updated": {
      "post": {
        "x-webhook": true,
        "tags": [
          "shipper-webhooks"
        ],
        "summary": "Order Load Stop Dates Updated",
        "description": "Webhook payload sent when a tendered order's related load stop estimated, appointment, or actual dates are first populated or later changed. This includes the initial tender when those load dates first become available. The payload is order-based: each stop `index` is zero-based within the order itself, not within the underlying load, so the index is `0` for pickup and `1` for dropoff even when the load is consolidated across more stops. Owlery only sends this webhook for orders it tendered, because Owlery must have the order-to-load stop mapping from the tender/BOL flow.\n\n### Stop Date Types\n\nEach date group describes the same pickup or dropoff stop:\n\n| Field | Meaning | `startAt` | `endAt` |\n| --- | --- | --- | --- |\n| `orderDates` | The customer's requested pickup or delivery window. | Start of the requested window. | End of the requested window. |\n| `estimatedDates` | The estimated pickup or delivery window. | Start of the estimated window. | End of the estimated window. |\n| `appointmentDates` | The scheduled appointment window at the facility. | Start of the appointment. | End of the appointment. |\n| `actualDates` | Recorded in and out times at the stop. | Actual in-time (arrival). | Actual out-time (departure). |\n\nStart and end refer to one stop, not to the pickup and delivery ends of the load.\n\n### Partial Dates and Date-Only Values\n\nThe webhook can arrive before all dates are known. All four date groups are optional, and `startAt` and `endAt` are independently optional within each group. For example, `actualDates` can contain an arrival time before a departure time is available. Read only the values provided; do not require a complete set of dates.\n\nFor each changed stop, Owlery includes its available date groups, not just the individual date field that changed.\n\nWhen a pickup stop has both `actualDates.startAt` and `actualDates.endAt`, the order is considered picked up. Carrier data can be incomplete, so either actual date may be missing even after pickup. When consuming this webhook, apply your business rules to partial actual dates rather than assuming a missing value means pickup has not occurred. For example, decide whether an out-time without an in-time is enough to mark the order as picked up, or whether your workflow needs additional confirmation.\n\nEach supplied value contains `dateTime`, `timeZone`, and `isDateOnly`. When `isDateOnly` is `false`, use the date and time. When it is `true`, interpret the value as a calendar date in `timeZone`, without a specific time. The `dateTime` field is still an ISO8601 timestamp; the flag determines whether its time portion is meaningful.",
        "operationId": "webhookOrderLoadStopDatesUpdated",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrderLoadStopDatesUpdatedWebhook"
                }
              },
              "examples": {
                "singleOrder": {
                  "summary": "Single order on a load",
                  "value": [
                    {
                      "orderNumber": "SO-10001",
                      "loadNumber": "LOAD-12345",
                      "source": "NetSuite",
                      "sourceId": "123456",
                      "stops": [
                        {
                          "index": 0,
                          "stopType": "pickup",
                          "orderDates": {
                            "startAt": {
                              "dateTime": "2026-04-21T08:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            },
                            "endAt": {
                              "dateTime": "2026-04-21T10:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            }
                          },
                          "estimatedDates": {
                            "startAt": {
                              "dateTime": "2026-04-21T08:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            },
                            "endAt": {
                              "dateTime": "2026-04-21T10:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            }
                          },
                          "appointmentDates": {
                            "startAt": {
                              "dateTime": "2026-04-21T09:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            },
                            "endAt": {
                              "dateTime": "2026-04-21T09:30:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            }
                          }
                        },
                        {
                          "index": 1,
                          "stopType": "dropoff",
                          "estimatedDates": {
                            "startAt": {
                              "dateTime": "2026-04-22T15:00:00.000Z",
                              "timeZone": "America/New_York",
                              "isDateOnly": false
                            }
                          },
                          "actualDates": {
                            "startAt": {
                              "dateTime": "2026-04-22T15:12:00.000Z",
                              "timeZone": "America/New_York",
                              "isDateOnly": false
                            }
                          }
                        }
                      ]
                    }
                  ]
                },
                "consolidatedLoad": {
                  "summary": "Multiple orders on one load",
                  "value": [
                    {
                      "orderNumber": "SO-10001",
                      "loadNumber": "LOAD-12345",
                      "source": "NetSuite",
                      "sourceId": "123456",
                      "stops": [
                        {
                          "index": 0,
                          "stopType": "pickup",
                          "orderDates": {
                            "startAt": {
                              "dateTime": "2026-04-21T08:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            },
                            "endAt": {
                              "dateTime": "2026-04-21T10:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            }
                          },
                          "estimatedDates": {
                            "startAt": {
                              "dateTime": "2026-04-21T08:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            },
                            "endAt": {
                              "dateTime": "2026-04-21T10:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            }
                          },
                          "appointmentDates": {
                            "startAt": {
                              "dateTime": "2026-04-21T09:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            },
                            "endAt": {
                              "dateTime": "2026-04-21T09:30:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            }
                          }
                        },
                        {
                          "index": 1,
                          "stopType": "dropoff",
                          "estimatedDates": {
                            "startAt": {
                              "dateTime": "2026-04-22T15:00:00.000Z",
                              "timeZone": "America/New_York",
                              "isDateOnly": false
                            }
                          },
                          "actualDates": {
                            "startAt": {
                              "dateTime": "2026-04-22T15:12:00.000Z",
                              "timeZone": "America/New_York",
                              "isDateOnly": false
                            }
                          }
                        }
                      ]
                    },
                    {
                      "orderNumber": "SO-10002",
                      "loadNumber": "LOAD-12345",
                      "source": "NetSuite",
                      "sourceId": "789012",
                      "stops": [
                        {
                          "index": 0,
                          "stopType": "pickup",
                          "estimatedDates": {
                            "startAt": {
                              "dateTime": "2026-04-21T11:00:00.000Z",
                              "timeZone": "America/Chicago",
                              "isDateOnly": false
                            }
                          }
                        },
                        {
                          "index": 1,
                          "stopType": "dropoff",
                          "estimatedDates": {
                            "startAt": {
                              "dateTime": "2026-04-23T09:00:00.000Z",
                              "timeZone": "America/New_York",
                              "isDateOnly": false
                            }
                          }
                        }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "message": "Order load stop dates updated successfully"
                }
              }
            }
          },
          "400": {
            "description": "Receiver rejected the webhook as invalid. Owlery logs the failed delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "invalidPayload": {
                    "summary": "Invalid payload",
                    "value": {
                      "error": "Bad Request",
                      "message": "Missing required field: orderNumber",
                      "details": [
                        "orderNumber is required"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Receiver rejected the webhook because custom authentication headers were missing or invalid. Owlery logs the failed delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Unauthorized",
                    "value": {
                      "error": "Unauthorized",
                      "message": "Invalid webhook signature or API key"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Receiver failed while processing the webhook. Owlery logs the failed delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "receiverError": {
                    "summary": "Receiver error",
                    "value": {
                      "error": "Internal Server Error",
                      "message": "Unable to process order load stop date webhook"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/load-updated": {
      "post": {
        "x-webhook": true,
        "tags": [
          "shipper-webhooks"
        ],
        "summary": "Load Updated",
        "description": "Sent when load details other than stop dates change, such as pallet quantity, dimensions, equipment, freight price, tracking, or cancellation status. Contact `support@owlery.ai` to enable this webhook.\n\nThe payload is an array with one record per associated order. Each record contains the same load fields as a single Search Loads (`POST /api/ext/v1/loads/search`) result, plus `orderNumber`, `source`, and `sourceId` when available, all at the top level. `stops` lists the full load route, not just the stops for that order. Load fields repeat for each associated order; do not sum pallet counts or freight prices across those records.\n\nThe payload is a current snapshot, not a list of changed fields. The separate Order Load Stop Dates Updated webhook still reports changed order stops in its own format.",
        "operationId": "webhookLoadUpdated",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LoadUpdatedWebhook"
                }
              },
              "examples": {
                "singleOrder": {
                  "summary": "Single order on a load",
                  "value": [
                    {
                      "orderNumber": "SO-10001",
                      "loadNumber": "LOAD-12345",
                      "source": "NetSuite",
                      "sourceId": "123456",
                      "referenceNumbers": [
                        {
                          "type": "PO",
                          "value": "PO-10001"
                        }
                      ],
                      "mode": "FTL",
                      "status": "Open",
                      "stops": [
                        {
                          "type": "pickup",
                          "dates": {
                            "appointmentDates": {
                              "startAt": {
                                "tsInMs": 1793952000000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": false
                              }
                            }
                          },
                          "facilityProfile": {
                            "name": "Pickup Warehouse"
                          },
                          "items": [
                            {
                              "quantity": { "count": 10, "unit": "Pallet" },
                              "weight": { "value": 800, "unit": "LB" },
                              "dimensions": { "length": 48, "width": 40, "height": 60, "unit": "IN" },
                              "class": "77.5",
                              "description": "Packaged food",
                              "nmfcCode": "12345",
                              "isStackable": false,
                              "isTurnable": true
                            }
                          ]
                        },
                        {
                          "type": "dropoff",
                          "dates": {},
                          "items": []
                        }
                      ],
                      "brokerProfiles": [{ "name": "Great Freight LLC", "scac": "GRFT" }],
                      "brokerProfile": { "name": "Great Freight LLC", "scac": "GRFT" },
                      "equipmentType": "Reefer",
                      "palletCount": 10,
                      "price": { "cents": 125000, "currencyCode": "USD" },
                      "lineItems": [
                        { "category": "lineHaul", "total": 110000, "currencyCode": "USD" },
                        { "category": "fuelSurcharge", "total": 15000, "currencyCode": "USD" }
                      ]
                    }
                  ]
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "message": "Load update received successfully"
                }
              }
            }
          },
          "400": {
            "description": "Receiver rejected the webhook as invalid. Owlery logs the failed delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "invalidPayload": {
                    "summary": "Invalid payload",
                    "value": {
                      "error": "Bad Request",
                      "message": "Missing required field: orderNumber",
                      "details": [
                        "orderNumber is required"
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Receiver rejected the webhook because custom authentication headers were missing or invalid. Owlery logs the failed delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "unauthorized": {
                    "summary": "Unauthorized",
                    "value": {
                      "error": "Unauthorized",
                      "message": "Invalid webhook signature or API key"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Receiver failed while processing the webhook. Owlery logs the failed delivery.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "details": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                },
                "examples": {
                  "receiverError": {
                    "summary": "Receiver error",
                    "value": {
                      "error": "Internal Server Error",
                      "message": "Unable to process load update webhook"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/invoices-updated": {
      "post": {
        "x-webhook": true,
        "tags": [
          "shipper-webhooks"
        ],
        "summary": "Invoices Updated",
        "description": "Webhook payload sent when invoices are created or updated in Owlery. Sent when invoices are created or modified, when invoice status changes (e.g., from unpaid to paid), or when invoices are associated with loads.",
        "operationId": "webhookInvoicesUpdated",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceWebhook"
                }
              },
              "example": [
                {
                  "invoiceNumber": "INV-2024-001",
                  "loadNumbers": [
                    "LOAD-12345",
                    "LOAD-12346"
                  ],
                  "invoicedAt": "2024-01-15T10:30:00Z",
                  "dueAt": "2024-02-15T23:59:59Z",
                  "total": 250000,
                  "currencyCode": "USD",
                  "status": "unpaid",
                  "lineItems": [
                    {
                      "description": "Line haul from Chicago to New York",
                      "category": "lineHaul",
                      "total": 200000,
                      "code": "LH001",
                      "unitCount": 1,
                      "unitPrice": 200000,
                      "unitOfMeasure": "shipment",
                      "weight": {
                        "value": 15000,
                        "unit": "lb"
                      },
                      "class": "70"
                    },
                    {
                      "description": "Fuel surcharge",
                      "category": "fuelSurcharge",
                      "total": 25000,
                      "code": "FSC"
                    }
                  ],
                  "parties": {
                    "shipper": {
                      "name": "ABC Manufacturing",
                      "location": {
                        "street": "123 Industrial Blvd",
                        "city": "Chicago",
                        "state": "IL",
                        "zipcode": "60601",
                        "countryCode": "US"
                      }
                    },
                    "consignees": [
                      {
                        "name": "XYZ Distribution",
                        "location": {
                          "street": "456 Commerce St",
                          "city": "New York",
                          "state": "NY",
                          "zipcode": "10001",
                          "countryCode": "US"
                        }
                      }
                    ],
                    "billTo": {
                      "name": "ABC Manufacturing",
                      "location": {
                        "street": "123 Industrial Blvd",
                        "city": "Chicago",
                        "state": "IL",
                        "zipcode": "60601",
                        "countryCode": "US"
                      }
                    }
                  },
                  "referenceNumbers": [
                    {
                      "type": "BOL",
                      "value": "BOL-12345"
                    },
                    {
                      "type": "PO",
                      "value": "PO-67890"
                    }
                  ],
                  "notes": [
                    "Rush delivery requested"
                  ]
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "message": "Invoices updated successfully"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/invoices": {
      "post": {
        "tags": [
          "carrier-overview",
          "carrier-invoices"
        ],
        "summary": "Submit Invoices",
        "description": "This endpoint allows brokers to submit invoices directly to Owlery. The source system is determined from the broker profile associated with the API key.",
        "operationId": "submitInvoices",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceSubmission"
                }
              },
              "example": [
                {
                  "invoiceNumber": "INV-2024-001",
                  "loadNumber": "LOAD-12345",
                  "invoicedAt": "2024-01-15T10:30:00Z",
                  "dueAt": "2024-02-15T23:59:59Z",
                  "total": 250000,
                  "currencyCode": "USD",
                  "status": "unpaid",
                  "lineItems": [
                    {
                      "description": "Line haul from Chicago to New York",
                      "category": "lineHaul",
                      "total": 200000,
                      "currencyCode": "USD",
                      "unitCount": 1,
                      "unitPrice": 200000,
                      "unitOfMeasure": "shipment",
                      "weight": {
                        "value": 15000,
                        "unit": "lb"
                      },
                      "class": "70",
                      "code": "LH001"
                    },
                    {
                      "description": "Fuel surcharge",
                      "category": "fuelSurcharge",
                      "total": 25000,
                      "currencyCode": "USD",
                      "code": "FSC"
                    }
                  ],
                  "parties": {
                    "shipper": {
                      "name": "ABC Manufacturing",
                      "location": {
                        "street": "123 Industrial Blvd",
                        "city": "Chicago",
                        "state": "IL",
                        "zipcode": "60601",
                        "countryCode": "US"
                      }
                    },
                    "consignees": [
                      {
                        "name": "XYZ Distribution",
                        "location": {
                          "street": "456 Commerce St",
                          "city": "New York",
                          "state": "NY",
                          "zipcode": "10001",
                          "countryCode": "US"
                        }
                      }
                    ],
                    "billTo": {
                      "name": "ABC Manufacturing",
                      "location": {
                        "street": "123 Industrial Blvd",
                        "city": "Chicago",
                        "state": "IL",
                        "zipcode": "60601",
                        "countryCode": "US"
                      }
                    }
                  },
                  "referenceNumbers": [
                    {
                      "type": "BOL",
                      "value": "BOL-12345"
                    },
                    {
                      "type": "PO",
                      "value": "PO-67890"
                    }
                  ],
                  "notes": [
                    "Rush delivery requested"
                  ],
                  "isTest": false
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "All invoices submitted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceSubmissionResponse"
                },
                "example": {
                  "createdInvoices": [
                    {
                      "invoiceNumber": "INV-2024-001",
                      "id": "inv_abc123def456"
                    }
                  ],
                  "failures": []
                }
              }
            }
          },
          "207": {
            "description": "Partial success - some invoices failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvoiceSubmissionResponse"
                },
                "example": {
                  "createdInvoices": [
                    {
                      "invoiceNumber": "INV-2024-001",
                      "id": "inv_abc123def456"
                    }
                  ],
                  "failures": [
                    {
                      "invoiceNumber": "INV-2024-002",
                      "error": "Load number LOAD-99999 not found"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/order/confirm": {
      "post": {
        "tags": [
          "facility-overview",
          "facility-orders"
        ],
        "summary": "Confirm Orders",
        "description": "This endpoint confirms one or more orders, updating their status and items.",
        "operationId": "confirmOrders",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrderConfirmation"
                }
              },
              "example": [
                {
                  "type": "inbound",
                  "orderNumber": "SO11112",
                  "items": [
                    {
                      "sku": "CT-BL",
                      "sourceId": "LINE-001",
                      "actualQuantity": 40,
                      "damagedQuantity": 10,
                      "unitOfMeasure": "case",
                      "lotCode": "LOT-001",
                      "expirationDate": "2023-12-31"
                    }
                  ],
                  "isTest": false
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "All orders confirmed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmOrderResponse"
                },
                "example": {
                  "confirmedOrderNumbers": [
                    "SO11112"
                  ],
                  "errors": []
                }
              }
            }
          },
          "207": {
            "description": "Partial success - some orders failed to confirm",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmOrderResponse"
                },
                "example": {
                  "confirmedOrderNumbers": [
                    "SO11112"
                  ],
                  "errors": [
                    "Failed to confirm order SO11113"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConfirmOrderResponse"
                },
                "example": {
                  "confirmedOrderNumbers": [],
                  "errors": [
                    "Order number must be provided"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/loads": {
      "post": {
        "tags": [
          "carrier-loads"
        ],
        "summary": "Create Loads",
        "description": "This endpoint allows brokers to create one or more loads in Owlery using the standardized external payload.",
        "operationId": "createLoads",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLoadsRequest"
              },
              "example": {
                "loads": [
                  {
                    "loadNumber": "OWL-LOAD-1001",
                    "status": "Open",
                    "mode": "FTL",
                    "shipmentMode": "Truck",
                    "driverMode": "Solo",
                    "equipmentType": "Reefer",
                    "currencyCode": "USD",
                    "distance": {
                      "value": 725,
                      "unit": "MI"
                    },
                    "containerSettings": {
                      "containerSizeInFeet": 53
                    },
                    "priceInCents": 125000,
                    "referenceNumbers": [
                      {
                        "type": "PO",
                        "value": "PO-12345"
                      }
                    ],
                    "carrier": {
                      "dotNumber": "1234567",
                      "mcNumber": "MC998877",
                      "scac": "GRFT"
                    },
                    "reeferSettings": {
                      "minTemperature": 34,
                      "maxTemperature": 38,
                      "unit": "F",
                      "preCoolTemperature": 36,
                      "sentryMode": "Continuous"
                    },
                    "stops": [
                      {
                        "index": 0,
                        "type": "Pickup",
                        "liveDropType": "Live",
                        "timezone": "America/Chicago",
                        "orderDates": "2024-01-01T10:00:00Z",
                        "appointmentDates": "2024-01-01",
                        "facility": {
                          "name": "Origin DC",
                          "location": {
                            "street": "123 Main St",
                            "city": "Chicago",
                            "state": "IL",
                            "zipcode": "60601",
                            "countryCode": "US"
                          }
                        },
                        "items": [
                          {
                            "description": "Packaged produce",
                            "quantity": {
                              "count": 10,
                              "unit": "Pallet"
                            },
                            "weight": {
                              "value": 5000,
                              "unit": "LB"
                            },
                            "dimensions": {
                              "length": 48,
                              "width": 40,
                              "height": 72,
                              "unit": "IN"
                            },
                            "isStackable": true,
                            "isTurnable": false,
                            "class": "70",
                            "nmfcCode": "12345",
                            "cargoValue": {
                              "cents": 900000,
                              "currencyCode": "USD"
                            }
                          }
                        ],
                        "referenceNumbers": [
                          {
                            "type": "PO",
                            "value": "PO-12345"
                          }
                        ]
                      },
                      {
                        "index": 1,
                        "type": "Dropoff",
                        "liveDropType": "Live",
                        "timezone": "America/Chicago",
                        "orderDates": "2024-01-02",
                        "estimatedDates": "2024-01-02T15:00:00Z",
                        "facility": {
                          "name": "Destination DC",
                          "location": {
                            "street": "456 Commerce Ave",
                            "city": "Dallas",
                            "state": "TX",
                            "zipcode": "75201"
                          }
                        },
                        "items": [
                          {
                            "description": "Packaged produce",
                            "quantity": {
                              "count": 10,
                              "unit": "Pallet"
                            },
                            "weight": {
                              "value": 5000,
                              "unit": "LB"
                            },
                            "dimensions": {
                              "length": 48,
                              "width": 40,
                              "height": 72,
                              "unit": "IN"
                            },
                            "isStackable": true,
                            "isTurnable": false,
                            "class": "70",
                            "nmfcCode": "12345",
                            "cargoValue": {
                              "cents": 900000,
                              "currencyCode": "USD"
                            }
                          }
                        ],
                        "referenceNumbers": [
                          {
                            "type": "BOL",
                            "value": "BOL-67890"
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "All loads created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateLoadsResponse"
                },
                "example": {
                  "createdLoads": [
                    {
                      "loadNumber": "OWL-LOAD-1001"
                    }
                  ],
                  "failures": []
                }
              }
            }
          },
          "207": {
            "description": "Partial success - some loads failed validation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateLoadsResponse"
                },
                "example": {
                  "createdLoads": [
                    {
                      "loadNumber": "OWL-LOAD-1001"
                    }
                  ],
                  "failures": [
                    {
                      "loadNumber": "OWL-LOAD-1002",
                      "error": "Stop 0 orderDates.startAt must be a valid ISO8601 date"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/loads/tracking": {
      "post": {
        "tags": [
          "carrier-tracking"
        ],
        "summary": "Tracking Updated",
        "description": "Push tracking status of a load to Owlery. The `at` field represents when the tracking event occurred or when the status changed (event metadata). For `AppointmentScheduled` status, use the `appointment` field to provide the appointment time range. Non-stop-specific statuses require geographic coordinates, while stop-specific statuses require `stopIndex`.",
        "operationId": "trackingUpdated",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TrackingStatus"
                }
              },
              "example": [
                {
                  "loadNumber": "LOAD-12345",
                  "status": "InTransit",
                  "at": "2025-01-29T05:15:02.254Z",
                  "location": {
                    "street": "123 Main St",
                    "city": "Los Angeles",
                    "state": "CA",
                    "zipcode": "90001",
                    "countryCode": "US",
                    "coordinates": {
                      "lat": 34.0522,
                      "lng": -118.2437
                    }
                  }
                },
                {
                  "loadNumber": "LOAD-12345",
                  "status": "AppointmentScheduled",
                  "at": "2025-01-15T15:00:00.000Z",
                  "stopIndex": 1,
                  "appointment": {
                    "startAt": "2025-01-30T08:00:00.000Z",
                    "endAt": "2025-01-30T10:00:00.000Z"
                  },
                  "location": {
                    "street": "456 Second Ave",
                    "city": "New York",
                    "state": "NY",
                    "zipcode": "10001",
                    "countryCode": "US",
                    "coordinates": {
                      "lat": 40.7128,
                      "lng": -74.006
                    }
                  }
                },
                {
                  "loadNumber": "LOAD-67890",
                  "status": "DroppedOff",
                  "at": "2025-02-01T05:15:02.254Z",
                  "stopIndex": 1,
                  "location": {
                    "street": "123 Main St",
                    "city": "Los Angeles",
                    "state": "CA",
                    "zipcode": "90001",
                    "countryCode": "US",
                    "coordinates": {
                      "lat": 34.0522,
                      "lng": -118.2437
                    }
                  }
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "All tracking statuses processed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingSuccessResponse"
                },
                "example": {
                  "success": [
                    "1228832",
                    "1334833"
                  ]
                }
              }
            }
          },
          "207": {
            "description": "Partial success - some load numbers not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackingPartialResponse"
                },
                "example": {
                  "success": [
                    "1228832"
                  ],
                  "missing": [
                    "1334833"
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/documents": {
      "post": {
        "tags": [
          "carrier-documents"
        ],
        "summary": "Submit Document",
        "description": "Submit a document for a load that Owlery previously sent to the carrier. Identify the load using Owlery `loadNumber`. The file content is sent as a base64-encoded string; maximum decoded file size is 20 MB.",
        "operationId": "submitCarrierDocument",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierDocumentSubmitRequest"
              },
              "example": {
                "loadNumber": "LOAD-12345",
                "type": "pod",
                "fileName": "POD_LOAD-12345.pdf",
                "mimeType": "application/pdf",
                "content": "JVBERi0xLjQKJcTl8uXr..."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Document submitted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierDocumentSubmitResponse"
                },
                "example": {
                  "loadNumber": "LOAD-12345",
                  "type": "pod",
                  "fileName": "POD_LOAD-12345.pdf",
                  "status": "uploaded"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: content"
                }
              }
            }
          },
          "404": {
            "description": "Load not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Not Found",
                  "message": "Load not found for loadNumber=LOAD-12345"
                }
              }
            }
          },
          "413": {
            "description": "File content is too large",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Payload Too Large",
                  "message": "Decoded file content exceeds the 20 MB maximum"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/tenders/accept": {
      "post": {
        "tags": [
          "carrier-tender-responses"
        ],
        "summary": "Accept Tender",
        "description": "Accept a tender that Owlery sent to the carrier. Identify the shipment using the Owlery `loadNumber` and `revision` from the carrier tender webhook. The initial tender uses `revision: 0`.",
        "operationId": "acceptCarrierTender",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierTenderAcceptRequest"
              },
              "example": {
                "loadNumber": "LOAD-12345",
                "revision": 0,
                "proNumber": "PRO-456789",
                "trackingUrl": "https://carrier.example.com/track/PRO-456789"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tender or tender edit accepted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierTenderResponse"
                },
                "example": {
                  "loadNumber": "LOAD-12345",
                  "revision": 0,
                  "status": "accepted"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: revision"
                }
              }
            }
          },
          "404": {
            "description": "Tender not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Not Found",
                  "message": "Tender not found for loadNumber=LOAD-12345"
                }
              }
            }
          },
          "409": {
            "description": "Revision conflict. The tender revision is no longer the current pending tender version for this load.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Conflict",
                  "message": "Tender revision 1 is no longer current for loadNumber=LOAD-12345"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/tenders/reject": {
      "post": {
        "tags": [
          "carrier-tender-responses"
        ],
        "summary": "Reject Tender",
        "description": "Reject a tender that Owlery sent to the carrier. Identify the shipment using the Owlery `loadNumber` and `revision` from the carrier tender webhook. The initial tender uses `revision: 0`.",
        "operationId": "rejectCarrierTender",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierTenderRejectRequest"
              },
              "example": {
                "loadNumber": "LOAD-12345",
                "revision": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tender or tender edit rejected successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierTenderResponse"
                },
                "example": {
                  "loadNumber": "LOAD-12345",
                  "revision": 0,
                  "status": "rejected"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: revision"
                }
              }
            }
          },
          "404": {
            "description": "Tender not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Not Found",
                  "message": "Tender not found for loadNumber=LOAD-12345"
                }
              }
            }
          },
          "409": {
            "description": "Revision conflict. The tender revision is no longer the current pending tender version for this load.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Conflict",
                  "message": "Tender revision 1 is no longer current for loadNumber=LOAD-12345"
                }
              }
            }
          }
        }
      }
    },
    "/carrier-webhooks/rate-quote": {
      "post": {
        "x-webhook": true,
        "tags": [
          "carrier-webhooks"
        ],
        "summary": "Rate Quote Requested",
        "description": "Webhook sent by Owlery to a carrier when Owlery requests rates. The request body itself is the rate quote request. Owlery sends carrier-configured authentication headers with this request. The carrier should use those headers to identify the shipper/account context. Return `200 OK` to acknowledge receipt only. Submit all quote responses asynchronously to `POST /api/ext/v1/rate-quote/responses`; Owlery does not process quote results from the webhook response body.",
        "operationId": "carrierWebhookRateQuoteRequested",
        "security": [
          {
            "CarrierWebhookAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierWebhookRateQuoteRequest"
              },
              "example": {
                "id": "RQ-0042",
                "isTest": true,
                "equipmentType": "Reefer",
                "reeferSettings": {
                  "minTemperature": 34,
                  "maxTemperature": 38,
                  "unit": "F",
                  "sentryMode": "Continuous"
                },
                "stops": [
                  {
                    "type": "Pickup",
                    "facility": {
                      "name": "Origin Warehouse",
                      "location": {
                        "city": "Chicago",
                        "state": "IL",
                        "zipcode": "60601",
                        "countryCode": "US"
                      }
                    },
                    "dates": {
                      "startAt": "2026-06-01T08:00:00Z",
                      "endAt": "2026-06-01T10:00:00Z"
                    },
                    "requirements": {
                      "liftgate": true,
                      "inside": false,
                      "limitedAccess": false,
                      "residential": false,
                      "appointment": true,
                      "tradeshow": false
                    },
                    "items": [
                      {
                        "description": "Frozen prepared meals",
                        "quantity": {
                          "count": 10,
                          "unit": "Pallet"
                        },
                        "weight": {
                          "value": 1200,
                          "unit": "LB"
                        },
                        "cargoValue": {
                          "cents": 2500000,
                          "currencyCode": "USD"
                        }
                      }
                    ]
                  },
                  {
                    "type": "Dropoff",
                    "facility": {
                      "name": "Destination DC",
                      "location": {
                        "zipcode": "10001",
                        "countryCode": "US"
                      }
                    },
                    "dates": {
                      "startAt": "2026-06-03T08:00:00Z",
                      "endAt": "2026-06-03T12:00:00Z"
                    },
                    "liveDropType": "drop"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook acknowledged. Do not return quote data in this response; submit all quote responses asynchronously to Owlery."
          },
          "400": {
            "description": "Receiver rejected the webhook as invalid. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: id"
                }
              }
            }
          },
          "401": {
            "description": "Receiver rejected the webhook because authentication headers were missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Unauthorized",
                  "message": "Invalid webhook signature or API key"
                }
              }
            }
          },
          "500": {
            "description": "Receiver failed while processing the webhook. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Internal Server Error",
                  "message": "Unable to process webhook"
                }
              }
            }
          }
        }
      }
    },
    "/carrier-webhooks/tender": {
      "post": {
        "x-webhook": true,
        "tags": [
          "carrier-webhooks"
        ],
        "summary": "Tender Requested",
        "description": "Webhook sent by Owlery to tender a carrier quote. The carrier already has the shipment details from the Rate Quote Requested webhook. Owlery sends the selected carrierQuoteId together with the Owlery loadNumber and revision 0. Return 200 OK to acknowledge receipt; this does not accept the tender. Accept or reject asynchronously through POST /api/ext/v1/tenders/accept or POST /api/ext/v1/tenders/reject, echoing loadNumber and revision. Owlery sends carrier-configured authentication headers; the carrier should use them to identify the shipper/account context.",
        "operationId": "carrierWebhookTenderRequested",
        "security": [
          {
            "CarrierWebhookAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierWebhookTenderRequest"
              },
              "example": {
                "carrierQuoteId": "carrier-quote-789",
                "loadNumber": "LOAD-12345",
                "revision": 0
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tender webhook acknowledged. Acknowledge receipt only; accept or reject through the carrier callback API using the supplied loadNumber and revision.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierWebhookAck"
                },
                "example": {
                  "message": "Tender received"
                }
              }
            }
          },
          "400": {
            "description": "Receiver rejected the webhook as invalid. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: carrierQuoteId"
                }
              }
            }
          },
          "401": {
            "description": "Receiver rejected the webhook because authentication headers were missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Unauthorized",
                  "message": "Invalid webhook signature or API key"
                }
              }
            }
          },
          "500": {
            "description": "Receiver failed while processing the webhook. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Internal Server Error",
                  "message": "Unable to process webhook"
                }
              }
            }
          }
        }
      }
    },
    "/carrier-webhooks/tender-edit": {
      "post": {
        "x-webhook": true,
        "tags": [
          "carrier-webhooks"
        ],
        "summary": "Tender Edited",
        "description": "Webhook sent by Owlery when a tendered load changes. This same payload is used for load edits after the carrier already knows the load. The payload is a full replacement view of the current tender/load details. Identify the shipment by loadNumber and the version by revision. The first edit is revision 1; each new edit increments the revision, while redelivery of the same version retains it. Return 200 OK to acknowledge receipt, then accept or reject asynchronously through the carrier callback API, echoing loadNumber and revision. A callback for a superseded revision returns 409 Conflict.",
        "operationId": "carrierWebhookTenderEdited",
        "security": [
          {
            "CarrierWebhookAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierWebhookTenderEditRequest"
              },
              "example": {
                "loadNumber": "LOAD-12345",
                "isTest": true,
                "mode": "FTL",
                "equipmentType": "Reefer",
                "reeferSettings": {
                  "minTemperature": 34,
                  "maxTemperature": 38,
                  "unit": "F",
                  "sentryMode": "Continuous"
                },
                "stops": [
                  {
                    "type": "Pickup",
                    "facility": {
                      "name": "Origin Warehouse",
                      "location": {
                        "street": "123 W Fulton Market",
                        "city": "Chicago",
                        "state": "IL",
                        "zipcode": "60601",
                        "countryCode": "US"
                      }
                    },
                    "dates": {
                      "startAt": "2026-06-01T09:00:00Z",
                      "endAt": "2026-06-01T11:00:00Z"
                    },
                    "requirements": {
                      "liftgate": true,
                      "inside": false,
                      "limitedAccess": true,
                      "residential": false,
                      "appointment": true,
                      "tradeshow": false
                    },
                    "items": [
                      {
                        "description": "Frozen prepared meals",
                        "quantity": {
                          "count": 10,
                          "unit": "Pallet"
                        },
                        "weight": {
                          "value": 1200,
                          "unit": "LB"
                        }
                      }
                    ],
                    "referenceNumbers": [
                      {
                        "type": "Pickup",
                        "value": "PU-123-REV1"
                      }
                    ]
                  },
                  {
                    "type": "Dropoff",
                    "facility": {
                      "name": "Destination DC",
                      "location": {
                        "street": "456 9th Ave",
                        "city": "New York",
                        "state": "NY",
                        "zipcode": "10001",
                        "countryCode": "US"
                      }
                    },
                    "dates": {
                      "startAt": "2026-06-03T10:00:00Z",
                      "endAt": "2026-06-03T14:00:00Z"
                    },
                    "liveDropType": "drop",
                    "referenceNumbers": [
                      {
                        "type": "Dropoff",
                        "value": "DEL-456"
                      }
                    ]
                  }
                ],
                "referenceNumbers": [
                  {
                    "type": "PO",
                    "value": "PO-100045-REV1"
                  },
                  {
                    "type": "BOL",
                    "value": "BOL-778899"
                  }
                ],
                "revision": 1
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tender edit webhook acknowledged. Acknowledge receipt only; accept or reject through the carrier callback API using the supplied loadNumber and revision.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierWebhookAck"
                },
                "example": {
                  "message": "Tender edit received"
                }
              }
            }
          },
          "400": {
            "description": "Receiver rejected the webhook as invalid. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: loadNumber"
                }
              }
            }
          },
          "401": {
            "description": "Receiver rejected the webhook because authentication headers were missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Unauthorized",
                  "message": "Invalid webhook signature or API key"
                }
              }
            }
          },
          "500": {
            "description": "Receiver failed while processing the webhook. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Internal Server Error",
                  "message": "Unable to process webhook"
                }
              }
            }
          }
        }
      }
    },
    "/carrier-webhooks/cancel": {
      "post": {
        "x-webhook": true,
        "tags": [
          "carrier-webhooks"
        ],
        "summary": "Tender Cancelled",
        "description": "Webhook sent by Owlery to cancel a tender or load previously sent to the carrier. The payload includes Owlery `loadNumber`; carriers should use that value to identify the shipment.",
        "operationId": "carrierWebhookTenderCancelled",
        "security": [
          {
            "CarrierWebhookAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierWebhookCancelRequest"
              },
              "example": {
                "loadNumber": "LOAD-12345",
                "isTest": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook processed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierWebhookAck"
                },
                "example": {
                  "message": "Cancellation received"
                }
              }
            }
          },
          "400": {
            "description": "Receiver rejected the webhook as invalid. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: loadNumber"
                }
              }
            }
          },
          "401": {
            "description": "Receiver rejected the webhook because authentication headers were missing or invalid.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Unauthorized",
                  "message": "Invalid webhook signature or API key"
                }
              }
            }
          },
          "500": {
            "description": "Receiver failed while processing the webhook. Owlery logs the failed delivery and may retry according to the configured delivery policy.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Internal Server Error",
                  "message": "Unable to process webhook"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/loads/search": {
      "post": {
        "tags": [
          "shipper-loads"
        ],
        "summary": "Search Loads",
        "description": "Search for loads using reference numbers. Results include pickup pallet and skid totals, stop freight details, equipment, and the resolved freight price with its charge breakdown when available and visible to the caller. The price object contains cents and currencyCode, replacing the former top-level priceInCents and currencyCode fields; lineItems lists the charges.",
        "operationId": "searchLoads",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoadSearchRequest"
              },
              "example": {
                "referenceNumbers": [
                  "TEST-1234"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoadSearchResponse"
                },
                "example": {
                  "loads": [
                    {
                      "loadNumber": "12338165",
                      "referenceNumbers": [
                        {
                          "type": "BOL",
                          "value": "TEST-1234"
                        }
                      ],
                      "mode": "FTL",
                      "status": "Delivered",
                      "stops": [
                        {
                          "type": "pickup",
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "tsInMs": 1664881200000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": false
                              },
                              "endAt": {
                                "tsInMs": 1664881200000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": false
                              }
                            },
                            "appointmentDates": {
                              "startAt": {
                                "tsInMs": 1664881200000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": false
                              },
                              "endAt": {
                                "tsInMs": 1664881200000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": false
                              }
                            },
                            "actualDates": {
                              "startAt": {
                                "tsInMs": 1664896740000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": false
                              },
                              "endAt": {
                                "tsInMs": 1664903280000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": false
                              }
                            }
                          },
                          "items": [
                            {
                              "quantity": { "count": 10, "unit": "Pallet" },
                              "weight": { "value": 800, "unit": "LB" },
                              "dimensions": { "length": 48, "width": 40, "height": 60, "unit": "IN" },
                              "class": "77.5",
                              "description": "Packaged food",
                              "nmfcCode": "12345",
                              "isStackable": false,
                              "isTurnable": true
                            }
                          ],
                          "facilityProfile": {
                            "name": "My Warehouse",
                            "location": {
                              "street": "567 Main St",
                              "city": "Joliet",
                              "state": "IL",
                              "countryCode": "US",
                              "zipcode": "60436"
                            }
                          }
                        },
                        {
                          "type": "dropoff",
                          "dates": {
                            "orderDates": {
                              "startAt": {
                                "tsInMs": 1665050400000,
                                "timeZone": "America/New_York",
                                "isDateOnly": false
                              },
                              "endAt": {
                                "tsInMs": 1665050400000,
                                "timeZone": "America/New_York",
                                "isDateOnly": false
                              }
                            },
                            "appointmentDates": {
                              "startAt": {
                                "tsInMs": 1665050400000,
                                "timeZone": "America/New_York",
                                "isDateOnly": false
                              },
                              "endAt": {
                                "tsInMs": 1665050400000,
                                "timeZone": "America/New_York",
                                "isDateOnly": false
                              }
                            },
                            "actualDates": {
                              "startAt": {
                                "tsInMs": 1665058140000,
                                "timeZone": "America/New_York",
                                "isDateOnly": false
                              },
                              "endAt": {
                                "tsInMs": 1665060960000,
                                "timeZone": "America/New_York",
                                "isDateOnly": false
                              }
                            }
                          },
                          "items": [],
                          "facilityProfile": {
                            "name": "RLS Newfield FC",
                            "location": {
                              "street": "2179 Main Road",
                              "city": "Newfield",
                              "state": "NJ",
                              "countryCode": "US",
                              "zipcode": "08344"
                            }
                          }
                        }
                      ],
                      "brokerProfiles": [
                        {
                          "name": "Great Freight LLC",
                          "scac": "GRFT"
                        }
                      ],
                      "brokerProfile": {
                        "name": "Great Freight LLC",
                        "scac": "GRFT"
                      },
                      "carrierProfile": {
                        "name": "ACME Trucking",
                        "scac": "ACME"
                      },
                      "equipmentType": "Reefer",
                      "trackingNumber": "TRACK-12345",
                      "palletCount": 10,
                      "price": { "cents": 125000, "currencyCode": "USD" },
                      "lineItems": [
                        { "category": "lineHaul", "total": 110000, "currencyCode": "USD" },
                        { "category": "fuelSurcharge", "total": 15000, "currencyCode": "USD" }
                      ]
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/documents/search": {
      "get": {
        "tags": [
          "shipper-documents"
        ],
        "summary": "Search Documents",
        "description": "Search documents attached to loads and orders in the authenticated organization. If `searchText` is shorter than 2 characters, the response is an empty result set.",
        "operationId": "searchDocuments",
        "parameters": [
          {
            "name": "searchText",
            "in": "query",
            "description": "Search term (min 2 characters to return results).",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "TEST-123"
          },
          {
            "name": "page",
            "in": "query",
            "description": "0-based page number (default: 0).",
            "required": false,
            "schema": {
              "type": "number",
              "default": 0
            },
            "example": 0
          },
          {
            "name": "pageSize",
            "in": "query",
            "description": "Results per page (default: 10, max: 20).",
            "required": false,
            "schema": {
              "type": "number",
              "default": 10,
              "maximum": 20
            },
            "example": 10
          }
        ],
        "responses": {
          "200": {
            "description": "Search results",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSearchResponse"
                },
                "example": {
                  "documents": [
                    {
                      "id": "65f1a2b3c4d5e6f789012345",
                      "name": "Rate Confirmation.pdf",
                      "size": 54231
                    }
                  ],
                  "totalCount": 1,
                  "page": 0,
                  "pageSize": 10
                }
              }
            }
          },
          "400": {
            "description": "Search query too broad",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentSearchResponse"
                },
                "example": {
                  "documents": [],
                  "totalCount": 0,
                  "page": 0,
                  "pageSize": 10,
                  "errorMessage": "Search query is too broad. Please refine your search criteria to get more specific results."
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/documents/{id}/download": {
      "get": {
        "tags": [
          "shipper-documents"
        ],
        "summary": "Download Document",
        "description": "Download a single document by ID. The response is a file stream with download headers.",
        "operationId": "downloadDocument",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Document ID to download.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "65f1a2b3c4d5e6f789012345"
          }
        ],
        "responses": {
          "200": {
            "description": "File download",
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                },
                "example": "attachment; filename=\"Rate%20Confirmation.pdf\""
              },
              "X-Filename": {
                "schema": {
                  "type": "string"
                },
                "example": "Rate Confirmation.pdf"
              }
            },
            "content": {
              "application/pdf": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "404": {
            "description": "Document not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "errorMessage": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "errorMessage": "Document 65f1a2b3c4d5e6f789012345 not found"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/items": {
      "post": {
        "tags": [
          "shipper-items"
        ],
        "summary": "Create or Update Items",
        "description": "Create or update one or more inventory items. Most integrations send standard items without `variants`. When a facility uses an alternate SKU, an item may instead include nested variants and facility-specific conversions. A nested variant is stored as a regular inventory item linked to its parent item; it does not require or inherit the parent item's packaging. Identify facilities with `companyEmailDomain` rather than an internal facility organization ID. If a variant fails validation, the parent item and other valid variants may still be ingested and the endpoint returns `207` with per-SKU failures.",
        "operationId": "createOrUpdateItems",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateItemsRequest"
              },
              "examples": {
                "standardItem": {
                  "summary": "Standard inventory item without variants (most common)",
                  "description": "Omit `variants` and `facilityConversions` when facilities use the same SKU and quantity representation.",
                  "value": {
                    "items": [
                      {
                        "sku": "A01-COFFEE",
                        "name": "Night Owl Coffee",
                        "description": "Premium roasted coffee beans",
                        "nmfcCode": "12345",
                        "isStackable": true,
                        "isTurnable": false,
                        "packaging": [
                          {
                            "type": "Each",
                            "parentType": "Case",
                            "quantityPerParent": 12
                          },
                          {
                            "type": "Case",
                            "parentType": "Pallet",
                            "quantityPerParent": 50,
                            "weight": {
                              "value": 20,
                              "unit": "LB"
                            }
                          },
                          {
                            "type": "Pallet"
                          }
                        ],
                        "reeferSettings": {
                          "minTemperature": 34,
                          "maxTemperature": 38,
                          "unit": "F",
                          "preCoolTemperature": 36,
                          "sentryMode": "Continuous"
                        }
                      }
                    ]
                  }
                },
                "itemWithVariants": {
                  "summary": "Inventory item with a facility-specific variant SKU",
                  "description": "Use a nested variant only when a facility identifies or counts the item differently.",
                  "value": {
                    "items": [
                      {
                        "sku": "A01-COFFEE",
                        "name": "Night Owl Coffee",
                        "packaging": [
                          {
                            "type": "Pallet"
                          }
                        ],
                        "variants": [
                          {
                            "sku": "A01-COFFEE-CASE",
                            "facilityConversions": [
                              {
                                "companyEmailDomain": "distribution-center.example",
                                "quantityUnit": "Case",
                                "sameUnitConversion": {
                                  "from": 12,
                                  "to": 1
                                }
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "All items created or updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateItemsResponse"
                },
                "example": {
                  "upsertedItems": [
                    {
                      "sku": "A01-COFFEE"
                    }
                  ],
                  "failures": []
                }
              }
            }
          },
          "207": {
            "description": "Partial success - some items failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateItemsResponse"
                },
                "example": {
                  "upsertedItems": [
                    {
                      "sku": "A01-COFFEE"
                    }
                  ],
                  "failures": [
                    {
                      "sku": "A01-COFFEE-CASE",
                      "error": "Facility distribution-center.example is unavailable or not accessible"
                    }
                  ]
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/items/sku/{sku}": {
      "put": {
        "tags": [
          "shipper-items"
        ],
        "summary": "Update Item by SKU",
        "description": "This endpoint allows shippers to update an existing inventory item by its SKU.",
        "operationId": "updateItemBySku",
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "description": "The SKU of the item.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "A01-COFFEE"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInventoryItem"
              },
              "example": {
                "name": "Night Owl Coffee - Updated",
                "description": "Updated description",
                "nmfcCode": "12346",
                "isStackable": false,
                "packaging": [
                  {
                    "type": "Pallet",
                    "weight": {
                      "value": 1000,
                      "unit": "LB"
                    }
                  }
                ],
                "reeferSettings": {
                  "minTemperature": 32,
                  "maxTemperature": 40,
                  "unit": "F",
                  "sentryMode": "Cycle"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Item updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sku": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "sku": "A01-COFFEE"
                }
              }
            }
          },
          "404": {
            "description": "Item not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "Item with SKU A01-COFFEE not found"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "shipper-items"
        ],
        "summary": "Delete Item by SKU",
        "description": "This endpoint allows shippers to delete an inventory item by its SKU.",
        "operationId": "deleteItemBySku",
        "parameters": [
          {
            "name": "sku",
            "in": "path",
            "description": "The SKU of the item.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "A01-COFFEE"
          }
        ],
        "responses": {
          "200": {
            "description": "Item deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "message": "Item with SKU A01-COFFEE deleted successfully"
                }
              }
            }
          },
          "404": {
            "description": "Item not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "Item with SKU A01-COFFEE not found"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/rate-quote": {
      "post": {
        "tags": [
          "shipper-rate-quote"
        ],
        "summary": "Create Rate Quote from Existing Order",
        "description": "Request a freight rate quote using an existing order. Either `orderNumber` or `orderReferenceNumber` is required.",
        "operationId": "createRateQuoteFromOrder",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRateQuoteFromExistingOrderRequest"
              },
              "example": {
                "isTest": true,
                "orderNumber": "ORD-1234",
                "pickupDates": {
                  "startAt": "2025-06-01",
                  "endAt": "2025-06-02"
                },
                "pickupFacility": {
                  "source": "NetSuite",
                  "sourceId": "F100001",
                  "location": {
                    "street": "123 Main Street",
                    "city": "Joliet",
                    "state": "IL",
                    "zipcode": "60436",
                    "countryCode": "US"
                  }
                },
                "additionalReferenceNumbers": [
                  {
                    "type": "PO",
                    "value": "PO-9876"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rate quote created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateRateQuoteFromExistingOrderResponse"
                },
                "example": {
                  "shortId": "RQ-0042"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "shipper-rate-quote"
        ],
        "summary": "Get Rate Quote",
        "description": "Retrieve a rate quote and all of its carrier responses by short ID.",
        "operationId": "getRateQuote",
        "parameters": [
          {
            "name": "shortId",
            "in": "query",
            "description": "Rate quote short ID (e.g. `RQ-0042`).",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "RQ-0042"
          }
        ],
        "responses": {
          "200": {
            "description": "Rate quote details with carrier responses",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RateQuote"
                  }
                },
                "example": [
                  {
                    "isTest": true,
                    "shortId": "RQ-0042",
                    "equipmentType": "Dryvan",
                    "referenceNumbers": [
                      {
                        "type": "PO",
                        "value": "PO-9876"
                      }
                    ],
                    "stops": [
                      {
                        "type": "Pickup",
                        "location": {
                          "city": "Chicago",
                          "state": "IL",
                          "zipcode": "60601",
                          "countryCode": "US"
                        },
                        "facility": {
                          "name": "Origin Warehouse",
                          "location": {
                            "street": "100 W Monroe St",
                            "city": "Chicago",
                            "state": "IL",
                            "zipcode": "60601",
                            "countryCode": "US"
                          }
                        },
                        "dates": {
                          "orderDates": {
                            "startAt": {
                              "epoch": 1748736000000,
                              "timeZone": "America/Chicago",
                              "isDateOnly": true
                            },
                            "endAt": {
                              "epoch": 1748822400000,
                              "timeZone": "America/Chicago",
                              "isDateOnly": true
                            }
                          }
                        },
                        "referenceNumbers": [],
                        "items": []
                      },
                      {
                        "type": "Dropoff",
                        "location": {
                          "city": "New York",
                          "state": "NY",
                          "zipcode": "10001",
                          "countryCode": "US"
                        },
                        "facility": {
                          "name": "Destination DC",
                          "location": {
                            "street": "350 5th Ave",
                            "city": "New York",
                            "state": "NY",
                            "zipcode": "10001",
                            "countryCode": "US"
                          }
                        },
                        "dates": {},
                        "referenceNumbers": [],
                        "items": []
                      }
                    ],
                    "responses": [
                      {
                        "responseId": "507f1f77bcf86cd799439012",
                        "status": "open",
                        "price": {
                          "cents": 250000,
                          "currencyCode": "USD"
                        },
                        "carrier": {
                          "name": "Example Carrier",
                          "scac": "EXCA"
                        },
                        "mode": "FTL",
                        "transitDays": {
                          "min": 2,
                          "max": 4
                        },
                        "expiresAt": "2025-06-02",
                        "stops": [
                          {
                            "index": 0,
                            "type": "Pickup",
                            "estimatedDates": {
                              "startAt": {
                                "epoch": 1748736000000,
                                "timeZone": "America/Chicago",
                                "isDateOnly": true
                              }
                            }
                          }
                        ]
                      }
                    ]
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Missing required parameter",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "shortId query param is required"
                }
              }
            }
          },
          "404": {
            "description": "Rate quote not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "Rate quote not found"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/rate-quote/create": {
      "post": {
        "tags": [
          "shipper-rate-quote"
        ],
        "summary": "Create Standalone Rate Quote",
        "description": "Request freight rate quotes without an existing order. At least one `pickup` and one `dropoff` stop are required. Returns the rate quote ID and any responses received synchronously from integrations.",
        "operationId": "createStandaloneRateQuote",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRateQuoteRequest"
              },
              "example": {
                "isTest": true,
                "stops": [
                  {
                    "type": "Pickup",
                    "facility": {
                      "name": "Origin Warehouse",
                      "location": {
                        "street": "100 W Monroe St",
                        "city": "Chicago",
                        "state": "IL",
                        "zipcode": "60601",
                        "countryCode": "US"
                      }
                    },
                    "dates": {
                      "startAt": "2025-06-01",
                      "endAt": "2025-06-02"
                    },
                    "requirements": {
                      "liftgate": true,
                      "inside": false,
                      "limitedAccess": false,
                      "residential": false,
                      "appointment": true,
                      "tradeshow": false
                    },
                    "items": [
                      {
                        "weight": {
                          "value": 500,
                          "unit": "LB"
                        },
                        "class": "70",
                        "quantity": {
                          "count": 2,
                          "unit": "Pallet"
                        },
                        "description": "Pallets of coffee"
                      }
                    ],
                    "referenceNumbers": [
                      {
                        "type": "PO",
                        "value": "PO-9876"
                      }
                    ]
                  },
                  {
                    "type": "Dropoff",
                    "facility": {
                      "name": "Destination DC",
                      "location": {
                        "street": "350 5th Ave",
                        "city": "New York",
                        "state": "NY",
                        "zipcode": "10001",
                        "countryCode": "US"
                      }
                    }
                  }
                ],
                "equipmentType": "Dryvan",
                "referenceNumbers": [
                  {
                    "type": "PO",
                    "value": "PO-9876"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Rate quote created with carrier responses",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateQuoteCreateResponse"
                },
                "example": {
                  "shortId": "RQ-0042",
                  "responses": [
                    {
                      "responseId": "507f1f77bcf86cd799439012",
                      "status": "open",
                      "price": {
                        "cents": 250000,
                        "currencyCode": "USD"
                      },
                      "carrier": {
                        "name": "Example Carrier",
                        "scac": "EXCA"
                      },
                      "mode": "FTL",
                      "transitDays": {
                        "min": 2,
                        "max": 4
                      },
                      "expiresAt": "2025-06-02",
                      "stops": [
                        {
                          "index": 0,
                          "type": "Pickup",
                          "estimatedDates": {
                            "startAt": {
                              "epoch": 1748736000000,
                              "timeZone": "America/Chicago",
                              "isDateOnly": true
                            },
                            "endAt": {
                              "epoch": 1748822400000,
                              "timeZone": "America/Chicago",
                              "isDateOnly": true
                            }
                          }
                        },
                        {
                          "index": 1,
                          "type": "Dropoff",
                          "estimatedDates": {
                            "startAt": {
                              "epoch": 1748995200000,
                              "timeZone": "America/New_York",
                              "isDateOnly": true
                            }
                          }
                        }
                      ]
                    }
                  ],
                  "errors": [],
                  "infoMessages": []
                }
              }
            }
          },
          "400": {
            "description": "Validation error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "At least one pickup stop is required"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/tender": {
      "post": {
        "tags": [
          "shipper-tender"
        ],
        "summary": "Create Tender",
        "description": "Tender (accept) a specific rate quote response at its quoted price. This initiates the booking with the carrier. Returns the updated tender status and load number if one was created.",
        "operationId": "createTender",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TenderRequest"
              },
              "example": {
                "rateQuoteResponseId": "507f1f77bcf86cd799439012"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tender created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenderStatusResponse"
                },
                "example": {
                  "rateQuoteResponseId": "507f1f77bcf86cd799439012",
                  "status": "tendered",
                  "loadNumber": "LOAD-10042"
                }
              }
            }
          },
          "400": {
            "description": "Missing required field",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "rateQuoteResponseId is required"
                }
              }
            }
          },
          "404": {
            "description": "Rate quote response not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "Rate quote response not found: 507f1f77bcf86cd799439012"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "shipper-tender"
        ],
        "summary": "Get Tender Status",
        "description": "Retrieve the current tender status for a rate quote response.",
        "operationId": "getTenderStatus",
        "parameters": [
          {
            "name": "rateQuoteResponseId",
            "in": "query",
            "description": "The rate quote response ID to look up.",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "507f1f77bcf86cd799439012"
          }
        ],
        "responses": {
          "200": {
            "description": "Tender status retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenderStatusResponse"
                },
                "example": {
                  "rateQuoteResponseId": "507f1f77bcf86cd799439012",
                  "status": "accepted",
                  "loadNumber": "LOAD-10042"
                }
              }
            }
          },
          "400": {
            "description": "Missing required parameter",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "rateQuoteResponseId query param is required"
                }
              }
            }
          },
          "404": {
            "description": "Rate quote response not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                },
                "example": {
                  "error": "Rate quote response not found: 507f1f77bcf86cd799439012"
                }
              }
            }
          }
        }
      }
    },
    "/api/ext/v1/rate-quote/responses": {
      "post": {
        "tags": [
          "carrier-rate-quotes"
        ],
        "summary": "Submit Rate Quote Responses",
        "description": "Submit carrier rate quote responses asynchronously to Owlery after receiving a Rate Quote Requested webhook. Use the `id` from the webhook request and return it as `id` in this submission. Submit as many modes, service options, and prices as possible in one call; Owlery creates one quote response per item.",
        "operationId": "submitCarrierRateQuoteResponses",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CarrierRateQuoteResponseBody"
              },
              "example": {
                "id": "RQ-0042",
                "responses": [
                  {
                    "carrierQuoteId": "carrier-quote-ftl-789",
                    "mode": "FTL",
                    "price": {
                      "cents": 150000,
                      "currencyCode": "USD"
                    },
                    "lineItems": [
                      {
                        "category": "lineHaul",
                        "code": "LH",
                        "total": 130000
                      },
                      {
                        "category": "fuelSurcharge",
                        "code": "FSC",
                        "total": 25000
                      },
                      {
                        "category": "discount",
                        "code": "DISC",
                        "total": -5000
                      }
                    ],
                    "allInRate": true,
                    "transitDays": {
                      "min": 3,
                      "max": 4
                    },
                    "expiresAt": "2026-06-01T18:00:00Z",
                    "stops": [
                      {
                        "index": 0,
                        "type": "Pickup",
                        "appointmentDates": {
                          "startAt": "2026-06-01T08:00:00Z",
                          "endAt": "2026-06-01T10:00:00Z"
                        },
                        "liveDropType": "live"
                      },
                      {
                        "index": 1,
                        "type": "Dropoff",
                        "estimatedDates": {
                          "startAt": "2026-06-03T08:00:00Z",
                          "endAt": "2026-06-03T12:00:00Z"
                        },
                        "liveDropType": "drop"
                      }
                    ]
                  },
                  {
                    "carrierQuoteId": "carrier-quote-ltl-790",
                    "mode": "LTL",
                    "price": {
                      "cents": 98000,
                      "currencyCode": "USD"
                    },
                    "lineItems": [
                      {
                        "category": "lineHaul",
                        "code": "LH",
                        "total": 84000
                      },
                      {
                        "category": "fuelSurcharge",
                        "code": "FSC",
                        "total": 14000
                      }
                    ],
                    "carrier": {
                      "scac": "EXMP",
                      "name": "Example Carrier"
                    },
                    "interline": false,
                    "deliveryGuarantee": {
                      "level": "guaranteed5pm"
                    },
                    "transitDays": {
                      "min": 4,
                      "max": 5
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Rate quote responses accepted for processing",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CarrierRateQuoteResponsesAccepted"
                },
                "example": {
                  "id": "RQ-0042",
                  "accepted": 2
                }
              }
            }
          },
          "400": {
            "description": "Invalid request payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Bad Request",
                  "message": "Missing required field: responses[0].carrierQuoteId"
                }
              }
            }
          },
          "401": {
            "description": "Authentication failed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Unauthorized",
                  "message": "Invalid or missing bearer token"
                }
              }
            }
          },
          "404": {
            "description": "Rate quote not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": "Not Found",
                  "message": "Rate quote not found: RQ-0042"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/quote-write-back": {
      "post": {
        "x-webhook": true,
        "tags": [
          "shipper-webhooks"
        ],
        "summary": "Quote Write-back",
        "operationId": "webhookQuoteWriteBack",
        "security": [],
        "description": "Owlery posts one object to each configured QuoteWriteBack endpoint after a user confirms Record Freight Cost and the existing recording flow succeeds. ERP failures retain their existing behavior and prevent this event. A delivery failure does not undo saved pricing. The payload includes the complete Tender contract: id remains the quote response/tender ID, price remains the awarded carrier cost in cents, and updatedAtInMs remains the tender status time. Customer charges are separate. Order mappings and order-linked item references are limited to the eligible parent orders used for freight recording. Source order numbers do not replace customer order/line references. No load is required; unavailable linkedLoad or trackingUrl fields are omitted, not null. Creating a load later does not automatically send another event. Respond with any 2xx status within 10 seconds to acknowledge the event. Timeouts, network errors, 5xx and 429 responses are retried after 3, 9, 27, 81 and 243 minutes, then every 10 hours, for up to 10 retries over about 56 hours. Redirects and other non-2xx responses end retries for that endpoint. Each endpoint is retried independently, and a user can resend the event to endpoints that have not acknowledged it, including after retries end. Retries and resends carry the same eventId and payload, so the same event may arrive more than once; use eventId to ignore duplicates. Recording freight cost again for the same quote creates a new event and stops retries and resends of older events, but an older event already being sent can still arrive after the newer one. Ignore an event whose occurredAt is earlier than one already applied for the same quote.id.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/QuoteWriteBackWebhookMessage"
              },
              "examples": {
                "withLoad": {
                  "summary": "Recorded customer charge and available tracking",
                  "value": {
                    "id": "507f1f77bcf86cd799439011",
                    "referenceNumbers": [
                      {
                        "type": "PO",
                        "value": "CUSTOMER-PO-42"
                      }
                    ],
                    "mode": "FTL",
                    "equipmentType": "Dryvan",
                    "isTeamRate": false,
                    "isContractRate": false,
                    "isDirectTender": false,
                    "shipmentMode": "Truck",
                    "stops": [
                      {
                        "index": 0,
                        "type": "pickup",
                        "orders": [
                          {
                            "orderNumber": "SHIP-001"
                          }
                        ]
                      },
                      {
                        "index": 1,
                        "type": "dropoff",
                        "orders": [
                          {
                            "orderNumber": "SHIP-001"
                          }
                        ]
                      }
                    ],
                    "orders": [
                      {
                        "orderNumber": "SHIP-001",
                        "pickupStopIndex": 0,
                        "dropoffStopIndex": 1
                      }
                    ],
                    "price": {
                      "total": 42500,
                      "currencyCode": "USD"
                    },
                    "broker": {
                      "name": "Example Carrier",
                      "scac": "EXAM"
                    },
                    "status": "accepted",
                    "updatedAtInMs": 1793260800000,
                    "updatedBy": "507f1f77bcf86cd799439012",
                    "eventId": "a916c3be-b834-46d1-a494-05239c1bde69",
                    "occurredAt": "2026-10-29T09:00:00.000Z",
                    "quote": {
                      "id": "507f1f77bcf86cd799439013",
                      "shortId": "Q12345"
                    },
                    "customerFreightCharges": [
                      {
                        "sourceNumber": "SHIP-001",
                        "orderId": "507f1f77bcf86cd799439014",
                        "orderNumber": "SHIP-001",
                        "price": {
                          "total": 50000,
                          "currencyCode": "USD"
                        }
                      }
                    ],
                    "loadNumber": "LOAD-12345",
                    "linkedLoad": {
                      "id": "507f1f77bcf86cd799439015",
                      "number": "LOAD-12345",
                      "trackingUrl": "https://app.owlery.ai/open/load/tracking?trackingId=6c2c4645-deea-4d40-a068-85d52b833a22"
                    }
                  }
                },
                "withoutLoad": {
                  "summary": "Recorded pricing before a load exists",
                  "value": {
                    "id": "507f1f77bcf86cd799439011",
                    "referenceNumbers": [
                      {
                        "type": "PO",
                        "value": "CUSTOMER-PO-42"
                      }
                    ],
                    "mode": "FTL",
                    "equipmentType": "Dryvan",
                    "isTeamRate": false,
                    "isContractRate": false,
                    "isDirectTender": false,
                    "shipmentMode": "Truck",
                    "stops": [
                      {
                        "index": 0,
                        "type": "pickup",
                        "orders": [
                          {
                            "orderNumber": "SHIP-001"
                          }
                        ]
                      },
                      {
                        "index": 1,
                        "type": "dropoff",
                        "orders": [
                          {
                            "orderNumber": "SHIP-001"
                          }
                        ]
                      }
                    ],
                    "orders": [
                      {
                        "orderNumber": "SHIP-001",
                        "pickupStopIndex": 0,
                        "dropoffStopIndex": 1
                      }
                    ],
                    "price": {
                      "total": 42500,
                      "currencyCode": "USD"
                    },
                    "broker": {
                      "name": "Example Carrier",
                      "scac": "EXAM"
                    },
                    "status": "accepted",
                    "updatedAtInMs": 1793260800000,
                    "updatedBy": "507f1f77bcf86cd799439012",
                    "eventId": "a916c3be-b834-46d1-a494-05239c1bde69",
                    "occurredAt": "2026-10-29T09:00:00.000Z",
                    "quote": {
                      "id": "507f1f77bcf86cd799439013",
                      "shortId": "Q12345"
                    },
                    "customerFreightCharges": [
                      {
                        "sourceNumber": "SHIP-001",
                        "orderId": "507f1f77bcf86cd799439014",
                        "orderNumber": "SHIP-001",
                        "price": {
                          "total": 50000,
                          "currencyCode": "USD"
                        }
                      }
                    ]
                  }
                },
                "noRecordedCharges": {
                  "summary": "Confirmation without recorded customer charges",
                  "value": {
                    "id": "507f1f77bcf86cd799439011",
                    "referenceNumbers": [
                      {
                        "type": "PO",
                        "value": "CUSTOMER-PO-42"
                      }
                    ],
                    "mode": "FTL",
                    "equipmentType": "Dryvan",
                    "isTeamRate": false,
                    "isContractRate": false,
                    "isDirectTender": false,
                    "shipmentMode": "Truck",
                    "stops": [
                      {
                        "index": 0,
                        "type": "pickup",
                        "orders": [
                          {
                            "orderNumber": "SHIP-001"
                          }
                        ]
                      },
                      {
                        "index": 1,
                        "type": "dropoff",
                        "orders": [
                          {
                            "orderNumber": "SHIP-001"
                          }
                        ]
                      }
                    ],
                    "orders": [
                      {
                        "orderNumber": "SHIP-001",
                        "pickupStopIndex": 0,
                        "dropoffStopIndex": 1
                      }
                    ],
                    "price": {
                      "total": 42500,
                      "currencyCode": "USD"
                    },
                    "broker": {
                      "name": "Example Carrier",
                      "scac": "EXAM"
                    },
                    "status": "accepted",
                    "updatedAtInMs": 1793260800000,
                    "updatedBy": "507f1f77bcf86cd799439012",
                    "eventId": "bfc1dcf6-ff59-4ba2-86df-0c073d26d015",
                    "occurredAt": "2026-10-29T09:00:00.000Z",
                    "quote": {
                      "id": "507f1f77bcf86cd799439013",
                      "shortId": "Q12345"
                    },
                    "customerFreightCharges": []
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Webhook received successfully."
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key passed as Bearer Token. Contact support@owlery.ai for an API Key."
      },
      "CarrierWebhookAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "Authentication headers sent by Owlery to carrier webhook endpoints. The exact header name and value are configured per carrier, and may be a bearer token or any other static header the carrier can validate. The carrier should use these authentication headers to identify the shipper/account context. Owlery does not send shipper organization IDs, shipper profile IDs, or account routing identifiers in the webhook body."
      }
    },
    "schemas": {
      "UpsertOrder": {
        "type": "object",
        "required": [
          "type",
          "isTest",
          "source",
          "sourceId",
          "status",
          "stops",
          "items"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "transfer",
              "purchase",
              "sales"
            ],
            "description": "The type of the order."
          },
          "isTest": {
            "type": "boolean",
            "description": "Whether or not the order is a test order."
          },
          "orderNumber": {
            "type": "string",
            "description": "The unique number of the order."
          },
          "source": {
            "type": "string",
            "enum": [
              "NetSuite",
              "WebIntegrated",
              "SugarCRM"
            ],
            "description": "The system the order originates from. Email support@owlery.ai to add new sources."
          },
          "sourceId": {
            "type": "string",
            "description": "The unique ID of the order from the source system. This can be the same as orderNumber if a separate unique ID is not available."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "inProgress",
              "closed",
              "cancelled"
            ],
            "description": "The status of the order."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stop"
            },
            "description": "The stops associated with the order."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentItem"
            },
            "description": "The items being shipped as part of the order."
          },
          "loadItems": {
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/UpsertOrderLoadItem"
            },
            "description": "Pallet rows for the order. Quotes for the order use these rows instead of calculating pallets from `items`. Omit this field when you have no pallet details; an empty array or `null` is rejected. Every item in `items` must be on exactly one row, and the items of an order with pallet rows cannot use the `pallet` or `skid` unit of measure.\n\nSending an order again with `loadItems` replaces its items and pallet rows together. Once an order has pallet rows, every later request for that order must include all of its rows: a request that omits `loadItems` for such an order returns `409` and nothing in the request is saved. Send the same `orderNumber`, `type`, `source`, and `sourceId` every time; a request that changes any of them is saved as a separate order."
          }
        }
      },
      "UpsertOrderLoadItem": {
        "type": "object",
        "required": [
          "quantity",
          "dimensions",
          "weight",
          "class",
          "isStackable",
          "isTurnable",
          "orderItemIndexes"
        ],
        "properties": {
          "quantity": {
            "type": "object",
            "required": [
              "count",
              "unit"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 1,
                "description": "Number of pallets on this row."
              },
              "unit": {
                "type": "string",
                "enum": [
                  "pallet"
                ],
                "description": "Quantity unit. Must be `pallet`."
              }
            },
            "description": "Number of pallets on this row."
          },
          "dimensions": {
            "type": "object",
            "required": [
              "length",
              "width",
              "height",
              "unit"
            ],
            "properties": {
              "length": {
                "type": "number",
                "minimum": 0,
                "exclusiveMinimum": true,
                "description": "Length value."
              },
              "width": {
                "type": "number",
                "minimum": 0,
                "exclusiveMinimum": true,
                "description": "Width value."
              },
              "height": {
                "type": "number",
                "minimum": 0,
                "exclusiveMinimum": true,
                "description": "Height value."
              },
              "unit": {
                "type": "string",
                "enum": [
                  "in",
                  "cm"
                ],
                "description": "Length unit."
              }
            },
            "description": "Dimensions of a single pallet on this row."
          },
          "weight": {
            "type": "object",
            "required": [
              "value",
              "unit"
            ],
            "properties": {
              "value": {
                "type": "number",
                "minimum": 0,
                "exclusiveMinimum": true,
                "description": "Weight value."
              },
              "unit": {
                "type": "string",
                "enum": [
                  "lb",
                  "kg"
                ],
                "description": "Weight unit."
              }
            },
            "description": "Total weight of all pallets on this row."
          },
          "class": {
            "type": "string",
            "enum": [
              "CLASS_50",
              "CLASS_55",
              "CLASS_60",
              "CLASS_65",
              "CLASS_70",
              "CLASS_77_5",
              "CLASS_85",
              "CLASS_92_5",
              "CLASS_100",
              "CLASS_110",
              "CLASS_125",
              "CLASS_150",
              "CLASS_175",
              "CLASS_200",
              "CLASS_250",
              "CLASS_300",
              "CLASS_400",
              "CLASS_500"
            ],
            "description": "Freight class of this row. For example, `CLASS_70` is class 70 and `CLASS_77_5` is class 77.5."
          },
          "nmfcCode": {
            "type": "string",
            "maxLength": 50,
            "description": "NMFC code."
          },
          "description": {
            "type": "string",
            "maxLength": 500,
            "description": "Description of the pallets on this row."
          },
          "isStackable": {
            "type": "boolean",
            "description": "Whether the pallets on this row can be stacked."
          },
          "isTurnable": {
            "type": "boolean",
            "description": "Whether the pallets on this row can be turned."
          },
          "orderItemIndexes": {
            "type": "array",
            "minItems": 1,
            "uniqueItems": true,
            "items": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Zero-based positions in the same order's `items` array of the items on this row. Each item must be on exactly one row of the order."
          }
        }
      },
      "FacilityOrderUpsert": {
        "type": "object",
        "required": [
          "type",
          "orderNumber",
          "sourceId",
          "status",
          "stops",
          "items"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "description": "Facility child order type. `inbound` targets the dropoff stop for receiving work; `outbound` targets the pickup stop for shipping work."
          },
          "isTest": {
            "type": "boolean",
            "description": "Whether or not the order is a test order."
          },
          "orderNumber": {
            "type": "string",
            "description": "The unique number of the facility order. Keep this value stable with `type` for idempotent updates."
          },
          "sourceId": {
            "type": "string",
            "description": "The unique ID of the facility order in the source system. This is stored as source metadata; upserts match existing facility orders by `orderNumber` and `type`."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "inProgress",
              "closed",
              "cancelled",
              "confirmed",
              "rejected",
              "deleted",
              "unknown"
            ],
            "description": "The status of the facility order."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FacilityOrderStop"
            },
            "description": "Facility-order stops. `inbound` orders must include the dropoff target stop at index `1`; `outbound` orders must include the pickup target stop at index `0`. The non-target stop is optional. When provided, pickup must use index `0` and dropoff must use index `1`."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentItem"
            },
            "description": "The items being received or shipped as part of the facility order."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers for the facility order."
          },
          "notes": {
            "type": "string",
            "description": "Optional notes for the facility order."
          }
        },
        "description": "The target stop must include a facility and at least one of `orderDates`, `actualDates`, or `appointmentDates` with a valid `startAt` or `endAt` date."
      },
      "FacilityOrderStop": {
        "type": "object",
        "required": [
          "index",
          "type"
        ],
        "properties": {
          "index": {
            "type": "number",
            "description": "The zero-based index of the stop. Facility orders use pickup index `0` and dropoff index `1`."
          },
          "type": {
            "type": "string",
            "enum": [
              "pickup",
              "dropoff"
            ],
            "description": "The type of stop."
          },
          "sourceId": {
            "type": "string",
            "description": "Optional unique identifier of the stop in the source system."
          },
          "facility": {
            "$ref": "#/components/schemas/FacilityOrderFacility"
          },
          "orderDates": {
            "$ref": "#/components/schemas/FacilityOrderDatePair"
          },
          "actualDates": {
            "$ref": "#/components/schemas/FacilityOrderDatePair"
          },
          "appointmentDates": {
            "$ref": "#/components/schemas/FacilityOrderDatePair"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers specific to the stop."
          }
        }
      },
      "FacilityOrderDatePair": {
        "type": "object",
        "properties": {
          "startAt": {
            "type": "string",
            "description": "Start date in ISO8601 format (without time)."
          },
          "endAt": {
            "type": "string",
            "description": "End date in ISO8601 format (without time)."
          }
        }
      },
      "FacilityOrderFacility": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Owlery facility ID. Provide this, `sourceId`, or `lookupCode` to identify the facility."
          },
          "lookupCode": {
            "type": "string",
            "description": "Internal lookup code for the facility. Provide this, `id`, or `sourceId` to identify the facility."
          },
          "sourceId": {
            "type": "string",
            "description": "Unique identifier of the facility in the source system. Provide this, `id`, or `lookupCode` to identify an existing facility; include full location details when introducing a new facility source ID."
          },
          "name": {
            "type": "string",
            "description": "Facility name. Recommended for readability; not required when identifying an existing facility by `id`, `sourceId`, or `lookupCode`."
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "description": "Contacts for the facility."
          }
        },
        "description": "Facility identifier for the child order. At least one of `id`, `sourceId`, or `lookupCode` is required."
      },
      "FacilityOrderUpsertResponse": {
        "type": "object",
        "properties": {
          "createdOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatedFacilityOrder"
            },
            "description": "Facility orders upserted successfully."
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Failure"
            },
            "description": "Failure messages for facility orders which were not upserted successfully."
          }
        }
      },
      "CreatedFacilityOrder": {
        "type": "object",
        "required": [
          "orderNumber",
          "type"
        ],
        "properties": {
          "orderNumber": {
            "type": "string",
            "description": "Unique identifier of a facility order."
          },
          "type": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "description": "Facility child order type."
          }
        }
      },
      "Stop": {
        "type": "object",
        "required": [
          "facility",
          "type",
          "index",
          "preventSendOrder"
        ],
        "properties": {
          "facility": {
            "$ref": "#/components/schemas/Facility"
          },
          "type": {
            "type": "string",
            "enum": [
              "pickup",
              "dropoff"
            ],
            "description": "The type of stop."
          },
          "index": {
            "type": "number",
            "description": "The zero-based index of the stop."
          },
          "preventSendOrder": {
            "type": "boolean",
            "description": "Whether or not we should not attempt to send the order to this facility."
          },
          "orderDates": {
            "$ref": "#/components/schemas/DatePair"
          },
          "actualDates": {
            "$ref": "#/components/schemas/DatePair"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers specific to the stop."
          }
        }
      },
      "ShipmentItem": {
        "type": "object",
        "required": [
          "expectedQuantity",
          "unitOfMeasure",
          "inventory"
        ],
        "properties": {
          "lotCode": {
            "type": "string",
            "description": "The lot code of the item."
          },
          "expectedQuantity": {
            "type": "number",
            "description": "The expected quantity of the item."
          },
          "unitOfMeasure": {
            "type": "string",
            "enum": [
              "each",
              "bottle",
              "bag",
              "pack",
              "case",
              "carton",
              "pallet",
              "skid",
              "roll",
              "pail",
              "tote",
              "kd",
              "poly"
            ],
            "description": "Unit of measure."
          },
          "expirationDate": {
            "type": "string",
            "description": "The expiration date of the item."
          },
          "inventory": {
            "$ref": "#/components/schemas/Inventory"
          }
        }
      },
      "WebhookOrder": {
        "type": "object",
        "required": [
          "type",
          "items"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "transfer",
              "purchase",
              "sales",
              "inbound",
              "outbound"
            ],
            "description": "The type of the order."
          },
          "orderNumber": {
            "type": "string",
            "description": "The unique number of the order."
          },
          "isTest": {
            "type": "boolean",
            "description": "Whether or not the order is a test order."
          },
          "source": {
            "type": "string",
            "enum": [
              "NetSuite",
              "WebIntegrated",
              "SugarCRM"
            ],
            "description": "The system the order originates from."
          },
          "sourceId": {
            "type": "string",
            "description": "The unique ID of the order from the source system."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookItem"
            },
            "description": "The items being shipped as part of the order."
          }
        }
      },
      "WebhookItem": {
        "type": "object",
        "required": [
          "sku"
        ],
        "properties": {
          "expectedQuantity": {
            "type": "number",
            "description": "The expected quantity of the item."
          },
          "actualQuantity": {
            "type": "number",
            "description": "The actual quantity of the item."
          },
          "unitOfMeasure": {
            "type": "string",
            "enum": [
              "each",
              "bottle",
              "bag",
              "pack",
              "case",
              "carton",
              "pallet",
              "skid",
              "roll",
              "pail",
              "tote",
              "kd",
              "poly"
            ],
            "description": "Unit of measure."
          },
          "sku": {
            "type": "string",
            "description": "The SKU of the item."
          },
          "name": {
            "type": "string",
            "description": "The name of the item."
          },
          "sourceId": {
            "type": "string",
            "description": "The unique identifier of the item from a source system."
          },
          "details": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookItemDetail"
            },
            "description": "Inventory information of the item."
          }
        }
      },
      "WebhookItemDetail": {
        "type": "object",
        "properties": {
          "lotCode": {
            "type": "string",
            "description": "The lot code of the item."
          },
          "actualQuantity": {
            "type": "number",
            "description": "The actual quantity of the item."
          },
          "unitOfMeasure": {
            "type": "string",
            "enum": [
              "each",
              "bottle",
              "bag",
              "pack",
              "case",
              "carton",
              "pallet",
              "skid",
              "roll",
              "pail",
              "tote",
              "kd",
              "poly"
            ],
            "description": "Unit of measure."
          },
          "expirationDate": {
            "type": "string",
            "description": "The expiration date of the item."
          },
          "sourceId": {
            "type": "string",
            "description": "The unique identifier of the item from a source system."
          }
        }
      },
      "TenderWebhookMessage": {
        "type": "object",
        "required": [
          "id",
          "referenceNumbers",
          "mode",
          "equipmentType",
          "isTeamRate",
          "isContractRate",
          "isDirectTender",
          "shipmentMode",
          "stops",
          "orders",
          "price",
          "broker",
          "status",
          "updatedAtInMs",
          "updatedBy"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique tender identifier."
          },
          "loadNumber": {
            "type": "string",
            "description": "Load number associated with the tender, when available. For tender events before carrier acceptance, this may be omitted because some carriers only provide the load number on acceptance. If Universal Shipment ID enforcement is enabled for a supported Manual/EDI-style tender, Owlery may send the source tender ID here because that identifier is used as the Owlery load number."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers associated with the tender."
          },
          "mode": {
            "type": "string",
            "enum": [
              "FTL",
              "LTL",
              "PTL",
              "VLTL",
              "IMDL"
            ],
            "description": "Transportation mode."
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer",
              "Flatbed",
              "Drayage",
              "Tanker"
            ],
            "description": "Equipment type."
          },
          "reeferSettings": {
            "$ref": "#/components/schemas/ReeferSettings"
          },
          "isTeamRate": {
            "type": "boolean",
            "description": "Whether this is a team driver rate."
          },
          "isContractRate": {
            "type": "boolean",
            "description": "Whether this is a contract rate from a rate on file."
          },
          "isDirectTender": {
            "type": "boolean",
            "description": "Whether this is a direct tender."
          },
          "shipmentMode": {
            "type": "string",
            "enum": [
              "Normal",
              "Expedited"
            ],
            "description": "Shipment mode."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenderWebhookStop"
            },
            "description": "Array of tender stops with zero-based route index, facility/date information, freight items, and associated order numbers."
          },
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenderWebhookOrderStopMapping"
            },
            "description": "Order-level mapping to pickup/dropoff route stops and zero-based stop-type sequence numbers."
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenderWebhookLineItem"
            },
            "description": "Breakdown of charges."
          },
          "broker": {
            "$ref": "#/components/schemas/TenderWebhookBrokerProfile"
          },
          "status": {
            "type": "string",
            "enum": [
              "BOLCreated",
              "CarrierSelected",
              "Tendered",
              "Accepted"
            ],
            "description": "Tender status."
          },
          "updatedAtInMs": {
            "type": "number",
            "description": "Unix timestamp in milliseconds when the tender status was updated."
          },
          "updatedBy": {
            "type": "string",
            "description": "Email address of the user who created the tender."
          }
        }
      },
      "TenderWebhookLineItem": {
        "type": "object",
        "required": [
          "category",
          "total",
          "code"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Description of the charge."
          },
          "category": {
            "type": "string",
            "enum": [
              "lineHaul",
              "fuelSurcharge",
              "detention",
              "lumper",
              "discount",
              "other"
            ],
            "description": "Category of the charge."
          },
          "total": {
            "type": "number",
            "description": "Total amount in cents."
          },
          "code": {
            "type": "string",
            "description": "Charge code."
          },
          "unitCount": {
            "type": "number",
            "description": "Quantity."
          },
          "unitPrice": {
            "type": "number",
            "description": "Price per unit in cents."
          }
        }
      },
      "TenderWebhookBrokerProfile": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the carrier/broker."
          },
          "address": {
            "type": "string",
            "description": "Full address of the carrier."
          },
          "phone": {
            "type": "string",
            "description": "Phone number in E.164 format."
          },
          "email": {
            "type": "string",
            "description": "Email address."
          },
          "mcNumber": {
            "type": "string",
            "description": "MC number."
          },
          "dotNumber": {
            "type": "string",
            "description": "DOT number."
          },
          "scac": {
            "type": "string",
            "description": "SCAC code."
          }
        }
      },
      "StopViewModel": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Type of stop."
          },
          "dates": {
            "$ref": "#/components/schemas/StopDatesViewModel"
          },
          "facilityProfile": {
            "$ref": "#/components/schemas/FacilityProfileViewModel"
          }
        }
      },
      "TenderWebhookStop": {
        "type": "object",
        "required": [
          "index",
          "type",
          "orders"
        ],
        "properties": {
          "index": {
            "type": "number",
            "description": "Zero-based stop index from the rate quote route."
          },
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Type of stop."
          },
          "orders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenderWebhookOrder"
            },
            "description": "Order numbers associated with this stop."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteItem"
            },
            "description": "Freight items associated with this stop."
          },
          "dates": {
            "$ref": "#/components/schemas/StopDatesViewModel"
          },
          "facilityProfile": {
            "$ref": "#/components/schemas/FacilityProfileViewModel"
          }
        }
      },
      "TenderWebhookOrder": {
        "type": "object",
        "required": [
          "orderNumber"
        ],
        "properties": {
          "orderNumber": {
            "type": "string",
            "description": "Order number associated with the tender stop."
          }
        }
      },
      "TenderWebhookOrderStopMapping": {
        "type": "object",
        "required": [
          "orderNumber"
        ],
        "properties": {
          "orderNumber": {
            "type": "string",
            "description": "Order number associated with the tender."
          },
          "pickupStopIndex": {
            "type": "number",
            "description": "Zero-based index of the route stop where this order is picked up."
          },
          "dropoffStopIndex": {
            "type": "number",
            "description": "Zero-based index of the route stop where this order is dropped off."
          },
          "pickupSequenceNumber": {
            "type": "number",
            "description": "Zero-based sequence of the pickup stop among pickup stops only."
          },
          "dropoffSequenceNumber": {
            "type": "number",
            "description": "Zero-based sequence of the dropoff stop among dropoff stops only."
          }
        }
      },
      "StopDatesViewModel": {
        "type": "object",
        "properties": {
          "orderDates": {
            "$ref": "#/components/schemas/DateWithTimeZone"
          },
          "estimatedDates": {
            "$ref": "#/components/schemas/DateWithTimeZone"
          },
          "appointmentDates": {
            "$ref": "#/components/schemas/DateWithTimeZone"
          },
          "actualDates": {
            "$ref": "#/components/schemas/DateWithTimeZone"
          }
        }
      },
      "FacilityProfileViewModel": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the facility."
          },
          "location": {
            "$ref": "#/components/schemas/LocationViewModel"
          }
        }
      },
      "LocationViewModel": {
        "type": "object",
        "required": [
          "city",
          "state"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state code."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code."
          },
          "countryCode": {
            "type": "string",
            "description": "ISO-3166-1 Alpha-2 country code."
          }
        }
      },
      "Facility": {
        "type": "object",
        "required": [
          "location"
        ],
        "properties": {
          "lookupCode": {
            "type": "string",
            "description": "Internal lookup code for the facility. At least one of this or (source + sourceId) must be provided."
          },
          "sourceId": {
            "type": "string",
            "description": "Unique identifier of the facility in the source system. At least one of lookupCode or (source + sourceId) must be provided."
          },
          "location": {
            "$ref": "#/components/schemas/Location"
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Contact"
            },
            "description": "Contacts for the facility."
          }
        }
      },
      "Location": {
        "type": "object",
        "required": [
          "street",
          "city",
          "state",
          "zipcode"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City."
          },
          "state": {
            "type": "string",
            "description": "2-letter state code."
          },
          "zipcode": {
            "type": "string",
            "description": "5-letter zip code."
          },
          "countryCode": {
            "type": "string",
            "description": "ISO-3166-1 Alpha-2 country code."
          }
        }
      },
      "TrackingLocation": {
        "type": "object",
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address, when available."
          },
          "city": {
            "type": "string",
            "description": "City, when available."
          },
          "state": {
            "type": "string",
            "description": "2-letter state code, when available."
          },
          "zipcode": {
            "type": "string",
            "description": "5-digit ZIP/postal code, when available."
          },
          "countryCode": {
            "type": "string",
            "description": "ISO-3166-1 Alpha-2 country code, when available."
          },
          "coordinates": {
            "$ref": "#/components/schemas/LocationCoordinates"
          }
        },
        "description": "Location where the tracking event occurred. For `InTransit`, include `coordinates.lat` and `coordinates.lng`. Coordinates must be nested under `coordinates`; flat `latitude` or `longitude` fields are not accepted. Stop-specific statuses can be matched by `stopIndex` when coordinates are unavailable."
      },
      "LocationCoordinates": {
        "type": "object",
        "required": [
          "lat",
          "lng"
        ],
        "properties": {
          "lat": {
            "type": "number",
            "format": "double",
            "description": "Latitude in decimal degrees. Use this nested `lat` field; flat `location.latitude` is not accepted."
          },
          "lng": {
            "type": "number",
            "format": "double",
            "description": "Longitude in decimal degrees. Use this nested `lng` field; flat `location.longitude` is not accepted."
          }
        },
        "description": "Geographic coordinates for the tracking event location. Required for `InTransit`."
      },
      "DatePair": {
        "type": "object",
        "required": [
          "startAt"
        ],
        "properties": {
          "startAt": {
            "type": "string",
            "description": "Start date in ISO8601 format (without time)."
          },
          "endAt": {
            "type": "string",
            "description": "End date in ISO8601 format (without time)."
          }
        }
      },
      "Contact": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "The email address of the contact."
          },
          "name": {
            "type": "string",
            "description": "The name of the contact."
          },
          "phone": {
            "type": "string",
            "description": "E.164 format of the phone number."
          }
        }
      },
      "Inventory": {
        "type": "object",
        "required": [
          "sku"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "The SKU of the item."
          },
          "name": {
            "type": "string",
            "description": "The name of the item."
          }
        }
      },
      "ReferenceNumber": {
        "type": "object",
        "required": [
          "type",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "PO",
              "SO",
              "BOL",
              "MBOL",
              "Pickup",
              "Dropoff",
              "Unknown",
              "Order",
              "ProNumber",
              "FreightPO",
              "TrailerSealNumber",
              "TrailerNumber"
            ],
            "description": "The type of the reference number."
          },
          "value": {
            "type": "string",
            "description": "The value of the reference number."
          }
        }
      },
      "PlanOrderResponse": {
        "type": "object",
        "properties": {
          "createdOrders": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatedOrder"
            },
            "description": "The orders upserted successfully."
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Failure"
            },
            "description": "Failure messages for orders which were not upserted successfully."
          }
        }
      },
      "CreatedOrder": {
        "type": "object",
        "required": [
          "orderNumber"
        ],
        "properties": {
          "orderNumber": {
            "type": "string",
            "description": "Unique identifier of an order."
          }
        }
      },
      "Failure": {
        "type": "object",
        "required": [
          "failureErrorString"
        ],
        "properties": {
          "failureErrorString": {
            "type": "string",
            "description": "Error message."
          }
        }
      },
      "PlanValidationErrorResponse": {
        "type": "object",
        "required": [
          "statusCode",
          "message",
          "userFacingMessages",
          "detail"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status code of the response."
          },
          "message": {
            "type": "string",
            "description": "Full explanation of the error and how to fix the request."
          },
          "userFacingMessages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "level": {
                  "type": "string",
                  "enum": [
                    "Warning",
                    "Error"
                  ]
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "description": "Additional messages. Empty for pallet row errors."
          },
          "detail": {
            "type": "object",
            "required": [
              "validationIssues"
            ],
            "properties": {
              "validationIssues": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ValidationIssue"
                },
                "description": "The request values to fix."
              }
            }
          }
        }
      },
      "ValidationIssue": {
        "type": "object",
        "required": [
          "path",
          "message"
        ],
        "properties": {
          "path": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "description": "Location of the value in the request body. When the request body is an array of orders, the path starts with the order's position, such as `[1, \"loadItems\", 0, \"weight\", \"value\"]`. When the request body is a single order object, the path has no order position, such as `[\"loadItems\", 0, \"weight\", \"value\"]`."
          },
          "message": {
            "type": "string",
            "description": "Short hint on how to fix the value."
          }
        }
      },
      "PlanConflictErrorResponse": {
        "type": "object",
        "required": [
          "statusCode",
          "message",
          "userFacingMessages",
          "detail"
        ],
        "properties": {
          "statusCode": {
            "type": "integer",
            "description": "HTTP status code of the response."
          },
          "message": {
            "type": "string",
            "description": "Full explanation of the error and how to fix the request."
          },
          "userFacingMessages": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "level": {
                  "type": "string",
                  "enum": [
                    "Warning",
                    "Error"
                  ]
                },
                "message": {
                  "type": "string"
                }
              }
            },
            "description": "Additional messages. Empty for pallet row errors."
          },
          "detail": {
            "type": "object",
            "required": [
              "orderNumbers"
            ],
            "properties": {
              "orderNumbers": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Orders that already have pallet rows but were sent without `loadItems`."
              }
            }
          }
        }
      },
      "OrderConfirmation": {
        "type": "object",
        "required": [
          "type",
          "orderNumber",
          "items"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "inbound",
              "outbound"
            ],
            "description": "The type of the order."
          },
          "orderNumber": {
            "type": "string",
            "description": "The unique number of the order."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderConfirmationItem"
            },
            "description": "The items being confirmed as part of the order."
          },
          "isTest": {
            "type": "boolean",
            "description": "Whether this is a test order."
          }
        }
      },
      "OrderConfirmationItem": {
        "type": "object",
        "required": [
          "sku",
          "actualQuantity",
          "unitOfMeasure"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "The SKU of the item."
          },
          "sourceId": {
            "type": "string",
            "description": "The unique ID of the item in the source system. Such as the line number."
          },
          "actualQuantity": {
            "type": "number",
            "description": "The actual quantity of the item."
          },
          "damagedQuantity": {
            "type": "number",
            "description": "The damaged quantity of the item."
          },
          "unitOfMeasure": {
            "type": "string",
            "enum": [
              "each",
              "bottle",
              "bag",
              "pack",
              "case",
              "carton",
              "pallet",
              "skid",
              "roll",
              "pail",
              "tote",
              "kd",
              "poly"
            ],
            "description": "Unit of measure."
          },
          "lotCode": {
            "type": "string",
            "description": "The lot code of the item."
          },
          "expirationDate": {
            "type": "string",
            "description": "The expiration date of the item (for outbound orders only)."
          }
        }
      },
      "ConfirmOrderResponse": {
        "type": "object",
        "required": [
          "confirmedOrderNumbers",
          "errors"
        ],
        "properties": {
          "confirmedOrderNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of order numbers that were successfully confirmed."
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of error messages for orders that failed to be confirmed."
          }
        }
      },
      "InvoiceSubmission": {
        "type": "object",
        "required": [
          "invoiceNumber",
          "loadNumber",
          "total",
          "currencyCode",
          "status",
          "lineItems"
        ],
        "properties": {
          "invoiceNumber": {
            "type": "string",
            "description": "Unique invoice identifier."
          },
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number from the carrier tender webhook. Carriers should use this Owlery load number when submitting invoices."
          },
          "invoicedAt": {
            "type": "string",
            "description": "Invoice date in ISO8601 format."
          },
          "dueAt": {
            "type": "string",
            "description": "Payment due date in ISO8601 format."
          },
          "total": {
            "type": "number",
            "description": "Total amount in cents."
          },
          "currencyCode": {
            "type": "string",
            "enum": [
              "USD",
              "CAD",
              "MXN"
            ],
            "description": "ISO currency code."
          },
          "status": {
            "type": "string",
            "enum": [
              "unpaid",
              "paid"
            ],
            "description": "Invoice status."
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineItem"
            },
            "description": "Invoice line items."
          },
          "parties": {
            "$ref": "#/components/schemas/InvoiceParties"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers."
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional notes."
          },
          "isTest": {
            "type": "boolean",
            "description": "Whether this is a test invoice (default: false)."
          }
        }
      },
      "InvoiceLineItem": {
        "type": "object",
        "required": [
          "category",
          "total",
          "code"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Line item description."
          },
          "category": {
            "type": "string",
            "enum": [
              "lineHaul",
              "fuelSurcharge",
              "detention",
              "lumper",
              "discount",
              "reweigh",
              "californiaComplianceSurcharge",
              "guarantee",
              "other"
            ],
            "description": "Line item category."
          },
          "total": {
            "type": "number",
            "description": "Total price for this line item in cents."
          },
          "code": {
            "type": "string",
            "description": "Carrier-specific code."
          },
          "unitCount": {
            "type": "number",
            "description": "Quantity."
          },
          "unitPrice": {
            "type": "number",
            "description": "Price per unit in cents."
          },
          "unitOfMeasure": {
            "type": "string",
            "enum": [
              "each",
              "bottle",
              "bag",
              "pack",
              "case",
              "carton",
              "pallet",
              "skid",
              "roll",
              "pail",
              "tote",
              "kd",
              "poly"
            ],
            "description": "Unit of measure."
          },
          "weight": {
            "$ref": "#/components/schemas/Weight"
          },
          "class": {
            "type": "string",
            "enum": [
              "50",
              "55",
              "60",
              "65",
              "70",
              "77.5",
              "85",
              "92.5",
              "100",
              "110",
              "125",
              "150",
              "175",
              "200",
              "250",
              "300",
              "400",
              "500"
            ],
            "description": "Freight class."
          }
        }
      },
      "InvoiceParties": {
        "type": "object",
        "properties": {
          "shipper": {
            "$ref": "#/components/schemas/Party"
          },
          "consignees": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Party"
            },
            "description": "Consignee information."
          },
          "billTo": {
            "$ref": "#/components/schemas/BillToParty"
          }
        }
      },
      "Address": {
        "type": "object",
        "required": [
          "street",
          "city",
          "state",
          "zipcode"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state code."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code."
          },
          "countryCode": {
            "type": "string",
            "description": "ISO-3166-1 Alpha-2 country code."
          }
        }
      },
      "Party": {
        "type": "object",
        "required": [
          "name",
          "location"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Party name."
          },
          "location": {
            "$ref": "#/components/schemas/Address"
          }
        }
      },
      "BillToParty": {
        "type": "object",
        "required": [
          "name",
          "location"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Party name."
          },
          "accountId": {
            "type": "string",
            "description": "Account identifier for the bill-to party."
          },
          "location": {
            "$ref": "#/components/schemas/Address"
          }
        }
      },
      "Weight": {
        "type": "object",
        "required": [
          "value",
          "unit"
        ],
        "properties": {
          "value": {
            "type": "number",
            "description": "Weight value."
          },
          "unit": {
            "type": "string",
            "enum": [
              "lb",
              "kg"
            ],
            "description": "Weight unit."
          }
        }
      },
      "InvoiceSubmissionResponse": {
        "type": "object",
        "properties": {
          "createdInvoices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatedInvoice"
            },
            "description": "Successfully created invoices."
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceFailure"
            },
            "description": "Failed invoice submissions."
          }
        }
      },
      "CreatedInvoice": {
        "type": "object",
        "required": [
          "invoiceNumber",
          "id"
        ],
        "properties": {
          "invoiceNumber": {
            "type": "string",
            "description": "Original invoice number."
          },
          "id": {
            "type": "string",
            "description": "Owlery internal ID."
          }
        }
      },
      "InvoiceFailure": {
        "type": "object",
        "required": [
          "invoiceNumber",
          "error"
        ],
        "properties": {
          "invoiceNumber": {
            "type": "string",
            "description": "Failed invoice number."
          },
          "error": {
            "type": "string",
            "description": "Error message."
          }
        }
      },
      "InvoiceWebhook": {
        "type": "object",
        "required": [
          "invoiceNumber",
          "total",
          "currencyCode",
          "status",
          "lineItems"
        ],
        "properties": {
          "invoiceNumber": {
            "type": "string",
            "description": "Unique invoice identifier."
          },
          "loadNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of load numbers associated with this invoice. Can contain multiple loads for consolidated invoices."
          },
          "invoicedAt": {
            "type": "string",
            "description": "Invoice date in ISO8601 format."
          },
          "dueAt": {
            "type": "string",
            "description": "Payment due date in ISO8601 format."
          },
          "total": {
            "type": "number",
            "description": "Total amount in cents."
          },
          "currencyCode": {
            "type": "string",
            "enum": [
              "USD",
              "CAD",
              "MXN"
            ],
            "description": "ISO currency code."
          },
          "status": {
            "type": "string",
            "enum": [
              "unpaid",
              "paid"
            ],
            "description": "Invoice status."
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineItem"
            },
            "description": "Invoice line items."
          },
          "parties": {
            "$ref": "#/components/schemas/InvoiceParties"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers."
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Additional notes."
          }
        }
      },
      "OrderLoadStopDatesUpdatedWebhook": {
        "type": "object",
        "required": [
          "orderNumber",
          "source",
          "stops"
        ],
        "properties": {
          "orderNumber": {
            "type": "string",
            "description": "The unique number of the order."
          },
          "loadNumber": {
            "type": "string",
            "description": "Load number whose stop dates changed."
          },
          "source": {
            "type": "string",
            "description": "The source system the order originates from, such as NetSuite."
          },
          "sourceId": {
            "type": "string",
            "description": "The unique order identifier from the source system."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderLoadStopDatesUpdatedStop"
            },
            "description": "Changed order stops. Stop indexes are zero-based within the order, not within the load."
          }
        }
      },
      "LoadUpdatedWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/LoadViewModel"
          },
          {
            "type": "object",
            "required": [
              "orderNumber",
              "source"
            ],
            "properties": {
              "orderNumber": {
                "type": "string",
                "description": "The associated order's number."
              },
              "source": {
                "type": "string",
                "description": "The source system for the order, such as NetSuite."
              },
              "sourceId": {
                "type": "string",
                "description": "The order identifier in the source system, when available."
              }
            }
          }
        ]
      },
      "OrderLoadStopDatesUpdatedStop": {
        "description": "Dates for an order stop. All date groups are optional; each group may contain startAt, endAt, or both. See Stop Date Types and Partial Dates and Date-Only Values in the webhook description.",
        "type": "object",
        "required": [
          "index",
          "stopType"
        ],
        "properties": {
          "index": {
            "type": "number",
            "description": "Zero-based stop index within the order. For a standard two-stop order, pickup is `0` and dropoff is `1`, even if the underlying load has additional consolidated stops."
          },
          "stopType": {
            "type": "string",
            "enum": [
              "pickup",
              "dropoff"
            ],
            "description": "Type of the order stop."
          },
          "orderDates": {
            "description": "The customer's requested pickup or delivery window. startAt is the beginning of the requested window; endAt is its end. This group and either endpoint may be omitted when unavailable.",
            "allOf": [
              {
                "$ref": "#/components/schemas/StartEndDatePair"
              }
            ]
          },
          "estimatedDates": {
            "description": "The estimated pickup or delivery window. startAt is the beginning of the estimated window; endAt is its end. This group and either endpoint may be omitted when unavailable.",
            "allOf": [
              {
                "$ref": "#/components/schemas/StartEndDatePair"
              }
            ]
          },
          "appointmentDates": {
            "description": "The scheduled appointment window at the facility. startAt is the appointment start; endAt is the appointment end. This group and either endpoint may be omitted when unavailable.",
            "allOf": [
              {
                "$ref": "#/components/schemas/StartEndDatePair"
              }
            ]
          },
          "actualDates": {
            "description": "Recorded times at the stop. startAt is the actual in-time (arrival); endAt is the actual out-time (departure). For a pickup stop, both values indicate the order has been picked up. This group and either endpoint may be omitted. Carrier data can be incomplete even after pickup; apply your business rules when one value is missing.",
            "allOf": [
              {
                "$ref": "#/components/schemas/StartEndDatePair"
              }
            ]
          }
        }
      },
      "StartEndDatePair": {
        "type": "object",
        "properties": {
          "startAt": {
            "description": "Start of the requested, estimated, or appointment window, or the actual in-time (arrival) for actualDates. Optional independently of endAt. The value may represent a date only when isDateOnly is true.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTimeWithZone"
              }
            ]
          },
          "endAt": {
            "description": "End of the requested, estimated, or appointment window, or the actual out-time (departure) for actualDates. Optional independently of startAt. The value may represent a date only when isDateOnly is true.",
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTimeWithZone"
              }
            ]
          }
        }
      },
      "DateTimeWithZone": {
        "type": "object",
        "required": [
          "dateTime",
          "timeZone",
          "isDateOnly"
        ],
        "properties": {
          "dateTime": {
            "type": "string",
            "format": "date-time",
            "description": "ISO8601 timestamp that can use any UTC offset, including Z (UTC), +05:30, or -07:00. The offset does not need to match timeZone. For example, 2026-04-21T08:00:00Z and 2026-04-21T01:00:00-07:00 represent the same instant. Use timeZone to interpret that instant in the stop's local time. When isDateOnly is true, use the calendar date in timeZone and ignore the time of day."
          },
          "timeZone": {
            "type": "string",
            "description": "IANA time zone identifier for the stop."
          },
          "isDateOnly": {
            "type": "boolean",
            "description": "Whether the value should be interpreted as a date without a specific time."
          }
        }
      },
      "TrackingStatus": {
        "type": "object",
        "required": [
          "loadNumber",
          "status",
          "at",
          "location"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number from the carrier tender webhook. Carriers should use this Owlery load number when submitting tracking updates."
          },
          "status": {
            "type": "string",
            "enum": [
              "AppointmentScheduled",
              "DispatchedToPickup",
              "ArrivedAtPickup",
              "LoadingBegin",
              "LoadingCompleted",
              "PickedUp",
              "InTransit",
              "ArrivedAtDropoff",
              "UnloadingBegin",
              "UnloadingCompleted",
              "DroppedOff"
            ],
            "description": "Status of the tracking event. This is the supported carrier-facing status list for the external API. Owlery may add more statuses over time as their external behavior is defined, but unsupported internal statuses are intentionally not accepted here. Owlery reviewed production external tracking API logs for the three months ending June 19, 2026; the omitted internal statuses were not observed on this endpoint during that period."
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "description": "The timestamp when this tracking event occurred or when the status changed (event metadata). This field is always required. For `AppointmentScheduled` status, this is when the appointment was scheduled, NOT the appointment time itself. Send the appointment time in the `appointment` field instead. If `at` equals `appointment.startAt`, Owlery will accept the event but may return a warning."
          },
          "stopIndex": {
            "type": "integer",
            "minimum": 0,
            "description": "The zero-based stop index of the associated status update. Required for stop-specific statuses: AppointmentScheduled, ArrivedAtPickup, LoadingBegin, LoadingCompleted, PickedUp, ArrivedAtDropoff, UnloadingBegin, UnloadingCompleted, and DroppedOff. The index must be a non-negative integer and must refer to an existing stop on the load. For non-stop-specific statuses, omit this."
          },
          "appointment": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AppointmentWindow"
              }
            ],
            "description": "Appointment window for `AppointmentScheduled` events only. Omit this field for all other statuses."
          },
          "location": {
            "$ref": "#/components/schemas/TrackingLocation"
          }
        }
      },
      "AppointmentWindow": {
        "type": "object",
        "required": [
          "startAt"
        ],
        "properties": {
          "startAt": {
            "type": "string",
            "format": "date-time",
            "description": "Start date and time of the appointment window in ISO8601 format. Owlery parses this value into a stored instant. Any offset or `Z` in the timestamp affects the parsed instant, but the appointment display timezone comes from the matched stop location, not from the timestamp offset. When displayed in that stop timezone, daylight saving time is applied according to the timezone rules for the appointment date."
          },
          "endAt": {
            "type": "string",
            "format": "date-time",
            "description": "Optional end date and time of the appointment window in ISO8601 format. Owlery parses this value into a stored instant; any offset or `Z` affects the parsed instant, not the appointment display timezone. When provided, this must be after `startAt`; it cannot be the same timestamp as `startAt`."
          }
        },
        "description": "Appointment window for an `AppointmentScheduled` tracking event. `startAt` is required. `endAt` is optional, but when present it must be later than `startAt`. Owlery converts these ISO8601 values to stored date-time instants and records the matched stop timezone separately for display. The ISO8601 offset is not treated as the display timezone; daylight saving time is applied by the matched stop timezone's rules for the appointment date."
      },
      "TrackingSuccessResponse": {
        "type": "object",
        "required": [
          "success"
        ],
        "properties": {
          "success": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of load numbers that were successfully processed."
          }
        }
      },
      "TrackingPartialResponse": {
        "type": "object",
        "required": [
          "success",
          "missing"
        ],
        "properties": {
          "success": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of load numbers that were successfully processed."
          },
          "missing": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of load numbers that could not be found in the system."
          }
        }
      },
      "LoadSearchRequest": {
        "type": "object",
        "required": [
          "referenceNumbers"
        ],
        "properties": {
          "referenceNumbers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of reference number values to search for."
          }
        }
      },
      "LoadSearchResponse": {
        "type": "object",
        "required": [
          "loads"
        ],
        "properties": {
          "loads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoadViewModel"
            },
            "description": "Array of loads matching the search criteria."
          }
        }
      },
      "LoadViewModel": {
        "type": "object",
        "required": [
          "loadNumber",
          "referenceNumbers",
          "mode",
          "status",
          "stops",
          "brokerProfiles",
          "brokerProfile",
          "palletCount"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "The unique identifier of the load."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers associated with the load."
          },
          "mode": {
            "type": "string",
            "enum": [
              "FTL",
              "LTL",
              "PTL",
              "VLTL",
              "Consolidation",
              "IMDL",
              "STL",
              "CarrierDecides",
              "Unknown"
            ],
            "description": "Mode of transportation."
          },
          "status": {
            "type": "string",
            "description": "Current status of the load."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoadStop"
            },
            "description": "All stops in load route order."
          },
          "brokerProfiles": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BrokerProfile"
            },
            "description": "Deprecated: Use `brokerProfile` instead. Array of brokers associated with the load.",
            "deprecated": true
          },
          "brokerProfile": {
            "$ref": "#/components/schemas/BrokerProfile"
          },
          "carrierProfile": {
            "$ref": "#/components/schemas/CarrierProfile"
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer",
              "Flatbed",
              "Drayage",
              "Tanker",
              "BoxTruck",
              "Bulk"
            ],
            "description": "Equipment type."
          },
          "trackingNumber": {
            "type": "string",
            "description": "Tracking number used for carrier API tracking."
          },
          "palletCount": {
            "type": "number",
            "description": "Total quantity of pallets and skids at pickup stops. Dropoff rows are not counted. Returns 0 when no pallet or skid quantity is recorded."
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Price"
              }
            ],
            "description": "Freight total for the load: a single linked invoice covering only this load, otherwise an active draft invoice, otherwise the latest accepted quote, otherwise the stored load price. Omitted when unavailable, hidden from the caller, or linked invoices cannot be attributed to one load. Explicit zero is preserved. Missing stored currency defaults to USD."
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoadPriceLineItem"
            },
            "description": "Charge breakdown from the same invoice, draft, or quote as price. Empty when no breakdown is recorded or a draft covers multiple loads. Omitted when price is omitted. Amounts are in cents."
          }
        }
      },
      "LoadStop": {
        "type": "object",
        "required": [
          "type",
          "dates",
          "items"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "pickup",
              "dropoff"
            ],
            "description": "Type of stop."
          },
          "dates": {
            "$ref": "#/components/schemas/LoadStopDates"
          },
          "facilityProfile": {
            "$ref": "#/components/schemas/FacilityProfile"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoadStopFreightItem"
            },
            "description": "Freight item rows recorded at this stop. The same freight can appear on both pickup and dropoff rows. Empty when no items are recorded."
          }
        }
      },
      "LoadStopDates": {
        "type": "object",
        "properties": {
          "orderDates": {
            "$ref": "#/components/schemas/LoadStopDateWindow"
          },
          "estimatedDates": {
            "$ref": "#/components/schemas/LoadStopDateWindow"
          },
          "appointmentDates": {
            "$ref": "#/components/schemas/LoadStopDateWindow"
          },
          "actualDates": {
            "$ref": "#/components/schemas/LoadStopDateWindow"
          }
        }
      },
      "LoadStopDateWindow": {
        "type": "object",
        "description": "A stop date window. Either endpoint can be omitted when unavailable.",
        "properties": {
          "startAt": {
            "$ref": "#/components/schemas/TimeStampWithZone"
          },
          "endAt": {
            "$ref": "#/components/schemas/TimeStampWithZone"
          }
        }
      },
      "LoadPriceLineItem": {
        "type": "object",
        "required": [
          "category",
          "total",
          "currencyCode"
        ],
        "properties": {
          "description": {
            "type": "string"
          },
          "category": {
            "type": "string",
            "description": "Normalized Owlery charge category, such as lineHaul or fuelSurcharge."
          },
          "unitCount": {
            "type": "number"
          },
          "unitPrice": {
            "type": "number",
            "description": "Unit price in cents."
          },
          "unitOfMeasure": {
            "type": "string"
          },
          "total": {
            "type": "number",
            "description": "Charge total in cents."
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO 4217 currency code."
          },
          "code": {
            "type": "string",
            "description": "Carrier-specific charge code."
          },
          "stopType": {
            "type": "string",
            "enum": [
              "pickup",
              "dropoff"
            ]
          }
        }
      },
      "LoadStopFreightItem": {
        "type": "object",
        "description": "Freight details recorded at this stop. Optional fields are omitted when unavailable. Weight is normalized to LB or KG; dimensions require all three measurements and a unit.",
        "properties": {
          "quantity": {
            "$ref": "#/components/schemas/Quantity"
          },
          "weight": {
            "$ref": "#/components/schemas/ItemWeight"
          },
          "dimensions": {
            "$ref": "#/components/schemas/Dimensions"
          },
          "description": {
            "type": "string",
            "description": "Item description."
          },
          "class": {
            "type": "string",
            "enum": [
              "50",
              "55",
              "60",
              "65",
              "70",
              "77.5",
              "85",
              "92.5",
              "100",
              "110",
              "125",
              "150",
              "175",
              "200",
              "250",
              "300",
              "400",
              "500"
            ],
            "description": "Freight class."
          },
          "nmfcCode": {
            "type": "string",
            "description": "NMFC code."
          },
          "isStackable": {
            "type": "boolean",
            "description": "Whether the shipment can be stacked."
          },
          "isTurnable": {
            "type": "boolean",
            "description": "Whether the shipment can be turned."
          },
          "cargoValue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Price"
              }
            ],
            "description": "Declared cargo value."
          },
          "contentQuantity": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Quantity"
              }
            ],
            "description": "Quantity of contents within the handling units."
          },
          "hazmatSettings": {
            "type": "object",
            "required": [
              "hazardClass"
            ],
            "properties": {
              "hazardClass": {
                "type": "string",
                "enum": [
                  "unknown"
                ]
              }
            }
          }
        }
      },
      "DateWithTimeZone": {
        "type": "object",
        "required": [
          "startAt",
          "endAt"
        ],
        "properties": {
          "startAt": {
            "$ref": "#/components/schemas/TimeStampWithZone"
          },
          "endAt": {
            "$ref": "#/components/schemas/TimeStampWithZone"
          }
        }
      },
      "TimeStampWithZone": {
        "type": "object",
        "required": [
          "tsInMs",
          "timeZone",
          "isDateOnly"
        ],
        "properties": {
          "tsInMs": {
            "type": "number",
            "description": "Unix timestamp in milliseconds."
          },
          "timeZone": {
            "type": "string",
            "description": "IANA time zone identifier."
          },
          "isDateOnly": {
            "type": "boolean",
            "description": "Whether this represents a date without time."
          }
        }
      },
      "FacilityProfile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the facility."
          },
          "location": {
            "$ref": "#/components/schemas/LoadStopLocation"
          }
        }
      },
      "LoadStopLocation": {
        "type": "object",
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state code."
          },
          "countryCode": {
            "type": "string",
            "description": "ISO-3166-1 Alpha-2 country code."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code."
          },
          "coordinates": {
            "type": "object",
            "required": ["lat", "lng"],
            "properties": {
              "lat": { "type": "number", "description": "Latitude in decimal degrees." },
              "lng": { "type": "number", "description": "Longitude in decimal degrees." }
            }
          }
        }
      },
      "BrokerProfile": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the broker."
          },
          "scac": {
            "type": "string",
            "description": "Mode-specific SCAC code of the broker."
          }
        }
      },
      "CarrierProfile": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the carrier."
          },
          "scac": {
            "type": "string",
            "description": "SCAC code of the carrier."
          }
        }
      },
      "CreateLoadsRequest": {
        "type": "object",
        "required": [
          "loads"
        ],
        "properties": {
          "loads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateLoad"
            },
            "description": "Array of loads to create in a single request. All loads are validated before processing."
          }
        }
      },
      "CreateLoadsResponse": {
        "type": "object",
        "properties": {
          "createdLoads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatedLoadSummary"
            },
            "description": "Loads that passed validation and were persisted."
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateLoadFailure"
            },
            "description": "Validation or processing failures per load number."
          }
        }
      },
      "CreatedLoadSummary": {
        "type": "object",
        "required": [
          "loadNumber"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "The load number that was accepted."
          }
        }
      },
      "CreateLoadFailure": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "The load number that failed validation. May be omitted if the payload lacked a load number."
          },
          "error": {
            "type": "string",
            "description": "Human-readable validation failure description."
          }
        }
      },
      "CreateLoad": {
        "type": "object",
        "required": [
          "loadNumber",
          "status",
          "mode",
          "currencyCode",
          "stops"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Unique load identifier. Must be unique within the request body."
          },
          "status": {
            "type": "string",
            "enum": [
              "Open",
              "InProgress",
              "Delivered",
              "Cancelled"
            ],
            "description": "Source status."
          },
          "mode": {
            "type": "string",
            "enum": [
              "FTL",
              "LTL",
              "PTL",
              "VLTL",
              "IMDL"
            ],
            "description": "Transportation mode."
          },
          "shipmentMode": {
            "type": "string",
            "enum": [
              "Ocean",
              "Air",
              "Truck",
              "Rail"
            ],
            "description": "Shipment mode."
          },
          "driverMode": {
            "type": "string",
            "enum": [
              "Team",
              "Solo"
            ],
            "description": "Driver mode."
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer",
              "Flatbed",
              "Drayage",
              "Tanker"
            ],
            "description": "Equipment type."
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO currency code."
          },
          "priceInCents": {
            "type": "number",
            "description": "Total price in cents."
          },
          "distance": {
            "$ref": "#/components/schemas/Distance"
          },
          "containerSettings": {
            "$ref": "#/components/schemas/ContainerSettings"
          },
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "reeferSettings": {
            "$ref": "#/components/schemas/ReeferSettings"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoadReferenceNumber"
            },
            "description": "Reference numbers at the load level."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateLoadStop"
            },
            "description": "Ordered list of stops (must contain at least one pickup and one dropoff)."
          }
        }
      },
      "CreateLoadStop": {
        "type": "object",
        "required": [
          "index",
          "type",
          "orderDates",
          "facility"
        ],
        "properties": {
          "index": {
            "type": "number",
            "description": "Zero-based stop index."
          },
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Stop type."
          },
          "liveDropType": {
            "type": "string",
            "enum": [
              "Live",
              "Drop"
            ],
            "description": "Live/drop classification. Defaults to `Live` when omitted."
          },
          "timezone": {
            "type": "string",
            "enum": [
              "America/New_York",
              "America/Chicago",
              "America/Denver",
              "America/Phoenix",
              "America/Los_Angeles",
              "America/Anchorage",
              "Pacific/Honolulu"
            ],
            "description": "Stop timezone."
          },
          "orderDates": {
            "type": "string",
            "description": "Planned order date. Must be a valid ISO8601 value; the time component is optional (e.g., `2024-01-01`)."
          },
          "appointmentDates": {
            "type": "string",
            "description": "Appointment date. Must be a valid ISO8601 value; the time component is optional."
          },
          "estimatedDates": {
            "type": "string",
            "description": "Estimated date/time. Must be a valid ISO8601 value; the time component is optional."
          },
          "actualDates": {
            "type": "string",
            "description": "Actual date/time. Must be a valid ISO8601 value; the time component is optional."
          },
          "facility": {
            "$ref": "#/components/schemas/CreateFacility"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreateLoadItem"
            },
            "description": "Items associated with this stop."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LoadReferenceNumber"
            },
            "description": "Stop-level reference numbers."
          }
        }
      },
      "CreateFacility": {
        "type": "object",
        "required": [
          "name",
          "location"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Facility name."
          },
          "location": {
            "$ref": "#/components/schemas/FacilityLocation"
          },
          "lookupCode": {
            "type": "string",
            "description": "Internal lookup code for the facility."
          }
        }
      },
      "FacilityLocation": {
        "type": "object",
        "required": [
          "city",
          "state",
          "zipcode"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state code."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code."
          },
          "countryCode": {
            "type": "string",
            "enum": [
              "US",
              "CA",
              "MX"
            ],
            "description": "ISO-3166-1 Alpha-2 country code. If omitted, the system will automatically infer the country code based on the state code."
          }
        }
      },
      "CreateLoadItem": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Item description."
          },
          "quantity": {
            "$ref": "#/components/schemas/Quantity"
          },
          "weight": {
            "$ref": "#/components/schemas/ItemWeight"
          },
          "dimensions": {
            "$ref": "#/components/schemas/Dimensions"
          },
          "cargoValue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Price"
              }
            ],
            "description": "Declared cargo value."
          },
          "isStackable": {
            "type": "boolean",
            "description": "Whether the shipment can be stacked."
          },
          "isTurnable": {
            "type": "boolean",
            "description": "Whether the shipment can be turned."
          },
          "class": {
            "type": "string",
            "enum": [
              "50",
              "55",
              "60",
              "65",
              "70",
              "77.5",
              "85",
              "92.5",
              "100",
              "110",
              "125",
              "150",
              "175",
              "200",
              "250",
              "300",
              "400",
              "500"
            ],
            "description": "Freight class."
          },
          "nmfcCode": {
            "type": "string",
            "description": "NMFC code."
          }
        }
      },
      "Quantity": {
        "type": "object",
        "required": [
          "count",
          "unit"
        ],
        "properties": {
          "count": {
            "type": "number",
            "description": "Quantity amount."
          },
          "unit": {
            "type": "string",
            "enum": [
              "Each",
              "Bottle",
              "Bag",
              "Pack",
              "Case",
              "Carton",
              "Pallet",
              "Skid",
              "Roll",
              "Pail",
              "Tote"
            ],
            "description": "Quantity unit."
          }
        }
      },
      "ItemWeight": {
        "type": "object",
        "required": [
          "value",
          "unit"
        ],
        "properties": {
          "value": {
            "type": "number",
            "description": "Weight value."
          },
          "unit": {
            "type": "string",
            "enum": [
              "LB",
              "KG"
            ],
            "description": "Weight unit."
          }
        }
      },
      "Dimensions": {
        "type": "object",
        "required": [
          "length",
          "width",
          "height",
          "unit"
        ],
        "properties": {
          "length": {
            "type": "number",
            "description": "Length value."
          },
          "width": {
            "type": "number",
            "description": "Width value."
          },
          "height": {
            "type": "number",
            "description": "Height value."
          },
          "unit": {
            "type": "string",
            "enum": [
              "IN",
              "CM"
            ],
            "description": "Length unit."
          }
        }
      },
      "Distance": {
        "type": "object",
        "required": [
          "value",
          "unit"
        ],
        "properties": {
          "value": {
            "type": "number",
            "description": "Distance value."
          },
          "unit": {
            "type": "string",
            "enum": [
              "MI",
              "KM"
            ],
            "description": "Distance unit."
          }
        }
      },
      "ContainerSettings": {
        "type": "object",
        "required": [
          "containerSizeInFeet"
        ],
        "properties": {
          "containerSizeInFeet": {
            "type": "number",
            "enum": [
              20,
              40,
              48,
              53
            ],
            "description": "Container size in feet."
          }
        }
      },
      "Carrier": {
        "type": "object",
        "description": "Carrier identifiers used to attach an internal carrier profile. At least one of DOT, MC, or SCAC must be provided.",
        "properties": {
          "dotNumber": {
            "type": "string",
            "description": "DOT number."
          },
          "mcNumber": {
            "type": "string",
            "description": "MC number."
          },
          "scac": {
            "type": "string",
            "description": "SCAC code."
          }
        }
      },
      "ReeferSettings": {
        "type": "object",
        "required": [
          "minTemperature",
          "maxTemperature",
          "unit",
          "sentryMode"
        ],
        "properties": {
          "minTemperature": {
            "type": "number",
            "description": "Minimum temperature set point."
          },
          "maxTemperature": {
            "type": "number",
            "description": "Maximum temperature set point."
          },
          "unit": {
            "type": "string",
            "enum": [
              "F",
              "C"
            ],
            "description": "Temperature unit."
          },
          "preCoolTemperature": {
            "type": "number",
            "description": "Optional pre-cool temperature."
          },
          "sentryMode": {
            "type": "string",
            "enum": [
              "Cycle",
              "Continuous"
            ],
            "description": "Reefer sentry mode."
          }
        }
      },
      "LoadReferenceNumber": {
        "type": "object",
        "required": [
          "type",
          "value"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "PO",
              "SO",
              "BOL",
              "MBOL",
              "ProNumber"
            ],
            "description": "Reference number type."
          },
          "value": {
            "type": "string",
            "description": "Reference number value."
          }
        }
      },
      "DocumentSearchResponse": {
        "type": "object",
        "required": [
          "documents",
          "totalCount",
          "page",
          "pageSize"
        ],
        "properties": {
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentViewModel"
            },
            "description": "Matched documents."
          },
          "totalCount": {
            "type": "number",
            "description": "Total number of matching documents."
          },
          "page": {
            "type": "number",
            "description": "0-based page number of the current response."
          },
          "pageSize": {
            "type": "number",
            "description": "Results per page (default: 10, max: 20)."
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message when the search fails."
          }
        }
      },
      "DocumentViewModel": {
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Document metadata ID."
          },
          "name": {
            "type": "string",
            "description": "Display name for the document."
          },
          "size": {
            "type": "number",
            "description": "File size in bytes when available."
          }
        }
      },
      "CreateItemsRequest": {
        "type": "object",
        "required": [
          "items"
        ],
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IngestInventoryItem"
            },
            "description": "Array of inventory items to create or update. Most requests omit variants; include them only when a facility uses an alternate SKU."
          }
        }
      },
      "CreateItemsResponse": {
        "type": "object",
        "properties": {
          "upsertedItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpsertedItemSummary"
            },
            "description": "Top-level items that were successfully created or updated. Nested variant SKUs are not repeated in this array."
          },
          "failures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UpsertItemFailure"
            },
            "description": "Validation or processing failures per top-level or variant SKU. A top-level item may appear in `upsertedItems` even when one of its variants appears here."
          }
        }
      },
      "UpsertedItemSummary": {
        "type": "object",
        "required": [
          "sku"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "The SKU of the item that was created."
          }
        }
      },
      "UpsertItemFailure": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "The SKU of the item that failed. May be omitted if the payload lacked a SKU."
          },
          "error": {
            "type": "string",
            "description": "Human-readable validation failure description."
          }
        }
      },
      "CreateInventoryItem": {
        "type": "object",
        "required": [
          "sku"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "Unique stock keeping unit identifier. When using the Update Item by SKU API, this field will be ignored."
          },
          "name": {
            "type": "string",
            "description": "Name of the item."
          },
          "description": {
            "type": "string",
            "description": "Description of the item."
          },
          "nmfcCode": {
            "type": "string",
            "description": "NMFC (National Motor Freight Classification) code."
          },
          "isStackable": {
            "type": "boolean",
            "description": "Whether the item can be stacked."
          },
          "isTurnable": {
            "type": "boolean",
            "description": "Whether the item can be turned."
          },
          "packaging": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryItemPackaging"
            },
            "description": "Optional packaging information for the parent item. When provided, the hierarchy must include a Pallet level. Nested variants do not accept or inherit packaging."
          },
          "reeferSettings": {
            "$ref": "#/components/schemas/ReeferSettings"
          }
        }
      },
      "IngestInventoryItem": {
        "description": "Inventory item accepted by the bulk ingestion endpoint. Variant fields are optional; omit them to retain standard item ingestion behavior.",
        "allOf": [
          {
            "$ref": "#/components/schemas/CreateInventoryItem"
          },
          {
            "type": "object",
            "properties": {
              "facilityConversions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InventoryItemFacilityConversion"
                },
                "description": "Facility conversions for the top-level SKU itself. Use this when a facility uses the same SKU with a different unit or quantity conversion. A facility can have only one conversion configuration for a given parent item."
              },
              "variants": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InventoryItemVariant"
                },
                "description": "Optional variant SKUs linked to this parent item. Variants are regular inventory items and do not require or inherit packaging."
              }
            }
          }
        ]
      },
      "InventoryItemVariant": {
        "type": "object",
        "required": [
          "sku"
        ],
        "properties": {
          "sku": {
            "type": "string",
            "description": "Unique SKU for the variant. It must differ from the parent item's SKU and cannot already belong to another parent item."
          },
          "facilityConversions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryItemFacilityConversion"
            },
            "description": "Optional facility-specific unit and quantity conversions for this variant."
          }
        }
      },
      "InventoryItemFacilityConversion": {
        "type": "object",
        "required": [
          "companyEmailDomain",
          "quantityUnit"
        ],
        "properties": {
          "companyEmailDomain": {
            "type": "string",
            "description": "Company email domain of a facility visible to the authenticated organization. Values are trimmed and matched case-insensitively. Internal facility organization IDs are not accepted."
          },
          "quantityUnit": {
            "type": "string",
            "enum": [
              "Each",
              "Bottle",
              "Bag",
              "Pack",
              "Tray",
              "Case",
              "Carton",
              "Pallet",
              "Skid",
              "Roll",
              "Pail",
              "Drum",
              "Tote",
              "Kd",
              "Poly"
            ],
            "description": "Unit of measure used by this facility for the top-level or variant SKU."
          },
          "sameUnitConversion": {
            "$ref": "#/components/schemas/InventoryItemSameUnitConversion"
          }
        }
      },
      "InventoryItemSameUnitConversion": {
        "type": "object",
        "required": [
          "from",
          "to"
        ],
        "properties": {
          "from": {
            "type": "integer",
            "minimum": 1,
            "description": "Positive quantity in the original SKU."
          },
          "to": {
            "type": "integer",
            "minimum": 1,
            "description": "Equivalent positive quantity in the facility's SKU."
          }
        },
        "description": "Optional quantity ratio from the original SKU to the facility SKU. For example, `{\"from\": 12, \"to\": 1}` means 12 original units equal 1 facility unit. `from` and `to` must be positive integers and cannot be equal."
      },
      "InventoryItemPackaging": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Each",
              "Bottle",
              "Bag",
              "Pack",
              "Case",
              "Carton",
              "Pallet",
              "Skid",
              "Roll",
              "Pail",
              "Tote",
              "Kd",
              "Poly"
            ],
            "description": "Packaging type."
          },
          "weight": {
            "$ref": "#/components/schemas/ItemWeight"
          },
          "dimensions": {
            "$ref": "#/components/schemas/Dimensions"
          },
          "parentType": {
            "type": "string",
            "enum": [
              "Each",
              "Bottle",
              "Bag",
              "Pack",
              "Case",
              "Carton",
              "Pallet",
              "Skid",
              "Roll",
              "Pail",
              "Tote",
              "Kd",
              "Poly"
            ],
            "description": "The parent packaging type in the hierarchy (e.g., Case is parent of Each)."
          },
          "quantityPerParent": {
            "type": "number",
            "description": "Number of this unit that fit in one parent unit (e.g., 10 Eaches per Case). Required if parentType is provided."
          }
        }
      },
      "CreateRateQuoteFromExistingOrderRequest": {
        "type": "object",
        "properties": {
          "isTest": {
            "type": "boolean",
            "default": false,
            "description": "Set to `true` to create a test quote; omit otherwise. If omitted or explicitly set to `false`, this value is interpreted as `false`. Quotes for orders already marked as test remain test quotes regardless of this value. Test quotes are identified as test requests in carrier webhooks."
          },
          "orderNumber": {
            "type": "string",
            "description": "Order number to quote. Either this or `orderReferenceNumber` is required."
          },
          "orderReferenceNumber": {
            "type": "string",
            "description": "Reference number of the order to quote. Either this or `orderNumber` is required."
          },
          "pickupDates": {
            "$ref": "#/components/schemas/DatePair"
          },
          "pickupFacility": {
            "$ref": "#/components/schemas/CreateFacilityOverride"
          },
          "additionalReferenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Additional reference numbers to attach to the quote."
          },
          "additionalPickupReferenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers to add to the pickup stop."
          },
          "additionalDropoffReferenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers to add to the dropoff stop."
          }
        }
      },
      "CreateRateQuoteFromExistingOrderResponse": {
        "type": "object",
        "required": [
          "shortId"
        ],
        "properties": {
          "shortId": {
            "type": "string",
            "description": "Short human-readable ID for the rate quote."
          }
        }
      },
      "CreateRateQuoteRequest": {
        "type": "object",
        "required": [
          "stops"
        ],
        "properties": {
          "isTest": {
            "type": "boolean",
            "default": false,
            "description": "Set to `true` to create a test quote; omit otherwise. If omitted or explicitly set to `false`, this value is interpreted as `false`. Test quotes are identified as test requests in carrier webhooks."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteStop"
            },
            "description": "Ordered list of stops. Must contain at least one Pickup and one Dropoff."
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer"
            ],
            "description": "Equipment type. Defaults to Dryvan."
          },
          "reeferSettings": {
            "$ref": "#/components/schemas/ReeferSettings"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers at the quote level."
          },
          "externalCustomerReferenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers identifying the external customer associated with the quote."
          }
        }
      },
      "RateQuoteStop": {
        "type": "object",
        "required": [
          "type",
          "facility"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Stop type."
          },
          "facility": {
            "$ref": "#/components/schemas/CreateFacility",
            "description": "Facility information for the stop."
          },
          "dates": {
            "$ref": "#/components/schemas/DatePair"
          },
          "requirements": {
            "$ref": "#/components/schemas/StopRequirements"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteItem"
            },
            "description": "Items being shipped at this stop."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Stop-level reference numbers."
          }
        }
      },
      "StopLocation": {
        "type": "object",
        "required": [
          "city",
          "state",
          "zipcode"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state or province code."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code."
          },
          "countryCode": {
            "type": "string",
            "enum": [
              "US",
              "CA",
              "MX"
            ],
            "description": "ISO-3166-1 Alpha-2 country code."
          }
        }
      },
      "RateQuoteItem": {
        "type": "object",
        "properties": {
          "weight": {
            "$ref": "#/components/schemas/ItemWeight"
          },
          "dimensions": {
            "$ref": "#/components/schemas/ItemDimensions"
          },
          "quantity": {
            "$ref": "#/components/schemas/ItemQuantity"
          },
          "class": {
            "type": "string",
            "enum": [
              "50",
              "55",
              "60",
              "65",
              "70",
              "77.5",
              "85",
              "92.5",
              "100",
              "110",
              "125",
              "150",
              "175",
              "200",
              "250",
              "300",
              "400",
              "500"
            ],
            "description": "Freight class."
          },
          "description": {
            "type": "string",
            "description": "Item description."
          },
          "nmfcCode": {
            "type": "string",
            "description": "NMFC code."
          },
          "isStackable": {
            "type": "boolean",
            "description": "Whether the item can be stacked."
          },
          "isTurnable": {
            "type": "boolean",
            "description": "Whether the item can be turned."
          },
          "cargoValue": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Price"
              }
            ],
            "description": "Declared cargo value."
          }
        }
      },
      "ItemDimensions": {
        "type": "object",
        "required": [
          "length",
          "width",
          "height",
          "unit"
        ],
        "properties": {
          "length": {
            "type": "number",
            "description": "Length value."
          },
          "width": {
            "type": "number",
            "description": "Width value."
          },
          "height": {
            "type": "number",
            "description": "Height value."
          },
          "unit": {
            "type": "string",
            "enum": [
              "IN",
              "CM"
            ],
            "description": "Length unit."
          }
        }
      },
      "ItemQuantity": {
        "type": "object",
        "required": [
          "count",
          "unit"
        ],
        "properties": {
          "count": {
            "type": "number",
            "description": "Quantity amount."
          },
          "unit": {
            "type": "string",
            "enum": [
              "Each",
              "Bottle",
              "Bag",
              "Pack",
              "Case",
              "Carton",
              "Pallet",
              "Skid",
              "Roll",
              "Pail",
              "Tote",
              "Kd",
              "Poly"
            ],
            "description": "Quantity unit."
          }
        }
      },
      "CreateFacilityOverride": {
        "type": "object",
        "properties": {
          "source": {
            "type": "string",
            "description": "Source system identifier."
          },
          "sourceId": {
            "type": "string",
            "description": "Unique ID of the facility in the source system."
          },
          "location": {
            "$ref": "#/components/schemas/StopLocation"
          }
        }
      },
      "RateQuoteCreateResponse": {
        "type": "object",
        "required": [
          "shortId",
          "responses",
          "errors",
          "infoMessages"
        ],
        "properties": {
          "shortId": {
            "type": "string",
            "description": "Short human-readable ID for the rate quote."
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteResponse"
            },
            "description": "Carrier responses received. May be empty if no integrations responded yet."
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Integration-level error messages, if any."
          },
          "infoMessages": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Informational messages from integrations."
          }
        }
      },
      "RateQuote": {
        "type": "object",
        "required": [
          "shortId",
          "stops",
          "responses"
        ],
        "properties": {
          "isTest": {
            "type": "boolean",
            "default": false,
            "description": "Present with value `true` when this is a test quote. If omitted, interpret this value as `false`."
          },
          "shortId": {
            "type": "string",
            "description": "Short human-readable ID for the rate quote."
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer"
            ],
            "description": "Equipment type."
          },
          "reeferSettings": {
            "$ref": "#/components/schemas/ReeferSettings"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Quote-level reference numbers."
          },
          "externalCustomerReferenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers identifying the external customer associated with the quote."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteViewStop"
            },
            "description": "Stops as submitted."
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteResponse"
            },
            "description": "Carrier responses."
          }
        }
      },
      "RateQuoteViewStop": {
        "type": "object",
        "required": [
          "type",
          "location",
          "dates",
          "referenceNumbers",
          "items"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Stop type."
          },
          "location": {
            "$ref": "#/components/schemas/LocationView"
          },
          "facility": {
            "$ref": "#/components/schemas/CreateFacility",
            "description": "Facility details for the stop."
          },
          "dates": {
            "$ref": "#/components/schemas/StopDatesView"
          },
          "requirements": {
            "$ref": "#/components/schemas/StopRequirements"
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Stop-level reference numbers."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteItem"
            },
            "description": "Items at this stop."
          }
        }
      },
      "LocationView": {
        "type": "object",
        "required": [
          "city",
          "state"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City name."
          },
          "state": {
            "type": "string",
            "description": "Two-letter state or province code."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal code."
          },
          "countryCode": {
            "type": "string",
            "description": "ISO-3166-1 Alpha-2 country code."
          }
        }
      },
      "StopDatesView": {
        "type": "object",
        "properties": {
          "orderDates": {
            "$ref": "#/components/schemas/DatePairWithZone"
          },
          "estimatedDates": {
            "$ref": "#/components/schemas/DatePairWithZone"
          },
          "appointmentDates": {
            "$ref": "#/components/schemas/DatePairWithZone"
          },
          "actualDates": {
            "$ref": "#/components/schemas/DatePairWithZone"
          }
        }
      },
      "RateQuoteResponse": {
        "type": "object",
        "required": [
          "responseId",
          "status"
        ],
        "properties": {
          "responseId": {
            "type": "string",
            "description": "Unique ID of this carrier response. Used for tendering."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "tendered",
              "accepted",
              "rejected",
              "cancelled"
            ],
            "description": "Tender status of this response."
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "carrier": {
            "$ref": "#/components/schemas/CarrierProfile"
          },
          "mode": {
            "type": "string",
            "enum": [
              "FTL",
              "LTL",
              "PTL",
              "VLTL",
              "IMDL"
            ],
            "description": "Transportation mode."
          },
          "transitDays": {
            "$ref": "#/components/schemas/TransitDays"
          },
          "expiresAt": {
            "type": "string",
            "description": "ISO8601 date after which this quote is no longer valid."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteResponseStop"
            },
            "description": "Stop-level details returned by the carrier."
          }
        }
      },
      "Price": {
        "type": "object",
        "required": [
          "cents",
          "currencyCode"
        ],
        "properties": {
          "cents": {
            "type": "number",
            "description": "Price in the smallest currency unit (e.g. cents for USD)."
          },
          "currencyCode": {
            "type": "string",
            "description": "ISO 4217 currency code."
          }
        }
      },
      "TransitDays": {
        "type": "object",
        "properties": {
          "min": {
            "type": "number",
            "description": "Minimum estimated transit days."
          },
          "max": {
            "type": "number",
            "description": "Maximum estimated transit days."
          }
        }
      },
      "RateQuoteResponseStop": {
        "type": "object",
        "required": [
          "index",
          "type"
        ],
        "properties": {
          "index": {
            "type": "number",
            "description": "Zero-based stop index."
          },
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Stop type."
          },
          "estimatedDates": {
            "$ref": "#/components/schemas/DatePairWithZone"
          }
        }
      },
      "DatePairWithZone": {
        "type": "object",
        "properties": {
          "startAt": {
            "$ref": "#/components/schemas/DateWithZone"
          },
          "endAt": {
            "$ref": "#/components/schemas/DateWithZone"
          }
        }
      },
      "DateWithZone": {
        "type": "object",
        "required": [
          "epoch",
          "timeZone",
          "isDateOnly"
        ],
        "properties": {
          "epoch": {
            "type": "number",
            "description": "Unix timestamp in milliseconds."
          },
          "timeZone": {
            "type": "string",
            "description": "IANA time zone identifier."
          },
          "isDateOnly": {
            "type": "boolean",
            "description": "Whether this represents a date without a specific time."
          }
        }
      },
      "TenderRequest": {
        "type": "object",
        "required": [
          "rateQuoteResponseId"
        ],
        "properties": {
          "rateQuoteResponseId": {
            "type": "string",
            "description": "The ID of the rate quote response to tender. Obtained from the `responseId` field of a rate quote response."
          }
        }
      },
      "TenderStatusResponse": {
        "type": "object",
        "required": [
          "rateQuoteResponseId",
          "status"
        ],
        "properties": {
          "rateQuoteResponseId": {
            "type": "string",
            "description": "The rate quote response ID that was queried."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "tendered",
              "accepted",
              "rejected",
              "cancelled"
            ],
            "description": "Current tender status."
          },
          "loadNumber": {
            "type": "string",
            "description": "Load number associated with this tender, if a load has been created."
          }
        }
      },
      "CarrierTenderAcceptRequest": {
        "type": "object",
        "required": [
          "loadNumber",
          "revision"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number from the carrier tender or tender edit webhook."
          },
          "revision": {
            "type": "integer",
            "minimum": 0,
            "description": "Tender revision from the carrier tender webhook. The initial tender uses `0`; carriers must echo this value when accepting the tender."
          },
          "proNumber": {
            "type": "string",
            "description": "Carrier PRO number, if available."
          },
          "trackingUrl": {
            "type": "string",
            "description": "Carrier tracking URL, if available."
          }
        }
      },
      "CarrierTenderRejectRequest": {
        "type": "object",
        "required": [
          "loadNumber",
          "revision"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number from the carrier tender or tender edit webhook."
          },
          "revision": {
            "type": "integer",
            "minimum": 0,
            "description": "Tender revision from the carrier tender webhook. The initial tender uses `0`; carriers must echo this value when rejecting the tender."
          }
        }
      },
      "CarrierTenderResponse": {
        "type": "object",
        "required": [
          "loadNumber",
          "revision",
          "status"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number associated with this tender or tender edit."
          },
          "revision": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based tender revision accepted or rejected."
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected"
            ],
            "description": "Updated tender response status."
          }
        }
      },
      "CarrierWebhookAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Configured external account identifier for routing on the carrier side. This is not an Owlery internal organization or shipper profile ID."
          },
          "name": {
            "type": "string",
            "description": "Optional account display name."
          }
        }
      },
      "CarrierWebhookRateQuoteRequest": {
        "type": "object",
        "required": [
          "id",
          "stops"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Carrier-facing Owlery rate quote ID. Return this value as `id` when submitting quote responses to Owlery."
          },
          "isTest": {
            "type": "boolean",
            "default": false,
            "description": "Present with value `true` when this is a test quote. Owlery omits this field otherwise; if omitted or explicitly set to `false`, interpret it as `false`. Carriers should return test/sandbox responses and avoid production booking side effects when true."
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer",
              "Flatbed",
              "Drayage",
              "Tanker"
            ],
            "description": "Requested equipment type."
          },
          "reeferSettings": {
            "$ref": "#/components/schemas/ReeferSettings"
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierWebhookStop"
            },
            "description": "Pickup and dropoff stops for the quote request."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteItem"
            },
            "description": "Quote-level freight items, if not already provided on stops."
          }
        }
      },
      "CarrierRateQuoteResponseBody": {
        "type": "object",
        "required": [
          "id",
          "responses"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Carrier-facing Owlery rate quote ID from the Rate Quote Requested webhook. This value must be returned when submitting quote responses."
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierRateQuoteResponse"
            },
            "description": "Carrier quote responses. Submit as many modes, service options, and prices as possible."
          }
        }
      },
      "CarrierRateQuoteResponse": {
        "type": "object",
        "required": [
          "carrierQuoteId",
          "mode",
          "price"
        ],
        "properties": {
          "carrierQuoteId": {
            "type": "string",
            "description": "Carrier-generated unique ID for this quote. Owlery sends this value back during tender."
          },
          "mode": {
            "type": "string",
            "enum": [
              "FTL",
              "LTL",
              "PTL",
              "VLTL",
              "IMDL"
            ],
            "description": "Transportation mode for this price. Submit separate response objects for different modes, service levels, or prices."
          },
          "price": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Price"
              }
            ],
            "description": "Total all-in price for this quote unless `allInRate` is explicitly false."
          },
          "lineItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierRateQuoteLineItem"
            },
            "description": "Charge breakdown in cents. Discounts should be sent as negative line items."
          },
          "carrier": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CarrierQuoteCarrier"
              }
            ],
            "description": "Carrier details. Required when `mode` is `LTL`; `scac` is required when carrier is provided."
          },
          "interline": {
            "type": "boolean",
            "description": "For LTL responses, whether the service uses an interline carrier.",
            "default": false
          },
          "allInRate": {
            "type": "boolean",
            "description": "Whether `price` is an all-in total. Defaults to true when omitted.",
            "default": true
          },
          "deliveryGuarantee": {
            "$ref": "#/components/schemas/CarrierRateQuoteDeliveryGuarantee"
          },
          "transitDays": {
            "$ref": "#/components/schemas/TransitDays"
          },
          "expiresAt": {
            "type": "string",
            "description": "ISO8601 timestamp after which this quote is no longer valid."
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierRateQuoteResponseStop"
            },
            "description": "Stop-level estimated or appointment dates, if available."
          }
        }
      },
      "CarrierWebhookTenderRequest": {
        "type": "object",
        "required": [
          "carrierQuoteId",
          "loadNumber",
          "revision"
        ],
        "properties": {
          "carrierQuoteId": {
            "type": "string",
            "description": "Carrier quote ID returned when submitting the selected rate quote response."
          },
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number for this tender. Echo this value with revision in the tender accept/reject callback; use it for tracking, invoices, documents, and later load updates."
          },
          "revision": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based tender revision. The original tender is 0. A new tender edit increments the revision; redelivery of the same version retains its revision. Echo this value with loadNumber when accepting or rejecting the tender."
          }
        }
      },
      "CarrierTenderWebhookTender": {
        "type": "object",
        "required": [
          "carrierQuoteId",
          "loadNumber",
          "revision"
        ],
        "properties": {
          "carrierQuoteId": {
            "type": "string",
            "description": "Carrier quote ID returned when submitting the selected rate quote response."
          },
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number for this tender. Echo this value with revision in the tender accept/reject callback; use it for tracking, invoices, documents, and later load updates."
          },
          "revision": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based tender revision. The original tender is 0. A new tender edit increments the revision; redelivery of the same version retains its revision. Echo this value with loadNumber when accepting or rejecting the tender."
          }
        }
      },
      "CarrierWebhookCancelRequest": {
        "type": "object",
        "required": [
          "loadNumber"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number being cancelled."
          },
          "isTest": {
            "type": "boolean",
            "default": false,
            "description": "Present with value `true` when the cancelled tender/load is a test. Owlery omits this field otherwise; if omitted or explicitly set to `false`, interpret it as `false`. Carriers should keep cancellation activity in their test/sandbox flow when true."
          }
        }
      },
      "CarrierWebhookAck": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "details": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CarrierWebhookLocation": {
        "type": "object",
        "required": [
          "zipcode",
          "countryCode"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address, if available."
          },
          "city": {
            "type": "string",
            "description": "City, if available."
          },
          "state": {
            "type": "string",
            "description": "State or province, if available."
          },
          "zipcode": {
            "type": "string",
            "description": "Required postal or ZIP code."
          },
          "countryCode": {
            "type": "string",
            "description": "Required ISO-3166-1 Alpha-2 country code."
          }
        }
      },
      "CarrierWebhookFacility": {
        "type": "object",
        "required": [
          "location"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Facility name, if available."
          },
          "location": {
            "$ref": "#/components/schemas/CarrierWebhookLocation"
          }
        }
      },
      "CarrierWebhookStop": {
        "type": "object",
        "required": [
          "type",
          "facility"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Stop type."
          },
          "liveDropType": {
            "type": "string",
            "enum": [
              "live",
              "drop"
            ],
            "description": "Whether the stop is a live load/unload or a drop trailer stop. Defaults to `live` when omitted.",
            "default": "live"
          },
          "facility": {
            "$ref": "#/components/schemas/CarrierWebhookFacility"
          },
          "dates": {
            "$ref": "#/components/schemas/DatePair"
          },
          "requirements": {
            "$ref": "#/components/schemas/StopRequirements"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteItem"
            },
            "description": "Items being shipped at this stop."
          }
        }
      },
      "CarrierRateQuoteResponseStop": {
        "type": "object",
        "required": [
          "index",
          "type",
          "liveDropType"
        ],
        "properties": {
          "index": {
            "type": "number",
            "description": "Zero-based index of the stop from the rate quote request."
          },
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Stop type from the rate quote request."
          },
          "liveDropType": {
            "type": "string",
            "enum": [
              "live",
              "drop"
            ],
            "description": "Whether the stop is a live load/unload or a drop trailer stop.",
            "default": "live"
          },
          "estimatedDates": {
            "$ref": "#/components/schemas/DatePair"
          },
          "appointmentDates": {
            "$ref": "#/components/schemas/DatePair"
          }
        }
      },
      "CarrierRateQuoteResponsesAccepted": {
        "type": "object",
        "required": [
          "id",
          "accepted"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Carrier-facing Owlery rate quote ID submitted by the carrier."
          },
          "accepted": {
            "type": "number",
            "description": "Number of rate quote response items accepted by Owlery."
          }
        }
      },
      "CarrierQuoteCarrier": {
        "type": "object",
        "required": [
          "scac"
        ],
        "properties": {
          "scac": {
            "type": "string",
            "description": "SCAC code of the carrier."
          },
          "name": {
            "type": "string",
            "description": "Name of the carrier, if available."
          }
        }
      },
      "CarrierRateQuoteLineItem": {
        "type": "object",
        "required": [
          "category",
          "total"
        ],
        "properties": {
          "category": {
            "type": "string",
            "enum": [
              "lineHaul",
              "fuelSurcharge",
              "detention",
              "lumper",
              "discount",
              "reweigh",
              "californiaComplianceSurcharge",
              "guarantee",
              "other"
            ],
            "description": "Line item category."
          },
          "total": {
            "type": "number",
            "description": "Line item amount in cents. Discounts should be sent as negative numbers."
          },
          "code": {
            "type": "string",
            "description": "Carrier-specific charge code, if available."
          }
        }
      },
      "CarrierRateQuoteDeliveryGuarantee": {
        "type": "object",
        "required": [
          "level"
        ],
        "properties": {
          "level": {
            "type": "string",
            "enum": [
              "guaranteed10am",
              "guaranteed12pm",
              "guaranteed5pm"
            ],
            "description": "Guaranteed delivery commitment. Omit this object for standard/non-guaranteed service."
          }
        }
      },
      "CarrierTenderWebhookLocation": {
        "type": "object",
        "required": [
          "street",
          "city",
          "state",
          "zipcode",
          "countryCode"
        ],
        "properties": {
          "street": {
            "type": "string",
            "description": "Street address."
          },
          "city": {
            "type": "string",
            "description": "City."
          },
          "state": {
            "type": "string",
            "description": "State or province."
          },
          "zipcode": {
            "type": "string",
            "description": "Postal or ZIP code."
          },
          "countryCode": {
            "type": "string",
            "description": "ISO-3166-1 Alpha-2 country code."
          }
        }
      },
      "CarrierTenderWebhookFacility": {
        "type": "object",
        "required": [
          "location"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Facility name, if available."
          },
          "location": {
            "$ref": "#/components/schemas/CarrierTenderWebhookLocation"
          }
        }
      },
      "StopRequirements": {
        "type": "object",
        "required": [
          "liftgate",
          "inside",
          "limitedAccess",
          "residential",
          "appointment",
          "tradeshow"
        ],
        "properties": {
          "liftgate": {
            "type": "boolean",
            "description": "Whether liftgate service is required at this stop."
          },
          "inside": {
            "type": "boolean",
            "description": "Whether inside pickup or delivery service is required at this stop."
          },
          "limitedAccess": {
            "type": "boolean",
            "description": "Whether this stop is at a limited-access location."
          },
          "residential": {
            "type": "boolean",
            "description": "Whether this stop is at a residential location."
          },
          "appointment": {
            "type": "boolean",
            "description": "Whether an appointment is required at this stop."
          },
          "tradeshow": {
            "type": "boolean",
            "description": "Whether this stop is at a trade show or convention location."
          }
        },
        "description": "Stop-specific service requirements. When this object is present, every flag is included; `true` means the service or condition applies and `false` means it does not."
      },
      "CarrierTenderWebhookStop": {
        "type": "object",
        "required": [
          "type",
          "facility",
          "referenceNumbers"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "Pickup",
              "Dropoff"
            ],
            "description": "Stop type."
          },
          "liveDropType": {
            "type": "string",
            "enum": [
              "live",
              "drop"
            ],
            "description": "Whether the stop is a live load/unload or a drop trailer stop. Defaults to `live` when omitted.",
            "default": "live"
          },
          "facility": {
            "$ref": "#/components/schemas/CarrierTenderWebhookFacility"
          },
          "dates": {
            "$ref": "#/components/schemas/DatePair"
          },
          "requirements": {
            "$ref": "#/components/schemas/StopRequirements"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteItem"
            },
            "description": "Items being shipped at this stop."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Reference numbers associated with this stop, such as pickup or delivery appointment references. Send an empty array when there are no stop-level reference numbers."
          }
        }
      },
      "CarrierWebhookTenderEditRequest": {
        "type": "object",
        "required": [
          "loadNumber",
          "revision",
          "stops",
          "referenceNumbers"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number for the tender/load being edited. Use this value to identify the shipment and when later referencing tracking, invoices, and documents."
          },
          "isTest": {
            "type": "boolean",
            "default": false,
            "description": "Present with value `true` when this edit belongs to a test tender/load. Owlery omits this field otherwise; if omitted or explicitly set to `false`, interpret it as `false`. Carriers should keep the update in their test/sandbox flow when true."
          },
          "mode": {
            "type": "string",
            "enum": [
              "FTL",
              "LTL",
              "PTL",
              "VLTL",
              "IMDL"
            ]
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer",
              "Flatbed",
              "Drayage",
              "Tanker"
            ]
          },
          "reeferSettings": {
            "$ref": "#/components/schemas/ReeferSettings"
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CarrierTenderWebhookStop"
            },
            "description": "Updated tender/load stops. Treat this as the current full stop list. Each stop includes its own `referenceNumbers` array; send an empty array when there are no stop-level reference numbers. Facility location must include street, city, state, zipcode, and countryCode."
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RateQuoteItem"
            },
            "description": "Updated tender/load freight items, if not already provided on stops."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReferenceNumber"
            },
            "description": "Updated reference numbers associated with this tender/load. Treat this as the current full reference number list. Send an empty array when there are no top-level reference numbers. Carriers should still use Owlery `loadNumber` as the primary identifier for tracking, invoices, documents, and tender responses."
          },
          "revision": {
            "type": "integer",
            "minimum": 0,
            "description": "Zero-based tender revision. The original tender is 0. A new tender edit increments the revision; redelivery of the same version retains its revision. Echo this value with loadNumber when accepting or rejecting the tender."
          }
        }
      },
      "CarrierDocumentType": {
        "type": "string",
        "enum": [
          "bol",
          "pod",
          "invoice",
          "lumper",
          "weight",
          "inspection",
          "overlength",
          "purchaseorder",
          "ratecon",
          "packingList",
          "termsAndConditions",
          "fuelTable",
          "billPaySupport",
          "shippingLabel"
        ],
        "description": "Type of document being submitted. Carriers must provide a known document type."
      },
      "CarrierDocumentSubmitRequest": {
        "type": "object",
        "required": [
          "loadNumber",
          "type",
          "fileName",
          "content"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number from the carrier tender or tender edit webhook. Carriers should use this Owlery load number when submitting documents."
          },
          "type": {
            "$ref": "#/components/schemas/CarrierDocumentType"
          },
          "fileName": {
            "type": "string",
            "description": "Original file name, including extension."
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type of the file, if known. Owlery may infer the MIME type from the file content or file name when omitted.",
            "example": "application/pdf"
          },
          "content": {
            "type": "string",
            "format": "byte",
            "description": "Base64-encoded file content. The decoded file must be 20 MB or smaller."
          }
        }
      },
      "CarrierDocumentSubmitResponse": {
        "type": "object",
        "required": [
          "loadNumber",
          "type",
          "fileName",
          "status"
        ],
        "properties": {
          "loadNumber": {
            "type": "string",
            "description": "Owlery load number associated with the uploaded document."
          },
          "type": {
            "$ref": "#/components/schemas/CarrierDocumentType"
          },
          "fileName": {
            "type": "string",
            "description": "File name accepted by Owlery."
          },
          "status": {
            "type": "string",
            "enum": [
              "uploaded"
            ],
            "description": "Document submission status."
          }
        }
      },
      "QuoteWriteBackWebhookMessage": {
        "type": "object",
        "required": [
          "id",
          "referenceNumbers",
          "mode",
          "equipmentType",
          "isTeamRate",
          "isContractRate",
          "isDirectTender",
          "shipmentMode",
          "stops",
          "orders",
          "price",
          "broker",
          "status",
          "updatedAtInMs",
          "updatedBy",
          "eventId",
          "occurredAt",
          "quote",
          "customerFreightCharges"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Owlery quote response/tender ID. The quote ID is provided separately in quote.id."
          },
          "loadNumber": {
            "type": "string",
            "description": "Load number associated with the tender, when available. For tender events before carrier acceptance, this may be omitted because some carriers only provide the load number on acceptance. If Universal Shipment ID enforcement is enabled for a supported Manual/EDI-style tender, Owlery may send the source tender ID here because that identifier is used as the Owlery load number."
          },
          "referenceNumbers": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "type",
                "value"
              ],
              "properties": {
                "type": {
                  "type": "string",
                  "description": "Reference type, such as PO, SO, BOL, Order or Quote. Existing reference meanings and letter case are preserved."
                },
                "value": {
                  "type": "string",
                  "description": "Reference value."
                }
              }
            },
            "description": "Reference numbers associated with the tender."
          },
          "mode": {
            "type": "string",
            "enum": [
              "FTL",
              "LTL",
              "PTL",
              "VLTL",
              "Consolidation",
              "IMDL",
              "STL",
              "Unknown"
            ],
            "description": "Transportation mode."
          },
          "equipmentType": {
            "type": "string",
            "enum": [
              "Dryvan",
              "Reefer",
              "Flatbed",
              "Drayage",
              "Tanker",
              "BoxTruck"
            ],
            "description": "Equipment type."
          },
          "reeferSettings": {
            "type": "object",
            "required": [
              "unit"
            ],
            "properties": {
              "minTemperature": {
                "type": "number",
                "description": "Minimum temperature set point."
              },
              "maxTemperature": {
                "type": "number",
                "description": "Maximum temperature set point."
              },
              "unit": {
                "type": "string",
                "enum": [
                  "F",
                  "C"
                ],
                "description": "Temperature unit."
              },
              "preCoolTemperature": {
                "type": "number",
                "description": "Optional pre-cool temperature."
              },
              "sentryMode": {
                "type": "string",
                "enum": [
                  "Cycle",
                  "Continuous"
                ],
                "description": "Reefer sentry mode."
              }
            }
          },
          "isTeamRate": {
            "type": "boolean",
            "description": "Whether this is a team driver rate."
          },
          "isContractRate": {
            "type": "boolean",
            "description": "Whether this is a contract rate from a rate on file."
          },
          "isDirectTender": {
            "type": "boolean",
            "description": "Whether this is a direct tender."
          },
          "shipmentMode": {
            "type": "string",
            "enum": [
              "Ocean",
              "Air",
              "Truck",
              "Rail"
            ],
            "description": "Shipment mode."
          },
          "stops": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "index",
                "type",
                "orders"
              ],
              "properties": {
                "index": {
                  "type": "number",
                  "description": "Zero-based stop index from the rate quote route."
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "pickup",
                    "dropoff"
                  ],
                  "description": "Type of stop."
                },
                "orders": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TenderWebhookOrder"
                  },
                  "description": "Order numbers associated with this stop."
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "weight": {
                        "type": "object",
                        "required": [
                          "value",
                          "unit"
                        ],
                        "properties": {
                          "value": {
                            "type": "number"
                          },
                          "unit": {
                            "type": "string",
                            "description": "Owlery weight unit code, such as lb, kg, oz or metricTon."
                          }
                        }
                      },
                      "dimensions": {
                        "type": "object",
                        "required": [
                          "length",
                          "width",
                          "height",
                          "unit"
                        ],
                        "properties": {
                          "length": {
                            "type": "number"
                          },
                          "width": {
                            "type": "number"
                          },
                          "height": {
                            "type": "number"
                          },
                          "unit": {
                            "type": "string",
                            "enum": [
                              "in",
                              "cm"
                            ],
                            "description": "Length unit."
                          }
                        }
                      },
                      "quantity": {
                        "type": "object",
                        "required": [
                          "count",
                          "unit"
                        ],
                        "properties": {
                          "count": {
                            "type": "number"
                          },
                          "unit": {
                            "type": "string",
                            "description": "Owlery quantity unit code, such as pallet, case or each."
                          }
                        }
                      },
                      "class": {
                        "type": "string",
                        "description": "Owlery freight class code, such as CLASS_50 or CLASS_77_5."
                      },
                      "description": {
                        "type": "string",
                        "description": "Item description."
                      },
                      "nmfcCode": {
                        "type": "string",
                        "description": "NMFC code."
                      },
                      "isStackable": {
                        "type": "boolean",
                        "description": "Whether the item can be stacked."
                      },
                      "isTurnable": {
                        "type": "boolean",
                        "description": "Whether the item can be turned."
                      },
                      "cargoValue": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/Price"
                          }
                        ],
                        "description": "Declared cargo value."
                      },
                      "contentQuantity": {
                        "$ref": "#/components/schemas/QuoteWriteBackWebhookMessage/properties/stops/items/properties/items/items/properties/quantity"
                      },
                      "orderItems": {
                        "type": "array",
                        "description": "Shipment line items retained from the quote, including their Owlery order/item IDs and source identifiers when available.",
                        "items": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string"
                            },
                            "inventoryItemId": {
                              "type": "string"
                            },
                            "orderId": {
                              "type": "string"
                            },
                            "sourceId": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "bolItems": {
                        "$ref": "#/components/schemas/QuoteWriteBackWebhookMessage/properties/stops/items/properties/items/items/properties/orderItems"
                      },
                      "sourceOrderLoadItemId": {
                        "type": "string",
                        "description": "Owlery order pallet row ID, when quoted from an order pallet row."
                      }
                    },
                    "description": "Freight item from the quote stop. Existing shipment item and reference information is retained."
                  },
                  "description": "Freight items associated with this stop."
                },
                "dates": {
                  "type": "object",
                  "properties": {
                    "orderDates": {
                      "type": "object",
                      "properties": {
                        "startAt": {
                          "type": "object",
                          "required": [
                            "tsInMs",
                            "timeZone"
                          ],
                          "properties": {
                            "tsInMs": {
                              "type": "number",
                              "description": "Unix timestamp in milliseconds."
                            },
                            "timeZone": {
                              "type": "string",
                              "description": "IANA time zone identifier."
                            },
                            "isDateOnly": {
                              "type": "boolean",
                              "description": "Whether this represents a date without a specific time."
                            }
                          }
                        },
                        "endAt": {
                          "$ref": "#/components/schemas/QuoteWriteBackWebhookMessage/properties/stops/items/properties/dates/properties/orderDates/properties/startAt"
                        }
                      }
                    },
                    "estimatedDates": {
                      "$ref": "#/components/schemas/QuoteWriteBackWebhookMessage/properties/stops/items/properties/dates/properties/orderDates"
                    },
                    "appointmentDates": {
                      "$ref": "#/components/schemas/QuoteWriteBackWebhookMessage/properties/stops/items/properties/dates/properties/orderDates"
                    },
                    "actualDates": {
                      "$ref": "#/components/schemas/QuoteWriteBackWebhookMessage/properties/stops/items/properties/dates/properties/orderDates"
                    }
                  }
                },
                "facilityProfile": {
                  "$ref": "#/components/schemas/FacilityProfileViewModel"
                }
              }
            },
            "description": "Array of tender stops with zero-based route index, facility/date information, freight items, and associated order numbers."
          },
          "orders": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "orderNumber"
              ],
              "properties": {
                "orderNumber": {
                  "type": "string",
                  "description": "Order number associated with the tender."
                },
                "pickupStopIndex": {
                  "type": "number",
                  "description": "Zero-based index of the route stop where this order is picked up."
                },
                "dropoffStopIndex": {
                  "type": "number",
                  "description": "Zero-based index of the route stop where this order is dropped off."
                },
                "pickupSequenceNumber": {
                  "type": "number",
                  "description": "Zero-based sequence of the pickup stop among pickup stops only."
                },
                "dropoffSequenceNumber": {
                  "type": "number",
                  "description": "Zero-based sequence of the dropoff stop among dropoff stops only."
                },
                "dropOffStopIndex": {
                  "type": "number",
                  "deprecated": true,
                  "description": "Deprecated alias of dropoffStopIndex, retained for compatibility."
                }
              }
            },
            "description": "Eligible parent-order mapping to pickup/dropoff route stops and zero-based stop-type sequence numbers. Uses the same order eligibility as freight recording."
          },
          "price": {
            "type": "object",
            "description": "Awarded carrier quote price, distinct from customer freight charges.",
            "required": [
              "total",
              "currencyCode"
            ],
            "properties": {
              "total": {
                "type": "number",
                "description": "Awarded carrier cost in cents."
              },
              "currencyCode": {
                "type": "string",
                "description": "Currency code, such as USD."
              }
            }
          },
          "lineItems": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "category",
                "total",
                "code"
              ],
              "properties": {
                "description": {
                  "type": "string",
                  "description": "Description of the charge."
                },
                "category": {
                  "type": "string",
                  "description": "Owlery normalized charge code, such as lineHaul, fuelSurcharge or liftgate."
                },
                "total": {
                  "type": "number",
                  "description": "Total amount in cents."
                },
                "code": {
                  "type": "string",
                  "description": "Owlery quote line item ID."
                },
                "unitCount": {
                  "type": "number",
                  "description": "Quantity."
                },
                "unitPrice": {
                  "type": "number",
                  "description": "Price per unit in cents."
                }
              }
            },
            "description": "Breakdown of charges."
          },
          "broker": {
            "type": "object",
            "required": [
              "name"
            ],
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the carrier/broker."
              },
              "address": {
                "$ref": "#/components/schemas/LocationViewModel"
              },
              "phone": {
                "type": "string",
                "description": "Phone number in E.164 format."
              },
              "email": {
                "type": "string",
                "description": "Email address."
              },
              "mcNumber": {
                "type": "string",
                "description": "MC number."
              },
              "dotNumber": {
                "type": "string",
                "description": "DOT number."
              },
              "scac": {
                "type": "string",
                "description": "SCAC code."
              }
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "bolCreated",
              "carrierSelected",
              "tendered",
              "accepted"
            ],
            "description": "Tender status."
          },
          "updatedAtInMs": {
            "type": "number",
            "description": "Unix timestamp in milliseconds when the tender status was updated."
          },
          "updatedBy": {
            "type": "string",
            "description": "Owlery user ID of the quote creator."
          },
          "eventId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique event ID. Every manual confirmation creates a new event, including unchanged pricing. Multiple endpoints receive the same event ID. Retries and resends keep the same ID and payload."
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "description": "Time this write-back event was created, distinct from the tender status timestamp."
          },
          "quote": {
            "type": "object",
            "required": [
              "id"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Owlery quote ID."
              },
              "shortId": {
                "type": "string",
                "description": "Owlery quote number, when available."
              }
            }
          },
          "customerFreightCharges": {
            "type": "array",
            "description": "Recorded customer freight charges on eligible parent orders from the shared freight-recording context. Child orders are excluded. Amounts are in cents. Orders without a recorded charge are omitted; this array may be empty. Zero is a recorded amount. When a Quote Write-back webhook is configured, clearing an amount in Record Freight Cost records zero. Omitted amounts preserve existing charges.",
            "items": {
              "type": "object",
              "required": [
                "sourceNumber",
                "orderId",
                "orderNumber",
                "price"
              ],
              "properties": {
                "sourceNumber": {
                  "type": "string",
                  "description": "ERP source order number, mapped from Owlery orderNumber. For BCI this is the imported SyteLine Shipment ID, not a customer order reference or sourceId."
                },
                "orderId": {
                  "type": "string",
                  "description": "Owlery parent order ID."
                },
                "orderNumber": {
                  "type": "string",
                  "description": "Owlery parent order number; currently the same value as sourceNumber."
                },
                "price": {
                  "type": "object",
                  "required": [
                    "total",
                    "currencyCode"
                  ],
                  "properties": {
                    "total": {
                      "type": "number",
                      "description": "Recorded customer freight charge in cents."
                    },
                    "currencyCode": {
                      "type": "string",
                      "description": "Currency code, such as USD."
                    }
                  }
                }
              }
            }
          },
          "linkedLoad": {
            "type": "object",
            "description": "The load linked to this quote booking. Omitted when no load exists. The Tender loadNumber keeps its original meaning and may be present without linkedLoad.",
            "required": [
              "id",
              "number"
            ],
            "properties": {
              "id": {
                "type": "string",
                "minLength": 24,
                "maxLength": 24,
                "description": "Full Owlery load ID (24 characters). Never truncated to fit an external field."
              },
              "number": {
                "type": "string",
                "description": "Actual linked load number."
              },
              "trackingUrl": {
                "type": "string",
                "format": "uri",
                "description": "Public Owlery tracking URL. Omitted when the load has no tracking ID."
              }
            }
          }
        },
        "description": "Quote Write-back event containing the complete Tender payload and recorded customer freight charges. Field names and meanings match the outbound JSON."
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Shipper",
      "tags": [
        "shipper-overview",
        "shipper-plan",
        "shipper-loads",
        "shipper-documents",
        "shipper-items",
        "shipper-rate-quote",
        "shipper-tender",
        "shipper-webhooks"
      ]
    },
    {
      "name": "Carrier",
      "tags": [
        "carrier-overview",
        "carrier-invoices",
        "carrier-loads",
        "carrier-tracking",
        "carrier-documents",
        "carrier-rate-quotes",
        "carrier-tender-responses",
        "carrier-webhooks"
      ]
    },
    {
      "name": "Facility",
      "tags": [
        "facility-overview",
        "facility-orders"
      ]
    }
  ]
}
