{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/wearewarp-com/main/json-schema/wearewarp-com-freight-quote-body-schema.json",
  "title": "FreightQuoteBody",
  "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/FreightQuoteBody",
  "type": "object",
  "required": [
    "pickupDate",
    "pickupInfo",
    "deliveryInfo",
    "items"
  ],
  "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"
        },
        "serviceOptions": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "Delivery 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"
            ]
          }
        }
      }
    },
    "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"
        },
        "serviceOptions": {
          "type": "array",
          "items": {
            "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"
            ]
          }
        }
      }
    },
    "additionalServices": {
      "type": "array",
      "items": {
        "type": "string",
        "description": "Delivery 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"
        ]
      }
    },
    "items": {
      "type": "array",
      "minItems": 1,
      "description": "Line items. `barcodes` is ignored by this endpoint; `temperature_limit` is rejected (reefer not supported yet).",
      "items": {
        "$ref": "#/$defs/BookShipmentItem"
      }
    },
    "shipmentType": {
      "type": "string",
      "enum": [
        "LTL",
        "FTL",
        "PARCEL"
      ],
      "default": "LTL",
      "description": "Selects the quote sources: FTL is priced by WARP only; LTL (default) by WARP and the partner LTL carriers; PARCEL by FedEx only (every parcel service level is returned as a separate option). PARCEL items must respect the FedEx limits per package: weight per package (totalWeight / quantity) <= 150 lbs, longest side <= 108 in, length + girth <= 165 in; dimensions, weight and quantity must be > 0."
    },
    "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": {
        "insuredValue": {
          "type": "number",
          "description": "The declared value of the goods to be insured (in USD)."
        },
        "commodity": {
          "type": "string",
          "description": "A description of the commodity being shipped."
        }
      }
    }
  },
  "$defs": {
    "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"
          }
        }
      }
    },
    "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.)"
        }
      }
    }
  }
}