{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/bitfreighter/json-schema/bitfreighter-custom-pricing-engine-request-schema.json",
  "title": "CustomPricingEngineRequest",
  "description": "Defines the necessary information to request a rate for a shipment.",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/bitfreighter-openapi.yml#/components/schemas/CustomPricingEngineRequest",
  "properties": {
    "accessorials": {
      "description": "An array of additional services requested for the shipment",
      "items": {
        "additionalProperties": false,
        "description": "Additional services requested for the shipment",
        "enum": [
          "drydraught",
          "hazardous",
          "hotshot",
          "insurance",
          "liftgate",
          "lowboy",
          "pallet jack",
          "plated trailer",
          "safe transport of food",
          "stepdeck",
          "straps",
          "tanker endorsement",
          "tarps",
          "team drivers",
          "conestoga",
          "hotshot",
          "curtainside",
          "expedited",
          "premium",
          "pick or drop trailer"
        ],
        "title": "Accessorials",
        "type": "string"
      },
      "type": "array"
    },
    "available_equipment_types": {
      "description": "The full list of requested equipment types that are acceptable for this shipment",
      "items": {
        "description": "An equipment type used to deliver a shipment",
        "enum": [
          "van",
          "reefer",
          "flatbed"
        ],
        "title": "EquipmentType",
        "type": "string"
      },
      "type": "array"
    },
    "buy_it_now_price": {
      "description": "A price provided by the shipper that can be accepted immediately. If the final quote generated by Bitfreighter is lower than this price, Bitfreighter will automatically accept this load on your behalf.",
      "type": [
        "number",
        "null"
      ]
    },
    "cargo_value": {
      "description": "The cargo value of the shipment in USD.",
      "type": [
        "number",
        "null"
      ]
    },
    "comments": {
      "description": "Comments from the integration. If available, this could be provided either as freeform text, or a stringified JSON object.",
      "type": [
        "string",
        "null"
      ]
    },
    "equipment": {
      "description": "The selected equipment type Bitfreighter has determined based off the incoming request and your settings.\n\nThis will be null only when \"Send non-standard equipment types?\" is on in your Custom Pricing Engine settings and Bitfreighter was not able to determine a standard equipment type.\nIn this situation see \"raw_equipment_types\" for the list of non-standard equipment and supply \"updated_equipment_type\" in the response.\n",
      "enum": [
        "van",
        "reefer",
        "flatbed"
      ],
      "title": "EquipmentType",
      "type": [
        "string",
        "null"
      ]
    },
    "mode": {
      "description": "The transportation mode requested for the shipment",
      "enum": [
        "truckload",
        "ltl",
        "airfreight",
        "rail"
      ],
      "type": "string"
    },
    "quote_id": {
      "description": "The ID for this quote in Bitfreighter",
      "type": "string"
    },
    "raw_equipment_types": {
      "description": "  The list of non-standard equipment types as per the integration. These are not restricted to the standard equipment types.\n",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "shipper": {
      "description": "Information on the shipper",
      "properties": {
        "identifier": {
          "description": "unique identifier for the shipper",
          "type": "string"
        },
        "profile_name": {
          "description": "This is the name of the shipper profile this request is associated to.",
          "type": "string"
        }
      },
      "required": [
        "identifier",
        "profile_name"
      ],
      "type": "object"
    },
    "stops": {
      "description": "An array of stops for the shipment",
      "items": {
        "description": "Stop information for a real time rating request",
        "properties": {
          "location": {
            "properties": {
              "address": {
                "description": "The address of the stop",
                "nullable": false,
                "properties": {
                  "city": {
                    "description": "Free-form text for city name",
                    "maxLength": 255,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "country": {
                    "description": "Code identifying the country",
                    "enum": [
                      "US",
                      "CA",
                      "MX",
                      "IN",
                      "USA",
                      "CAN",
                      "MEX",
                      "IND"
                    ],
                    "title": "NACountry2or3",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line1": {
                    "description": "FlexAddress Line 1",
                    "maxLength": 255,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "line2": {
                    "description": "FlexAddress Line 2",
                    "maxLength": 255,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "postal_code": {
                    "description": "Code specifying international postal zone code excluding punctuation and blanks (zip code for United States)",
                    "maxLength": 15,
                    "minLength": 3,
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "state": {
                    "description": "Code specifying the Standard State/Province as defined by appropriate government agency. 2 chars for US/Canada (ISO 3166-2:US/CA), 3 chars for Mexico (ISO 3166-2:MX).",
                    "maxLength": 3,
                    "minLength": 2,
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "postal_code",
                  "country",
                  "city",
                  "state"
                ],
                "title": "FlexAddress",
                "type": "object"
              },
              "latitude": {
                "description": "The latitude of the address",
                "type": [
                  "number",
                  "null"
                ]
              },
              "longitude": {
                "description": "The longitude of the address",
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "address"
            ],
            "type": "object"
          },
          "notes": {
            "description": "Notes for this stop. Maybe be freeform text or a stringified json object",
            "type": [
              "string",
              "null"
            ]
          },
          "reason": {
            "description": "The type of stop",
            "enum": [
              "load",
              "unload",
              "pick_trailer",
              "drop_trailer"
            ],
            "type": [
              "string",
              "null"
            ]
          },
          "scheduled_at": {
            "description": "Date/Time as ISO8601 formatted string. This should be in UTC time. This is required for the first stop.",
            "format": "date-time",
            "title": "DateTime",
            "type": [
              "string",
              "null"
            ]
          },
          "sequence_number": {
            "description": "Identifying number for the specific stop and the sequence in which the stop is to be performed",
            "maximum": 999,
            "minimum": 1,
            "title": "SequenceNumber",
            "type": "integer"
          }
        },
        "required": [
          "sequence_number",
          "location"
        ],
        "title": "RateRequestStop",
        "type": "object"
      },
      "type": "array"
    },
    "total_distance": {
      "description": "The total distance of the shipment",
      "properties": {
        "unit_of_measure": {
          "description": "The unit of measure for the distance",
          "enum": [
            "mi",
            "ki"
          ],
          "type": "string"
        },
        "value": {
          "description": "The total distance of the shipment",
          "type": "number"
        }
      },
      "required": [
        "value",
        "unit_of_measure"
      ],
      "type": "object"
    },
    "total_volume": {
      "description": "The total volume of the shipment",
      "properties": {
        "unit_of_measure": {
          "description": "The unit of measure for the volume",
          "enum": [
            "cubic_feet",
            "cubic_meters"
          ],
          "type": "string"
        },
        "value": {
          "description": "The total volume of the shipment",
          "type": "number"
        }
      },
      "required": [
        "value",
        "unit_of_measure"
      ],
      "type": [
        "object",
        "null"
      ]
    },
    "total_weight": {
      "description": "The total weight of the shipment",
      "properties": {
        "unit_of_measure": {
          "description": "The unit of measure for the weight",
          "enum": [
            "lbs",
            "kg"
          ],
          "type": "string"
        },
        "value": {
          "description": "The total weight of the shipment",
          "type": "number"
        }
      },
      "required": [
        "value",
        "unit_of_measure"
      ],
      "type": [
        "object",
        "null"
      ]
    }
  },
  "required": [
    "quote_id",
    "stops",
    "mode",
    "equipment",
    "shipper"
  ],
  "type": "object"
}