{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wearewarp-com/main/json-schema/wearewarp-com-quote-body-schema.json",
  "title": "QuoteBody",
  "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/QuoteBody",
  "type": "object",
  "required": [
    "pickupDate",
    "pickupInfo",
    "deliveryInfo",
    "listItems"
  ],
  "properties": {
    "pickupDate": {
      "type": "string",
      "format": "date",
      "description": "The earliest pickup date in YYYY-MM-DD format, in the timezone of the pickup stop."
    },
    "pickupInfo": {
      "type": "object",
      "required": [
        "zipcode"
      ],
      "properties": {
        "zipcode": {
          "type": "string"
        },
        "country": {
          "type": "string",
          "description": "Country code (ISO 3166-1 alpha-2). Supported: US, CA. Defaults to US.",
          "enum": [
            "US",
            "CA"
          ],
          "default": "US"
        }
      }
    },
    "deliveryInfo": {
      "type": "object",
      "required": [
        "zipcode"
      ],
      "properties": {
        "zipcode": {
          "type": "string"
        },
        "country": {
          "type": "string",
          "description": "Country code (ISO 3166-1 alpha-2). Supported: US, CA. Defaults to US.",
          "enum": [
            "US",
            "CA"
          ],
          "default": "US"
        }
      }
    },
    "pickupServices": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PickupService"
      }
    },
    "deliveryServices": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DeliveryService"
      }
    },
    "additionalServices": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AdditionalService"
      }
    },
    "listItems": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BookShipmentItem"
      }
    },
    "shipmentType": {
      "type": "string",
      "enum": [
        "LTL",
        "FTL",
        "PARCEL"
      ],
      "description": "The type of shipment (optional, defaults to LTL when omitted). PARCEL returns a single FedEx rate; use /freights/freight-quote to compare every parcel service level. PARCEL items are checked against the FedEx limits per package: weight per package (totalWeight / quantity) <= 150 lbs, longest side <= 108 in, length + girth (longest side + 2 x (the other two sides)) <= 165 in; dimensions, weight and quantity must all be > 0. PARCEL accepts `listItems[]` (or `items[]`).",
      "default": "LTL"
    },
    "vehicleType": {
      "$ref": "#/$defs/VehicleType"
    },
    "insuranceInfo": {
      "type": "object",
      "description": "Optional. Provide to receive an insurance quote alongside the freight quote. Both fields are required to get an insurance quote; if omitted or incomplete, the insurance block is skipped.",
      "properties": {
        "commodity": {
          "type": "string",
          "description": "A description of the commodity being shipped."
        },
        "insuredValue": {
          "type": "number",
          "description": "The declared value of the goods to be insured (in USD)."
        }
      }
    }
  },
  "$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"
          ]
        }
      }
    },
    "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"
          ]
        }
      }
    },
    "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"
          ]
        }
      }
    },
    "VehicleType": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "DRY_VAN_53",
            "STRAIGHT_TRUCK_26",
            "CARGO_VAN"
          ],
          "description": "The type of vehicle (optional. If not provided, the system will automatically select the best vehicle type based on the shipment type and the items.)"
        }
      }
    }
  }
}