{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wearewarp-com/main/json-schema/wearewarp-com-multi-stops-booking-body-schema.json",
  "title": "MultiStopsBookingBody",
  "x-generated": "2026-10-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/wearewarp-com-freight-openapi.json#/components/schemas/MultiStopsBookingBody",
  "type": "object",
  "required": [
    "quoteId",
    "shipments"
  ],
  "properties": {
    "quoteId": {
      "type": "string",
      "description": "Quote ID from a previous multi-stops quote request"
    },
    "shipments": {
      "type": "array",
      "description": "List of shipment legs (min 2, max 19). Each shipment has its own pickup and delivery with stopIndex.",
      "minItems": 2,
      "maxItems": 19,
      "items": {
        "$ref": "#/$defs/MultiStopsShipmentInput"
      }
    },
    "shipmentType": {
      "type": "string",
      "enum": [
        "FTL"
      ],
      "default": "FTL",
      "description": "Shipment type. Only FTL is accepted; any other value is rejected with 400."
    },
    "vehicleType": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "DRY_VAN_53",
            "STRAIGHT_TRUCK_26",
            "CARGO_VAN"
          ]
        },
        "options": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "$defs": {
    "AdditionalService": {
      "type": "object",
      "required": [
        "quantity",
        "service"
      ],
      "properties": {
        "quantity": {
          "type": "number"
        },
        "service": {
          "type": "string",
          "description": "Addtional service options",
          "enum": [
            "photo-required",
            "sort-n-seg",
            "extra-stop",
            "extra-miles",
            "driver-assist",
            "notify",
            "check_calls",
            "otp_late_fee",
            "otd_late_fee",
            "carrier_otp",
            "carrier_otd",
            "tonu",
            "miscellaneous",
            "deduction",
            "racket_straps",
            "trailer_rental",
            "storage",
            "cross_dock_charge",
            "drop_loaded_equipment",
            "drop_and_hook",
            "drop_equipment",
            "reweigh_reclass",
            "insurance",
            "chassis_rental"
          ]
        }
      }
    },
    "Address": {
      "type": "object",
      "required": [
        "street",
        "city",
        "state",
        "zipcode"
      ],
      "properties": {
        "street2": {
          "type": "string"
        },
        "street": {
          "type": "string"
        },
        "city": {
          "type": "string"
        },
        "state": {
          "type": "string"
        },
        "zipcode": {
          "type": "string"
        }
      }
    },
    "BookShipmentItem": {
      "type": "object",
      "required": [
        "height",
        "length",
        "width",
        "sizeUnit",
        "totalWeight",
        "weightUnit",
        "quantity"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "height": {
          "type": "number",
          "description": "Maximum 108 on POST /freights/booking; maximum 85 on POST /freights/freight-quote, /freights/book and the multi-stops endpoints (checked on the raw value, whatever the sizeUnit)."
        },
        "length": {
          "type": "number"
        },
        "width": {
          "type": "number"
        },
        "sizeUnit": {
          "type": "string",
          "enum": [
            "IN",
            "FT"
          ]
        },
        "totalWeight": {
          "type": "number"
        },
        "weightUnit": {
          "type": "string",
          "enum": [
            "lbs",
            "kgs"
          ]
        },
        "quantity": {
          "type": "integer",
          "format": "int32"
        },
        "packaging": {
          "type": "string",
          "description": "Packaging unit of the line item (e.g. Pallet). Defaults to Pallet.",
          "default": "Pallet"
        },
        "temperature_limit": {
          "type": "object",
          "description": "Temperature-controlled (reefer) freight is NOT supported yet by the quote endpoints: POST /freights/quote rejects any non-zero min/max and POST /freights/freight-quote rejects the field entirely with 400 `Reefer Shipment is not supported yet!`. Omit this field unless instructed otherwise by WARP.",
          "properties": {
            "min": {
              "type": "number",
              "description": "Minimum temperature."
            },
            "max": {
              "type": "number",
              "description": "Maximum temperature."
            }
          }
        },
        "stackable": {
          "type": "boolean"
        },
        "notes": {
          "type": "string"
        },
        "freightClass": {
          "type": "string",
          "description": "NMFC freight class of the line item (e.g. 70)."
        },
        "barcodes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    },
    "DeliveryService": {
      "type": "object",
      "required": [
        "quantity",
        "service"
      ],
      "properties": {
        "quantity": {
          "type": "number"
        },
        "service": {
          "type": "string",
          "description": "Delivery service options",
          "enum": [
            "photo-required-delivery",
            "liftgate-delivery",
            "convention-trade-show-delivery",
            "inside-delivery",
            "limited-access-delivery",
            "residential-delivery",
            "construction-site-delivery",
            "delivery-appointment",
            "delivery-layover",
            "lumper",
            "detention-receiver",
            "redelivery",
            "drop-loaded",
            "driver-assist-delivery",
            "drop-and-hook-delivery",
            "inside-delivery-upstairs-mezzanine-trash-removal",
            "inside-delivery-back-side-of-the-house",
            "inside-delivery-living-space-garage"
          ]
        }
      }
    },
    "MultiStopsShipmentInput": {
      "type": "object",
      "required": [
        "pickupInfo",
        "deliveryInfo",
        "listItems"
      ],
      "properties": {
        "pickupInfo": {
          "$ref": "#/$defs/MultiStopsStopInfo"
        },
        "deliveryInfo": {
          "$ref": "#/$defs/MultiStopsStopInfo"
        },
        "listItems": {
          "type": "array",
          "description": "1 to 100 items. Bounds: height 0.1-85, length 0.1-636, width 0.1-102, quantity 1-9999, totalWeight 0.01-80000.",
          "minItems": 1,
          "maxItems": 100,
          "items": {
            "$ref": "#/$defs/BookShipmentItem"
          }
        },
        "pickupServices": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "$ref": "#/$defs/PickupService"
          }
        },
        "deliveryServices": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "$ref": "#/$defs/DeliveryService"
          }
        },
        "additionalServices": {
          "type": "array",
          "maxItems": 20,
          "items": {
            "$ref": "#/$defs/AdditionalService"
          }
        }
      }
    },
    "MultiStopsStopInfo": {
      "type": "object",
      "required": [
        "stopIndex",
        "address",
        "windowTime"
      ],
      "properties": {
        "stopIndex": {
          "type": "integer",
          "description": "Relative order of this stop in the route (0-999). Same value = same physical stop.",
          "minimum": 0,
          "maximum": 999
        },
        "locationName": {
          "type": "string"
        },
        "contactName": {
          "type": "string"
        },
        "contactPhone": {
          "type": "string"
        },
        "phoneExtension": {
          "type": "string"
        },
        "contactEmail": {
          "type": "string"
        },
        "address": {
          "$ref": "#/$defs/Address"
        },
        "requiresAppointment": {
          "type": "boolean"
        },
        "appointmentInfo": {
          "$ref": "#/$defs/TimeWindow"
        },
        "windowTime": {
          "$ref": "#/$defs/TimeWindow"
        },
        "instructions": {
          "type": "string"
        },
        "refNum": {
          "type": "string"
        }
      }
    },
    "PickupService": {
      "type": "object",
      "required": [
        "quantity",
        "service"
      ],
      "properties": {
        "quantity": {
          "type": "number"
        },
        "service": {
          "type": "string",
          "description": "Pickup service options",
          "enum": [
            "photo-required-pickup",
            "liftgate-pickup",
            "convention-trade-show-pickup",
            "inside-pickup",
            "limited-access-pickup",
            "residential-pickup",
            "construction-site-pickup",
            "pickup-appointment",
            "pickup-layover",
            "detention-shipper",
            "drop-empty",
            "driver-assist-pickup",
            "drop-and-hook-pickup",
            "inside-pickup-upstairs-mezzanine-trash-removal",
            "inside-pickup-back-side-of-the-house",
            "inside-pickup-living-space-garage"
          ]
        }
      }
    },
    "TimeWindow": {
      "type": "object",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "from": {
          "type": "string",
          "format": "date-time",
          "description": "Starting time of the window in ISO format"
        },
        "to": {
          "type": "string",
          "format": "date-time",
          "description": "Ending time of the window in ISO format"
        }
      }
    }
  }
}