{
  "openapi": "3.0.0",
  "info": {
    "title": "Freight API",
    "description": "API specification for LTL/FTL freight integrations.\n\nNote: date and time formats must adhere to [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6) as component parts of ISO 8601.",
    "version": "1.0.0",
    "contact": {
      "name": "."
    }
  },
  "paths": {
    "/connect-freight-carrier": {
      "post": {
        "summary": "Connect Freight Carrier",
        "description": "Connect a freight carrier account. This is used to supply the appropriate credentials required for connecting to a freight carrier as identified by the SCAC.\n\nOptionally the `auth` property may be supplied in the request which can be used by an integration to update the credentials for an existing freight carrier connection.",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectFreightCarrierRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectFreightCarrierResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "520": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            },
            "description": "External Server Error"
          }
        },
        "operationId": "connect-freight-carrier",
        "tags": [
          "Carrier Accounts"
        ]
      },
      "parameters": []
    },
    "/freight-quote": {
      "post": {
        "summary": "Freight Quote",
        "description": "Obtain a price quote for a freight shipment using contractual rates.",
        "operationId": "freight-quote",
        "parameters": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreightQuoteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreightQuoteResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "520": {
            "description": "External Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "tags": [
          "Quotes"
        ]
      },
      "parameters": []
    },
    "/freight-spot-quote": {
      "post": {
        "summary": "Freight Spot Quote",
        "tags": [
          "Quotes"
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreightSpotQuoteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "520": {
            "description": "External Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "freight-spot-quote",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreightSpotQuoteRequest"
              }
            }
          }
        },
        "description": "Obtain a spot price quote for a freight shipment. Spot quotes are typically discounted rates based on excess carrier capacity vs contractual rates. The carrier will return the service level they are able to offer as opposed to specifying the desired service level in the request.\n\nNote: in terms of user workflow for spot quotes, the expectation is that the quote ID coming back from the carrier is included on the BOL they provide the carrier at the time of pickup, allowing the carrier to match the shipment to the original quote and invoice it correctly. Additionally, as spot quotes can expire, if the quote has expired at the time of pickup a new spot quote should be created to include in the BOL.",
        "parameters": []
      }
    },
    "/schedule-freight-pickup": {
      "post": {
        "summary": "Schedule Freight Pickup",
        "description": "Schedule a freight pickup / dispatch. In response the carrier will supply a confirmation number and possibly a PRO number as well. If a confirmation number is not returned but the request succeeded the user will need to follow up with the carrier directly to ensure that they received the request. If a PRO number is not returned then one will be assigned by the carrier at the time of pickup. Additionally some carriers might not support specifying a delivery date for pickup requests. If that is the case the user will again need to coordinate that directly with the carrier.\n\nPickup requests differ from quotes in that they require more specificity in terms of addresses and shipment details. The accessorials supplied in a pickup request pertain to the pickup itself - lift gate, etc... The quote is where the shipment-related accessorials are specified - i.e. what is required to transport and deliver the shipment.\n\nIn order to send test pickup requests you can set `carrier.test = true`, however if a carrier does not support that functionality it is up to the integration app to handle that flag appropriately by returning an error to the user explaining it's not supported instead of scheduling a pickup with the carrier.",
        "operationId": "schedule-freight-pickup",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScheduleFreightPickupResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "520": {
            "description": "External Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScheduleFreightPickupRequest"
              }
            }
          }
        },
        "tags": [
          "Pickup"
        ]
      },
      "parameters": []
    },
    "/freight-shipment-documents": {
      "post": {
        "summary": "Freight Shipment Documents",
        "description": "Retrieve the freight shipment documents associated with a PRO number. By default this request will return all available document types. You can optionally specify a `document_type` value in order to download a particular kind of document.",
        "operationId": "freight-shipment-documents",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FreightShipmentDocumentsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "520": {
            "description": "External Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FreightShipmentDocumentsRequest"
              }
            }
          },
          "description": ""
        },
        "parameters": [],
        "tags": [
          "Documents"
        ]
      },
      "parameters": []
    },
    "/track-freight-shipment": {
      "post": {
        "tags": [
          "Tracking"
        ],
        "summary": "Track Freight Shipment",
        "description": "Get the status of a freight shipment via the assigned PRO number.",
        "parameters": [],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TrackFreightShipmentResponse"
                }
              }
            },
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "520": {
            "description": "External Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        },
        "operationId": "track-freight-shipment",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TrackFreightShipmentRequest"
              }
            }
          },
          "description": ""
        }
      },
      "parameters": []
    }
  },
  "components": {
    "schemas": {
      "AccessorialService": {
        "description": "Accessorial services are services offered by a carrier in addition to transportation services, such as hazardous materials handling, residential pickup or delivery, collecting payment at delivery, etc... Each carrier offers a unique set of services, represented primarily by a service code. In some cases additional data will be required such as the emergency contact for hazardous materials handling in which case that can be supplied via the `attributes` object. Please refer to the registry for more information about the attributes supported per accessorial service for a given carrier defined as a JSON Schema.",
        "title": "AccessorialService",
        "type": "object",
        "x-examples": {
          "Hazardous Materials": {
            "code": "HAZ",
            "metadata": {
              "emergency_contact": {
                "name": "John Smith",
                "phone": "555-5555"
              }
            }
          }
        },
        "properties": {
          "code": {
            "type": "string"
          },
          "attributes": {
            "type": "object",
            "description": "Optional attributes as required by the carrier for the accessorial service"
          }
        },
        "required": [
          "code"
        ]
      },
      "Address": {
        "description": "",
        "type": "object",
        "title": "Address",
        "properties": {
          "company_name": {
            "type": "string",
            "description": "The name of the company associated with this address."
          },
          "address_lines": {
            "type": "array",
            "description": "The address lines of the shipment address.",
            "items": {
              "type": "string"
            }
          },
          "city_locality": {
            "type": "string",
            "description": "The city or locality of the shipment address, where applicable."
          },
          "state_province": {
            "type": "string",
            "description": "The state or province of the shipment address, where applicable."
          },
          "postal_code": {
            "type": "string",
            "description": "The postal code of the shipment address."
          },
          "country_code": {
            "type": "string",
            "description": "The two character country code of the shipment address. The codes are specified by ISO 3166-1 alpha-2."
          },
          "residential": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "company_name",
          "address_lines",
          "city_locality",
          "state_province",
          "postal_code",
          "country_code"
        ]
      },
      "BaseRequest": {
        "title": "BaseRequest",
        "type": "object",
        "properties": {
          "transaction_id": {
            "type": "string"
          },
          "scac": {
            "type": "string",
            "description": "The NMFTA Standard Carrier Alpha Code is used to identify a freight carrier within the transportation industry."
          },
          "auth": {
            "type": "object",
            "description": "The carrier authorization information needed to fulfill this request."
          }
        },
        "required": [
          "transaction_id",
          "scac"
        ]
      },
      "BaseResponse": {
        "title": "BaseResponse",
        "type": "object",
        "properties": {
          "transaction_id": {
            "type": "string"
          },
          "scac": {
            "type": "string",
            "description": "The NMFTA Standard Carrier Alpha Code is used to identify a freight carrier within the transportation industry."
          }
        },
        "required": [
          "transaction_id",
          "scac"
        ]
      },
      "Contact": {
        "type": "object",
        "title": "Contact",
        "properties": {
          "name": {
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          },
          "email": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "phone_number",
          "email"
        ]
      },
      "ConnectFreightCarrierRequest": {
        "title": "ConnectFreightCarrierRequest",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseRequest"
          },
          {
            "type": "object",
            "properties": {
              "credentials": {
                "type": "object",
                "description": "The credentials as required by the carrier. Refer to the integrations registry for the credentials schema supported for each carrier."
              }
            },
            "required": [
              "credentials"
            ]
          }
        ]
      },
      "ConnectFreightCarrierResponse": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "properties": {
              "auth": {
                "type": "object",
                "description": "Use this object to return any information needed to authorize requests to the carrier on behalf of the user - access tokens, etc... All future requests for this connection will include the data returned here."
              }
            }
          }
        ],
        "title": "ConnectFreightCarrierResponse"
      },
      "Dimensions": {
        "title": "Dimensions",
        "type": "object",
        "properties": {
          "width": {
            "type": "number"
          },
          "height": {
            "type": "number"
          },
          "length": {
            "type": "number"
          },
          "unit": {
            "$ref": "#/components/schemas/DimensionUnitType"
          }
        },
        "required": [
          "width",
          "height",
          "length",
          "unit"
        ]
      },
      "DimensionUnitType": {
        "type": "string",
        "title": "DimensionUnitType",
        "enum": [
          "inches",
          "centimeters"
        ]
      },
      "Density": {
        "title": "Density",
        "type": "object",
        "properties": {
          "value": {
            "type": "number"
          },
          "unit": {
            "$ref": "#/components/schemas/DensityUnitType"
          }
        },
        "required": [
          "value",
          "unit"
        ]
      },
      "DensityUnitType": {
        "type": "string",
        "title": "DensityUnitType",
        "enum": [
          "lb/ft³"
        ]
      },
      "DocumentType": {
        "type": "string",
        "title": "DocumentType",
        "enum": [
          "bill_of_lading",
          "delivery_receipt",
          "invoice",
          "weight_inspection_certificate"
        ]
      },
      "ErrorResponse": {
        "title": "ErrorResponse",
        "type": "object",
        "properties": {
          "transaction_id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "detailed_errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "external_error_code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                },
                "external_http_status_code": {
                  "type": "string"
                },
                "raw_external_context": {
                  "type": "string"
                },
                "standardized_error_code": {
                  "type": "string",
                  "enum": [
                    "generic",
                    "validation",
                    "external_unauthorized_error",
                    "external_server_error",
                    "external_client_error"
                  ]
                }
              }
            }
          },
          "retry_after_seconds": {
            "type": "number"
          },
          "retry_after_time": {
            "type": "string"
          },
          "throttling_context": {
            "type": "object"
          }
        },
        "required": [
          "transaction_id"
        ]
      },
      "FreightQuoteRequest": {
        "title": "FreightQuoteRequest",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseRequest"
          },
          {
            "type": "object",
            "properties": {
              "service_level": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  }
                }
              },
              "pickup": {
                "type": "object",
                "required": [
                  "date"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date Format: YYYY-MM-DD"
                  }
                }
              },
              "containers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "Container",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The container/packaging code for this container"
                    },
                    "freight_class": {
                      "type": "number",
                      "description": "NMFC freight class",
                      "enum": [
                        50,
                        55,
                        60,
                        65,
                        70,
                        77.5,
                        85,
                        92.5,
                        100,
                        110,
                        125,
                        150,
                        175,
                        200,
                        250,
                        300,
                        400,
                        500
                      ]
                    },
                    "density": {
                      "$ref": "#/components/schemas/Density"
                    },
                    "nmfc_code": {
                      "description": "NMFC commodity code / item number",
                      "type": "string"
                    },
                    "description": {
                      "type": "string",
                      "description": "The description of the item(s) in this container",
                      "example": "Windows"
                    },
                    "dimensions": {
                      "$ref": "#/components/schemas/Dimensions"
                    },
                    "weight": {
                      "$ref": "#/components/schemas/Weight"
                    },
                    "quantity": {
                      "type": "number",
                      "description": ""
                    },
                    "stackable": {
                      "type": "boolean",
                      "description": ""
                    },
                    "hazardous_materials": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "freight_class",
                    "description",
                    "weight"
                  ]
                }
              },
              "shipment_measurements": {
                "type": "object",
                "description": "The dimensions and weight consumed by the shipment once loaded in the trailer",
                "properties": {
                  "total_linear_length": {
                    "type": "object",
                    "description": "The total linear length of the shipment as it will be loaded into the trailer, calculated based on the length of an individual container, factoring in whether containers can be stacked and/or fit widthwise in the trailer",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/DimensionUnitType"
                      }
                    },
                    "required": [
                      "value",
                      "unit"
                    ]
                  },
                  "total_width": {
                    "type": "object",
                    "description": "The total width of the shipment configuration as it will be loaded into the trailer",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/DimensionUnitType"
                      }
                    },
                    "required": [
                      "value",
                      "unit"
                    ]
                  },
                  "total_height": {
                    "type": "object",
                    "description": "The total height of the shipment configuration as it will be loaded into the trailer",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/DimensionUnitType"
                      }
                    },
                    "required": [
                      "value",
                      "unit"
                    ]
                  },
                  "total_weight": {
                    "type": "object",
                    "description": "The total weight of the shipment configuration as it will be loaded into the trailer",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/WeightUnitType"
                      }
                    },
                    "required": [
                      "value",
                      "unit"
                    ]
                  }
                }
              },
              "accessorials": {
                "type": "array",
                "description": "Accessorial services required for delivery",
                "items": {
                  "$ref": "#/components/schemas/AccessorialService"
                }
              },
              "ship_from": {
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "account": {
                    "type": "string",
                    "description": "Shipper's carrier account number"
                  },
                  "address": {
                    "$ref": "#/components/schemas/QuoteAddress"
                  }
                }
              },
              "ship_to": {
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "account": {
                    "type": "string",
                    "description": "Consignee's carrier account number"
                  },
                  "address": {
                    "$ref": "#/components/schemas/QuoteAddress"
                  }
                }
              },
              "bill_to": {
                "type": "object",
                "title": "BillingParty",
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "consignee",
                      "shipper",
                      "third_party"
                    ]
                  },
                  "payment_terms": {
                    "type": "string",
                    "enum": [
                      "collect",
                      "prepaid",
                      "third_party"
                    ]
                  },
                  "account": {
                    "type": "string",
                    "description": "The carrier account number used to determine the pricing agreement."
                  },
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  },
                  "contact": {
                    "$ref": "#/components/schemas/Contact"
                  }
                },
                "required": [
                  "type",
                  "payment_terms",
                  "account",
                  "address",
                  "contact"
                ]
              },
              "requested_by": {
                "$ref": "#/components/schemas/RequestingParty"
              }
            },
            "required": [
              "service_level",
              "pickup",
              "containers",
              "ship_from",
              "ship_to",
              "bill_to",
              "requested_by"
            ]
          }
        ]
      },
      "FreightQuoteResponse": {
        "title": "FreightQuoteResponse",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "properties": {
              "service_level": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "description": ""
                  },
                  "carrier_description": {
                    "type": "string"
                  }
                }
              }
            }
          },
          {
            "$ref": "#/components/schemas/Quote"
          }
        ]
      },
      "FreightShipmentDocumentsRequest": {
        "title": "FreightShipmentDocumentsRequest",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseRequest"
          },
          {
            "type": "object",
            "properties": {
              "pro_number": {
                "type": "string"
              },
              "document_type": {
                "$ref": "#/components/schemas/DocumentType"
              }
            },
            "required": [
              "pro_number"
            ]
          }
        ],
        "description": "Retrieve the freight documents associated with a PRO Number. By default this request will return all available document types. You can optionally specify a `document_type` value in order to download a particular kind of document."
      },
      "FreightShipmentDocumentsResponse": {
        "title": "FreightShipmentDocumentsResponse",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "properties": {
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "$ref": "#/components/schemas/DocumentType"
                    },
                    "image": {
                      "type": "string",
                      "description": "Base64-encoded image of the document"
                    },
                    "format": {
                      "type": "string",
                      "title": "DocumentFormat",
                      "enum": [
                        "pdf"
                      ]
                    }
                  },
                  "required": [
                    "type",
                    "image",
                    "format"
                  ]
                }
              }
            },
            "required": [
              "documents"
            ]
          }
        ]
      },
      "FreightSpotQuoteRequest": {
        "title": "FreightSpotQuoteRequest",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseRequest"
          },
          {
            "type": "object",
            "properties": {
              "pickup": {
                "type": "object",
                "required": [
                  "date"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date Format: YYYY-MM-DD"
                  }
                }
              },
              "containers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "Container",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The container/packaging code for this container"
                    },
                    "freight_class": {
                      "type": "number",
                      "description": "NMFC freight class",
                      "enum": [
                        50,
                        55,
                        60,
                        65,
                        70,
                        77.5,
                        85,
                        92.5,
                        100,
                        110,
                        125,
                        150,
                        175,
                        200,
                        250,
                        300,
                        400,
                        500
                      ]
                    },
                    "density": {
                      "$ref": "#/components/schemas/Density"
                    },
                    "nmfc_code": {
                      "description": "NMFC commodity code / item number",
                      "type": "string"
                    },
                    "description": {
                      "type": "string",
                      "description": "The description of the item(s) in this container",
                      "example": "Windows"
                    },
                    "dimensions": {
                      "$ref": "#/components/schemas/Dimensions"
                    },
                    "weight": {
                      "$ref": "#/components/schemas/Weight"
                    },
                    "quantity": {
                      "type": "number",
                      "description": ""
                    },
                    "stackable": {
                      "type": "boolean",
                      "description": ""
                    },
                    "hazardous_materials": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "code",
                    "freight_class",
                    "description",
                    "dimensions",
                    "weight",
                    "quantity",
                    "stackable",
                    "hazardous_materials"
                  ]
                }
              },
              "shipment_measurements": {
                "type": "object",
                "description": "The dimensions and weight consumed by the shipment once loaded in the trailer",
                "required": [
                  "total_linear_length",
                  "total_weight"
                ],
                "properties": {
                  "total_linear_length": {
                    "type": "object",
                    "description": "The total linear length of the shipment as it will be loaded into the trailer, calculated based on the length of an individual container, factoring in whether containers can be stacked and/or fit widthwise in the trailer",
                    "required": [
                      "value",
                      "unit"
                    ],
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/DimensionUnitType"
                      }
                    }
                  },
                  "total_width": {
                    "type": "object",
                    "description": "The total width of the shipment configuration as it will be loaded into the trailer",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/DimensionUnitType"
                      }
                    },
                    "required": [
                      "value",
                      "unit"
                    ]
                  },
                  "total_height": {
                    "type": "object",
                    "description": "The total height of the shipment configuration as it will be loaded into the trailer",
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/DimensionUnitType"
                      }
                    },
                    "required": [
                      "value",
                      "unit"
                    ]
                  },
                  "total_weight": {
                    "type": "object",
                    "description": "The total weight of the shipment configuration as it will be loaded into the trailer",
                    "required": [
                      "value",
                      "unit"
                    ],
                    "properties": {
                      "value": {
                        "type": "number"
                      },
                      "unit": {
                        "$ref": "#/components/schemas/WeightUnitType"
                      }
                    }
                  }
                }
              },
              "accessorials": {
                "type": "array",
                "description": "Accessorial services required for delivery",
                "items": {
                  "$ref": "#/components/schemas/AccessorialService"
                }
              },
              "ship_from": {
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "account": {
                    "type": "string",
                    "description": "Shipper's carrier account number"
                  },
                  "address": {
                    "$ref": "#/components/schemas/QuoteAddress"
                  }
                }
              },
              "ship_to": {
                "type": "object",
                "required": [
                  "address"
                ],
                "properties": {
                  "account": {
                    "type": "string",
                    "description": "Consignee's carrier account number"
                  },
                  "address": {
                    "$ref": "#/components/schemas/QuoteAddress"
                  }
                }
              },
              "bill_to": {
                "type": "object",
                "title": "BillingParty",
                "required": [
                  "type",
                  "payment_terms",
                  "contact"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "consignee",
                      "shipper",
                      "third_party"
                    ]
                  },
                  "payment_terms": {
                    "type": "string",
                    "enum": [
                      "collect",
                      "prepaid",
                      "third_party"
                    ]
                  },
                  "account": {
                    "type": "string",
                    "description": "The carrier account number used to determine the pricing agreement."
                  },
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  },
                  "contact": {
                    "$ref": "#/components/schemas/Contact"
                  }
                }
              },
              "requested_by": {
                "$ref": "#/components/schemas/RequestingParty"
              }
            },
            "required": [
              "pickup",
              "containers",
              "shipment_measurements",
              "ship_from",
              "ship_to",
              "bill_to",
              "requested_by"
            ]
          }
        ]
      },
      "FreightSpotQuoteResponse": {
        "title": "FreightSpotQuoteResponse",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "properties": {
              "results": {
                "type": "array",
                "items": {
                  "allOf": [
                    {
                      "type": "object",
                      "properties": {
                        "service_level": {
                          "type": "object",
                          "description": "Spot/volume service level returned by the carrier. These service levels are often different than standard service levels so only the description provided by the carrier is returned.",
                          "properties": {
                            "carrier_description": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    {
                      "$ref": "#/components/schemas/Quote"
                    }
                  ]
                }
              }
            },
            "required": [
              "results"
            ]
          }
        ]
      },
      "Money": {
        "type": "object",
        "title": "Money",
        "description": "Represents a monetary value.",
        "properties": {
          "value": {
            "type": "string",
            "description": "The amount of this value. Represented as a string to avoid floating point rounding issues. You must parse this string into a type appropriate for financial and monetary calculations."
          },
          "currency": {
            "type": "string",
            "description": "The currency of this value. Will be a three letter currency code defined by https://www.iban.com/currency-codes.html."
          }
        },
        "required": [
          "value",
          "currency"
        ]
      },
      "Quote": {
        "title": "Quote",
        "type": "object",
        "properties": {
          "quote": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "effective": {
                "type": "object",
                "description": "Quote effective information if supported by the carrier",
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date Format: YYYY-MM-DD"
                  }
                }
              },
              "expiration": {
                "type": "object",
                "description": "Quote expiration information if supported by the carrier",
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date Format: YYYY-MM-DD"
                  }
                }
              },
              "carrier_message": {
                "type": "string",
                "description": "Optional message supplied by the carrier about the quote"
              }
            },
            "required": [
              "id"
            ]
          },
          "pickup": {
            "type": "object",
            "properties": {
              "date": {
                "type": "string",
                "format": "date",
                "description": "Date Format: YYYY-MM-DD"
              }
            },
            "required": [
              "date"
            ]
          },
          "delivery": {
            "type": "object",
            "properties": {
              "estimated": {
                "type": "object",
                "properties": {
                  "days": {
                    "type": "number"
                  }
                }
              }
            },
            "required": [
              "estimated"
            ]
          },
          "charges": {
            "type": "array",
            "items": {
              "type": "object",
              "title": "Charge",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "total",
                    "discount",
                    "accessorial",
                    "container",
                    "uncategorized"
                  ]
                },
                "description": {
                  "type": "string",
                  "example": "Lift gate required at delivery"
                },
                "amount": {
                  "$ref": "#/components/schemas/Money"
                }
              },
              "required": [
                "type",
                "amount"
              ]
            }
          },
          "warnings": {
            "type": "array",
            "description": "Optional warnings returned by the carrier for this quote.",
            "items": {
              "type": "object",
              "properties": {
                "external_code": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        },
        "required": [
          "charges"
        ]
      },
      "QuoteAddress": {
        "description": "",
        "type": "object",
        "title": "QuoteAddress",
        "properties": {
          "company_name": {
            "type": "string",
            "description": "The name of the company associated with this address."
          },
          "address_lines": {
            "type": "array",
            "description": "The address lines of the shipment address.",
            "items": {
              "type": "string"
            }
          },
          "city_locality": {
            "type": "string",
            "description": "The city or locality of the shipment address, where applicable."
          },
          "state_province": {
            "type": "string",
            "description": "The state or province of the shipment address, where applicable."
          },
          "postal_code": {
            "type": "string",
            "description": "The postal code of the shipment address."
          },
          "country_code": {
            "type": "string",
            "description": "The two character country code of the shipment address. The codes are specified by ISO 3166-1 alpha-2."
          },
          "residential": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "city_locality",
          "state_province",
          "postal_code",
          "country_code"
        ]
      },
      "RequestingParty": {
        "title": "RequestingParty",
        "type": "object",
        "properties": {
          "company_name": {
            "type": "string"
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          }
        },
        "required": [
          "company_name",
          "contact"
        ]
      },
      "ScheduleFreightPickupRequest": {
        "title": "ScheduleFreightPickupRequest",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseRequest"
          },
          {
            "type": "object",
            "properties": {
              "service_level": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "Service level for the pickup/dispatch request"
                  }
                }
              },
              "pickup": {
                "type": "object",
                "required": [
                  "date",
                  "earliest_time",
                  "latest_time",
                  "closing_time"
                ],
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date Format: YYYY-MM-DD"
                  },
                  "earliest_time": {
                    "type": "string",
                    "format": "time",
                    "description": "24 Hour Format: HH:MM:SS, HH:MM:SSZ, HH:MM:SS+/-HH:MM"
                  },
                  "latest_time": {
                    "type": "string",
                    "format": "time",
                    "description": "24 Hour Format: HH:MM:SS, HH:MM:SSZ, HH:MM:SS+/-HH:MM"
                  },
                  "closing_time": {
                    "type": "string",
                    "format": "time",
                    "description": "24 Hour Format: HH:MM:SS, HH:MM:SSZ, HH:MM:SS+/-HH:MM"
                  }
                }
              },
              "delivery": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date Format: YYYY-MM-DD"
                  }
                },
                "required": [
                  "date"
                ]
              },
              "containers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "title": "Container",
                  "properties": {
                    "code": {
                      "type": "string",
                      "description": "The container/packaging code for this container"
                    },
                    "freight_class": {
                      "type": "number",
                      "description": "NMFC freight class",
                      "enum": [
                        50,
                        55,
                        60,
                        65,
                        70,
                        77.5,
                        85,
                        92.5,
                        100,
                        110,
                        125,
                        150,
                        175,
                        200,
                        250,
                        300,
                        400,
                        500
                      ]
                    },
                    "density": {
                      "$ref": "#/components/schemas/Density"
                    },
                    "nmfc_code": {
                      "description": "NMFC commodity code / item number",
                      "type": "string"
                    },
                    "description": {
                      "type": "string",
                      "description": "The description of the item(s) in this container",
                      "example": "Windows"
                    },
                    "dimensions": {
                      "$ref": "#/components/schemas/Dimensions"
                    },
                    "weight": {
                      "$ref": "#/components/schemas/Weight"
                    },
                    "quantity": {
                      "type": "number",
                      "description": ""
                    },
                    "stackable": {
                      "type": "boolean",
                      "description": ""
                    },
                    "hazardous_materials": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "code",
                    "freight_class",
                    "description",
                    "dimensions",
                    "weight",
                    "quantity",
                    "stackable",
                    "hazardous_materials"
                  ]
                }
              },
              "accessorials": {
                "type": "array",
                "description": "Accessorial services required for pickup",
                "items": {
                  "$ref": "#/components/schemas/AccessorialService"
                }
              },
              "reference_identifiers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "bill_of_lading",
                        "pro",
                        "purchase_order",
                        "quote",
                        "other"
                      ]
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              },
              "ship_from": {
                "type": "object",
                "required": [
                  "address",
                  "contact"
                ],
                "properties": {
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  },
                  "contact": {
                    "$ref": "#/components/schemas/Contact"
                  }
                }
              },
              "ship_to": {
                "type": "object",
                "required": [
                  "address",
                  "contact"
                ],
                "properties": {
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  },
                  "contact": {
                    "$ref": "#/components/schemas/Contact"
                  }
                }
              },
              "bill_to": {
                "type": "object",
                "title": "BillingParty",
                "required": [
                  "type",
                  "payment_terms"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "consignee",
                      "shipper",
                      "third_party"
                    ]
                  },
                  "payment_terms": {
                    "type": "string",
                    "enum": [
                      "collect",
                      "prepaid",
                      "third_party"
                    ]
                  },
                  "account": {
                    "type": "string",
                    "description": "The carrier account number used to determine the pricing agreement."
                  },
                  "address": {
                    "$ref": "#/components/schemas/Address"
                  },
                  "contact": {
                    "$ref": "#/components/schemas/Contact"
                  }
                }
              },
              "requested_by": {
                "$ref": "#/components/schemas/RequestingParty"
              },
              "carrier": {
                "type": "object",
                "properties": {
                  "instructions": {
                    "type": "string",
                    "description": "Optional instructions for the carrier"
                  },
                  "test": {
                    "type": "boolean",
                    "default": false,
                    "description": "By setting `test` to true a pickup will not be created with the carrier."
                  }
                }
              }
            },
            "required": [
              "service_level",
              "pickup",
              "containers",
              "ship_from",
              "ship_to",
              "bill_to",
              "requested_by"
            ]
          }
        ]
      },
      "ScheduleFreightPickupResponse": {
        "title": "ScheduleFreightPickupResponse",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "properties": {
              "confirmation_number": {
                "type": "string",
                "description": "The carrier confirmation number for the shipment. If a confirmation number is not supplied the user will need to confirm the pickup with the carrier directly."
              },
              "pro_number": {
                "type": "string",
                "description": "The PRO number for the shipment assigned by the carrier. If a number is not returned here the carrier will issue one at the time of pickup."
              },
              "message": {
                "type": "string",
                "description": "Optional message with notes about the pickup that the user should be made aware of."
              },
              "warnings": {
                "type": "array",
                "description": "Optional warnings returned by the carrier for this pickup request.",
                "items": {
                  "type": "object",
                  "properties": {
                    "external_code": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        ],
        "description": ""
      },
      "TrackFreightShipmentRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseRequest"
          },
          {
            "type": "object",
            "properties": {
              "pro_number": {
                "type": "string"
              }
            },
            "required": [
              "pro_number"
            ]
          }
        ],
        "title": "TrackFreightShipmentRequest"
      },
      "TrackFreightShipmentResponse": {
        "title": "TrackFreightShipmentResponse",
        "allOf": [
          {
            "$ref": "#/components/schemas/BaseResponse"
          },
          {
            "type": "object",
            "properties": {
              "pro_number": {
                "type": "string"
              },
              "ship_from": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "object",
                    "properties": {
                      "postal_code": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "ship_to": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": "object",
                    "properties": {
                      "postal_code": {
                        "type": "string"
                      }
                    }
                  }
                }
              },
              "pickup": {
                "type": "object",
                "properties": {
                  "date": {
                    "type": "string",
                    "format": "date",
                    "description": "Date Format: YYYY-MM-DD"
                  }
                },
                "required": [
                  "date"
                ]
              },
              "delivery": {
                "type": "object",
                "properties": {
                  "estimated": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "string",
                        "format": "date",
                        "description": "Date Format: YYYY-MM-DD"
                      },
                      "time": {
                        "type": "string",
                        "format": "time",
                        "description": "24 Hour Format: HH:MM:SS, HH:MM:SSZ, HH:MM:SS+/-HH:MM"
                      }
                    },
                    "required": [
                      "date"
                    ]
                  },
                  "actual": {
                    "type": "object",
                    "properties": {
                      "date": {
                        "type": "string",
                        "format": "date",
                        "description": "Date Format: YYYY-MM-DD"
                      },
                      "time": {
                        "type": "string",
                        "format": "time",
                        "description": "24 Hour Format: HH:MM:SS, HH:MM:SSZ, HH:MM:SS+/-HH:MM"
                      }
                    },
                    "required": [
                      "date"
                    ]
                  },
                  "signature": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "name"
                    ]
                  }
                }
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "enum": [
                        "delivered",
                        "exception",
                        "in_transit",
                        "info",
                        "out_for_delivery",
                        "picked_up",
                        "unknown"
                      ],
                      "description": "Valid values for tracking status codes include:\n  * `delivered` - The shipment has been delivered\n  * `exception` - Denotes that an exception occurred that is outside of the normal shipment lifecycle\n  * `in_transit` - The shipment is in transit\n  * `info` - Informational status about the shipment\n  * `out_for_delivery`: The shipment is out for delivery\n  * `picked_up`: The shipment has been picked up\n  * `unknown`: Used to indicate statuses that may be undocumented by a carrier.\n"
                    },
                    "date": {
                      "type": "string",
                      "format": "date",
                      "description": "Date Format: YYYY-MM-DD"
                    },
                    "time": {
                      "type": "string",
                      "format": "time",
                      "description": "24 Hour Format: HH:MM:SS, HH:MM:SSZ, HH:MM:SS+/-HH:MM"
                    },
                    "location": {
                      "type": "object",
                      "properties": {
                        "city_locality": {
                          "type": "string"
                        },
                        "state_province": {
                          "type": "string"
                        }
                      }
                    },
                    "carrier": {
                      "type": "object",
                      "properties": {
                        "description": {
                          "type": "string",
                          "description": "Optional carrier-supplied description of the tracking event"
                        }
                      }
                    }
                  },
                  "required": [
                    "status",
                    "date"
                  ]
                }
              }
            },
            "required": [
              "pro_number",
              "transit",
              "events"
            ]
          }
        ]
      },
      "Weight": {
        "title": "Weight",
        "type": "object",
        "properties": {
          "value": {
            "type": "number"
          },
          "unit": {
            "$ref": "#/components/schemas/WeightUnitType"
          }
        },
        "required": [
          "value",
          "unit"
        ]
      },
      "WeightUnitType": {
        "type": "string",
        "title": "WeightUnitType",
        "enum": [
          "grams",
          "kilograms",
          "ounces",
          "pounds"
        ]
      }
    },
    "securitySchemes": {
      "FreightApiCode": {
        "name": "The freight carrier API code as defined in the registry.",
        "type": "apiKey",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "FreightApiCode": []
    }
  ],
  "servers": [
    {
      "url": "http://localhost:3000",
      "description": "localhost"
    }
  ],
  "tags": [
    {
      "name": "Carrier Accounts"
    },
    {
      "name": "Documents"
    },
    {
      "name": "Freight Provider Accounts"
    },
    {
      "name": "Pickup"
    },
    {
      "name": "Quotes"
    },
    {
      "name": "Tracking"
    }
  ]
}
