{
  "openapi": "3.0.4",
  "info": {
    "title": "API Service",
    "description": "<p>This public API can be used to get user and lane information in order to create a booking.</p>",
    "contact": {
      "name": "CtrlChain",
      "email": "info@ctrlchain.com"
    },
    "version": "1.0"
  },
  "paths": {
    "/api/v1/Lane/get-lanes": {
      "get": {
        "tags": [
          "Lane"
        ],
        "summary": "Get all lanes for a user",
        "parameters": [
          {
            "name": "apiKey",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LanesViewModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Order/detail/{orderId}": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "Get the details of a specific order by its Id",
        "parameters": [
          {
            "name": "apiKey",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "orderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIOrderDetailViewModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Order/file/download/{fileId}": {
      "get": {
        "tags": [
          "Order"
        ],
        "summary": "Download an order file",
        "parameters": [
          {
            "name": "apiKey",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fileId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/integrations/v1/project44/webhook": {
      "post": {
        "tags": [
          "Project44Webhook"
        ],
        "summary": "Receive a Project44 booking-tender webhook.\nAlways returns 200 — parse and processing failures are handled inside the handler\nso Project44 never retries due to errors on our side.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Project44WebhookAckViewModel"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Request/lane-booking": {
      "post": {
        "tags": [
          "Request"
        ],
        "summary": "Request a lane booking",
        "parameters": [
          {
            "name": "apiKey",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIRequestLaneBookingRequest"
                  }
                ],
                "description": "Request to create a lane booking"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIRequestLaneBookingRequest"
                  }
                ],
                "description": "Request to create a lane booking"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIRequestLaneBookingRequest"
                  }
                ],
                "description": "Request to create a lane booking"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestLaneBookingViewModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/User/get-booking-users": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get all users within own enterprise with booking permission",
        "parameters": [
          {
            "name": "apiKey",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIBookingUsersViewModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Webhook/retrigger": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Retrigger a webhook",
        "parameters": [
          {
            "name": "apiKey",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIWebhookRetriggerRequest"
                  }
                ],
                "description": "Try to retrigger a webhook"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIWebhookRetriggerRequest"
                  }
                ],
                "description": "Try to retrigger a webhook"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIWebhookRetriggerRequest"
                  }
                ],
                "description": "Try to retrigger a webhook"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIWebhookRetriggerViewModel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/Webhook/paginated": {
      "post": {
        "tags": [
          "Webhook"
        ],
        "summary": "Get a list of webhooks based on the pagination parameters",
        "parameters": [
          {
            "name": "apiKey",
            "in": "header",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIWebhookPaginationRequest"
                  }
                ],
                "description": "Pagination request for retrieving triggered webhooks"
              }
            },
            "text/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIWebhookPaginationRequest"
                  }
                ],
                "description": "Pagination request for retrieving triggered webhooks"
              }
            },
            "application/*+json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/APIWebhookPaginationRequest"
                  }
                ],
                "description": "Pagination request for retrieving triggered webhooks"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/APIPaginatedWebhookViewmodel"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "APIAddressViewModel": {
        "required": [
          "locationId"
        ],
        "type": "object",
        "properties": {
          "locationId": {
            "type": "string",
            "description": "Id of the location",
            "format": "uuid"
          },
          "locationName": {
            "type": "string",
            "description": "Extra meta data about the address supplied by the user. For example the name of the associated company.",
            "nullable": true
          },
          "street": {
            "type": "string",
            "description": "Street name",
            "nullable": true
          },
          "number": {
            "type": "string",
            "description": "Number without additions",
            "nullable": true
          },
          "numberAddition": {
            "type": "string",
            "description": "Number addition",
            "nullable": true
          },
          "city": {
            "type": "string",
            "description": "City",
            "nullable": true
          },
          "state": {
            "type": "string",
            "description": "State",
            "nullable": true
          },
          "zipCode": {
            "type": "string",
            "description": "Zip code",
            "nullable": true
          },
          "country": {
            "type": "string",
            "description": "Country",
            "nullable": true
          },
          "countryCode": {
            "type": "string",
            "description": "Country Code based on the standard 2 letter ISO format",
            "nullable": true
          },
          "stateCode": {
            "type": "string",
            "description": "State Code, formatting depends on the country/region",
            "nullable": true
          },
          "latitude": {
            "type": "number",
            "description": "Latitude coordinate",
            "format": "double",
            "nullable": true
          },
          "longitude": {
            "type": "number",
            "description": "Longitude coordinate",
            "format": "double",
            "nullable": true
          },
          "timeZoneId": {
            "type": "string",
            "description": "Id of the timezone",
            "nullable": true
          },
          "timeZoneName": {
            "type": "string",
            "description": "Name of the timezone",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "View model containing address information"
      },
      "APIBookingUsersViewModel": {
        "required": [
          "groups"
        ],
        "type": "object",
        "properties": {
          "groups": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GroupViewModel"
            },
            "description": "List of bookers"
          }
        },
        "additionalProperties": false,
        "description": "Object containing information about groups and users to place a booking with"
      },
      "APIContactViewModel": {
        "required": [
          "contactCompanyName",
          "contactEmail",
          "contactName",
          "contactPhoneNumber",
          "contactRelation"
        ],
        "type": "object",
        "properties": {
          "contactRelation": {
            "type": "string",
            "description": "Relation\nOptions are\n'PickupContact'\n'DeliveryContact'\n'PickupTimeSlotContact'\n'DeliveryTimeSlotContact'"
          },
          "contactCompanyName": {
            "type": "string",
            "description": "Optional name of the company related to the contact"
          },
          "contactName": {
            "type": "string",
            "description": "Optional name of the contact"
          },
          "contactPhoneNumber": {
            "type": "string",
            "description": "Optional phone number of the contact"
          },
          "contactEmail": {
            "type": "string",
            "description": "Optional email of the contact"
          },
          "contactLanguage": {
            "type": "string",
            "description": "Optional language of the contact",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Object containing information about contacts related to the lane"
      },
      "APIOrderDetailViewModel": {
        "required": [
          "approvedPODs",
          "bookerUserName",
          "orderId",
          "orderStatus",
          "podStatus",
          "referenceNumber",
          "shipperGroupName",
          "stops"
        ],
        "type": "object",
        "properties": {
          "orderId": {
            "type": "string",
            "description": "Id of the order",
            "format": "uuid"
          },
          "referenceNumber": {
            "type": "string",
            "description": "Reference of the order"
          },
          "shipperReference": {
            "type": "string",
            "description": "Shipper Reference",
            "nullable": true
          },
          "shipperGroupName": {
            "type": "string",
            "description": "Name of the shipper company"
          },
          "carrierGroupName": {
            "type": "string",
            "description": "Name of the carrier group",
            "nullable": true
          },
          "carrierDetails": {
            "allOf": [
              {
                "$ref": "#/components/schemas/CarrierDetailsViewModel"
              }
            ],
            "description": "Carrier Details",
            "nullable": true
          },
          "bookerUserName": {
            "type": "string",
            "description": "Name of the user that booked the order"
          },
          "orderStatus": {
            "type": "string",
            "description": "Status of the order\nValid values are:\nNew, SearchForCarrier, CarrierInformed, InTransit, MissingPOD, Completed, Cancelled"
          },
          "requestedVehicleType": {
            "type": "string",
            "description": "Type of vehicle that was requested",
            "nullable": true
          },
          "assignedVehicleLicensePlate": {
            "type": "string",
            "description": "License plate of the assigned vehicle",
            "nullable": true
          },
          "assignedTrailerLicensePlate": {
            "type": "string",
            "description": "License plate of the assigned trailer",
            "nullable": true
          },
          "assignedDriverName": {
            "type": "string",
            "description": "Name of the assigned driver",
            "nullable": true
          },
          "podStatus": {
            "type": "string",
            "description": "Status of the POD for this order\nValid values are\nNotSent, Pending, Rejected, Approved,"
          },
          "approvedPODs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/APIOrderFileViewModel"
            },
            "description": "Approved POD files"
          },
          "stops": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderStopInformationViewModel"
            },
            "description": "Stops on the order"
          }
        },
        "additionalProperties": false,
        "description": "Object containing details about an order"
      },
      "APIOrderFileViewModel": {
        "required": [
          "downloadUrl",
          "fileId",
          "fileName",
          "uploadDate"
        ],
        "type": "object",
        "properties": {
          "fileId": {
            "type": "string",
            "description": "Id of the file",
            "format": "uuid"
          },
          "fileName": {
            "type": "string",
            "description": "Name of the file"
          },
          "downloadUrl": {
            "type": "string",
            "description": "Url to the api endpoint to download this file"
          },
          "uploadDate": {
            "type": "string",
            "description": "Date the file was uploaded",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Class containing data about uploaded files related to this ordeer"
      },
      "APIPaginatedWebhookViewmodel": {
        "required": [
          "items",
          "totalItems"
        ],
        "type": "object",
        "properties": {
          "totalItems": {
            "type": "integer",
            "format": "int32"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/APIWebhookViewModel"
            },
            "description": "Result set of the webhook items based on the requested index and pagesize"
          }
        },
        "additionalProperties": false,
        "description": "Viewmodel containing paginated data related to triggered webhooks"
      },
      "APIRateViewModel": {
        "required": [
          "endDate",
          "rate",
          "startDate"
        ],
        "type": "object",
        "properties": {
          "startDate": {
            "type": "string",
            "description": "Start date of this rate",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "description": "End date of this rate",
            "format": "date-time"
          },
          "rate": {
            "type": "number",
            "description": "Actual rate",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "object containig rate and the validity of the rate"
      },
      "APIRequestLaneBookingRequest": {
        "required": [
          "groupId",
          "laneId",
          "tailLift",
          "userId"
        ],
        "type": "object",
        "properties": {
          "laneId": {
            "type": "string",
            "description": "Id of the lane to create the booking for",
            "format": "uuid"
          },
          "groupId": {
            "type": "string",
            "description": "Id of the group to create the booking with. This can be a subgroup",
            "format": "uuid"
          },
          "userId": {
            "type": "string",
            "description": "Id of a user with the Booker role, that will be associated with the booking",
            "format": "uuid"
          },
          "desiredPickupDateTimes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTimeOption"
              }
            ],
            "description": "Object containing the desired pickup times\nThe provided times are expected to be in the timezone of the pickup address",
            "nullable": true
          },
          "desiredDeliveryDateTimes": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTimeOption"
              }
            ],
            "description": "Object containing the desired delivery times\nThe provided times are expected to be in the timezone of the delivery address",
            "nullable": true
          },
          "tailLift": {
            "type": "boolean",
            "description": "Indicate if you need a tail lift on your booking/order"
          },
          "comments": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Comments"
              }
            ],
            "description": "Object containing all comments",
            "nullable": true
          },
          "references": {
            "allOf": [
              {
                "$ref": "#/components/schemas/References"
              }
            ],
            "description": "Object containing all references",
            "nullable": true
          },
          "temperature": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Temperature"
              }
            ],
            "description": "Object containing optional temperature data\nThis is required when you place a booking with a refrigerated trailer type",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Request to create a lane booking"
      },
      "APIUserViewModel": {
        "required": [
          "firstName",
          "lastName",
          "userId",
          "username"
        ],
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "description": "Id of the (booker) user",
            "format": "uuid"
          },
          "username": {
            "type": "string",
            "description": "User name"
          },
          "firstName": {
            "type": "string",
            "description": "First name of the user"
          },
          "lastName": {
            "type": "string",
            "description": "Last name of the user"
          }
        },
        "additionalProperties": false,
        "description": "Object containing information about the user"
      },
      "APIVehicleTypeViewModel": {
        "required": [
          "vehicleTypeId",
          "vehicleTypeName"
        ],
        "type": "object",
        "properties": {
          "vehicleTypeId": {
            "type": "string",
            "description": "Id of the vehicle type",
            "format": "uuid"
          },
          "vehicleTypeName": {
            "type": "string",
            "description": "Name of the vehicle type\ne.g. 'Delivery Car'"
          }
        },
        "additionalProperties": false,
        "description": "Object containing information about the vehicle type"
      },
      "APIWebhookPaginationRequest": {
        "required": [
          "pageIndex",
          "pageSize"
        ],
        "type": "object",
        "properties": {
          "pageIndex": {
            "type": "integer",
            "description": "Current page index that is being viewed\nIndex starts at 0",
            "format": "int32"
          },
          "pageSize": {
            "type": "integer",
            "description": "Page size\nMinimum 1, Maximum 200",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Pagination request for retrieving triggered webhooks"
      },
      "APIWebhookRetriggerRequest": {
        "required": [
          "webhookEventId"
        ],
        "type": "object",
        "properties": {
          "webhookEventId": {
            "type": "string",
            "description": "Id of the webhook to retrigger",
            "format": "uuid"
          }
        },
        "additionalProperties": false,
        "description": "Try to retrigger a webhook"
      },
      "APIWebhookRetriggerViewModel": {
        "required": [
          "responseStatusCode",
          "success"
        ],
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "If we regard the event as a success"
          },
          "responseStatusCode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HttpStatusCode"
              }
            ],
            "description": "100 = Continue  101 = SwitchingProtocols  102 = Processing  103 = EarlyHints  200 = OK  201 = Created  202 = Accepted  203 = NonAuthoritativeInformation  204 = NoContent  205 = ResetContent  206 = PartialContent  207 = MultiStatus  208 = AlreadyReported  226 = IMUsed  300 = MultipleChoices  300 = Ambiguous  301 = MovedPermanently  301 = Moved  302 = Found  302 = Redirect  303 = SeeOther  303 = RedirectMethod  304 = NotModified  305 = UseProxy  306 = Unused  307 = TemporaryRedirect  307 = RedirectKeepVerb  308 = PermanentRedirect  400 = BadRequest  401 = Unauthorized  402 = PaymentRequired  403 = Forbidden  404 = NotFound  405 = MethodNotAllowed  406 = NotAcceptable  407 = ProxyAuthenticationRequired  408 = RequestTimeout  409 = Conflict  410 = Gone  411 = LengthRequired  412 = PreconditionFailed  413 = RequestEntityTooLarge  414 = RequestUriTooLong  415 = UnsupportedMediaType  416 = RequestedRangeNotSatisfiable  417 = ExpectationFailed  421 = MisdirectedRequest  422 = UnprocessableEntity  422 = UnprocessableContent  423 = Locked  424 = FailedDependency  426 = UpgradeRequired  428 = PreconditionRequired  429 = TooManyRequests  431 = RequestHeaderFieldsTooLarge  451 = UnavailableForLegalReasons  500 = InternalServerError  501 = NotImplemented  502 = BadGateway  503 = ServiceUnavailable  504 = GatewayTimeout  505 = HttpVersionNotSupported  506 = VariantAlsoNegotiates  507 = InsufficientStorage  508 = LoopDetected  510 = NotExtended  511 = NetworkAuthenticationRequired\nStatus code returned by the webhook endpoint",
            "x-enum-varnames": [
              "Continue",
              "SwitchingProtocols",
              "Processing",
              "EarlyHints",
              "OK",
              "Created",
              "Accepted",
              "NonAuthoritativeInformation",
              "NoContent",
              "ResetContent",
              "PartialContent",
              "MultiStatus",
              "AlreadyReported",
              "IMUsed",
              "MultipleChoices",
              "Ambiguous",
              "MovedPermanently",
              "Moved",
              "Found",
              "Redirect",
              "SeeOther",
              "RedirectMethod",
              "NotModified",
              "UseProxy",
              "Unused",
              "TemporaryRedirect",
              "RedirectKeepVerb",
              "PermanentRedirect",
              "BadRequest",
              "Unauthorized",
              "PaymentRequired",
              "Forbidden",
              "NotFound",
              "MethodNotAllowed",
              "NotAcceptable",
              "ProxyAuthenticationRequired",
              "RequestTimeout",
              "Conflict",
              "Gone",
              "LengthRequired",
              "PreconditionFailed",
              "RequestEntityTooLarge",
              "RequestUriTooLong",
              "UnsupportedMediaType",
              "RequestedRangeNotSatisfiable",
              "ExpectationFailed",
              "MisdirectedRequest",
              "UnprocessableEntity",
              "UnprocessableContent",
              "Locked",
              "FailedDependency",
              "UpgradeRequired",
              "PreconditionRequired",
              "TooManyRequests",
              "RequestHeaderFieldsTooLarge",
              "UnavailableForLegalReasons",
              "InternalServerError",
              "NotImplemented",
              "BadGateway",
              "ServiceUnavailable",
              "GatewayTimeout",
              "HttpVersionNotSupported",
              "VariantAlsoNegotiates",
              "InsufficientStorage",
              "LoopDetected",
              "NotExtended",
              "NetworkAuthenticationRequired"
            ]
          },
          "responseMessage": {
            "type": "string",
            "description": "Optional response message from the webhook endpoint",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Viewmodel containing data about the result of retriggering a webhook"
      },
      "APIWebhookViewModel": {
        "required": [
          "entityId",
          "entityType",
          "eventId",
          "eventType",
          "responseStatusCode",
          "userGroupId"
        ],
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "description": "Id of this webhook event",
            "format": "uuid"
          },
          "userGroupId": {
            "type": "string",
            "description": "Id of the user group",
            "format": "uuid"
          },
          "userGroupName": {
            "type": "string",
            "description": "Name of the user group",
            "nullable": true
          },
          "eventType": {
            "type": "string",
            "description": "Type of event"
          },
          "entityId": {
            "type": "string",
            "description": "Id of the entity e.g. OrderId",
            "format": "uuid"
          },
          "entityType": {
            "type": "string",
            "description": "Type of entity e.g. Order"
          },
          "responseStatusCode": {
            "allOf": [
              {
                "$ref": "#/components/schemas/HttpStatusCode"
              }
            ],
            "description": "100 = Continue  101 = SwitchingProtocols  102 = Processing  103 = EarlyHints  200 = OK  201 = Created  202 = Accepted  203 = NonAuthoritativeInformation  204 = NoContent  205 = ResetContent  206 = PartialContent  207 = MultiStatus  208 = AlreadyReported  226 = IMUsed  300 = MultipleChoices  300 = Ambiguous  301 = MovedPermanently  301 = Moved  302 = Found  302 = Redirect  303 = SeeOther  303 = RedirectMethod  304 = NotModified  305 = UseProxy  306 = Unused  307 = TemporaryRedirect  307 = RedirectKeepVerb  308 = PermanentRedirect  400 = BadRequest  401 = Unauthorized  402 = PaymentRequired  403 = Forbidden  404 = NotFound  405 = MethodNotAllowed  406 = NotAcceptable  407 = ProxyAuthenticationRequired  408 = RequestTimeout  409 = Conflict  410 = Gone  411 = LengthRequired  412 = PreconditionFailed  413 = RequestEntityTooLarge  414 = RequestUriTooLong  415 = UnsupportedMediaType  416 = RequestedRangeNotSatisfiable  417 = ExpectationFailed  421 = MisdirectedRequest  422 = UnprocessableEntity  422 = UnprocessableContent  423 = Locked  424 = FailedDependency  426 = UpgradeRequired  428 = PreconditionRequired  429 = TooManyRequests  431 = RequestHeaderFieldsTooLarge  451 = UnavailableForLegalReasons  500 = InternalServerError  501 = NotImplemented  502 = BadGateway  503 = ServiceUnavailable  504 = GatewayTimeout  505 = HttpVersionNotSupported  506 = VariantAlsoNegotiates  507 = InsufficientStorage  508 = LoopDetected  510 = NotExtended  511 = NetworkAuthenticationRequired\nStatus code returned by the webhook endpoint",
            "x-enum-varnames": [
              "Continue",
              "SwitchingProtocols",
              "Processing",
              "EarlyHints",
              "OK",
              "Created",
              "Accepted",
              "NonAuthoritativeInformation",
              "NoContent",
              "ResetContent",
              "PartialContent",
              "MultiStatus",
              "AlreadyReported",
              "IMUsed",
              "MultipleChoices",
              "Ambiguous",
              "MovedPermanently",
              "Moved",
              "Found",
              "Redirect",
              "SeeOther",
              "RedirectMethod",
              "NotModified",
              "UseProxy",
              "Unused",
              "TemporaryRedirect",
              "RedirectKeepVerb",
              "PermanentRedirect",
              "BadRequest",
              "Unauthorized",
              "PaymentRequired",
              "Forbidden",
              "NotFound",
              "MethodNotAllowed",
              "NotAcceptable",
              "ProxyAuthenticationRequired",
              "RequestTimeout",
              "Conflict",
              "Gone",
              "LengthRequired",
              "PreconditionFailed",
              "RequestEntityTooLarge",
              "RequestUriTooLong",
              "UnsupportedMediaType",
              "RequestedRangeNotSatisfiable",
              "ExpectationFailed",
              "MisdirectedRequest",
              "UnprocessableEntity",
              "UnprocessableContent",
              "Locked",
              "FailedDependency",
              "UpgradeRequired",
              "PreconditionRequired",
              "TooManyRequests",
              "RequestHeaderFieldsTooLarge",
              "UnavailableForLegalReasons",
              "InternalServerError",
              "NotImplemented",
              "BadGateway",
              "ServiceUnavailable",
              "GatewayTimeout",
              "HttpVersionNotSupported",
              "VariantAlsoNegotiates",
              "InsufficientStorage",
              "LoopDetected",
              "NotExtended",
              "NetworkAuthenticationRequired"
            ]
          },
          "responseMessage": {
            "type": "string",
            "description": "Optional response message from the webhook endpoint",
            "nullable": true
          },
          "detailUrl": {
            "type": "string",
            "description": "Url that can be used to query for more details about this Entity",
            "nullable": true
          },
          "triggeredUrl": {
            "type": "string",
            "description": "Url that was used for the webhook endpoint",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Viewmodel containing webhook data"
      },
      "CarrierDetailsViewModel": {
        "required": [
          "carrierAddress",
          "carrierEnterpriseName",
          "carrierName",
          "carrierTaxNumber"
        ],
        "type": "object",
        "properties": {
          "carrierName": {
            "type": "string",
            "description": "Name of the carrier"
          },
          "carrierEnterpriseName": {
            "type": "string",
            "description": "Name of the carrier's enterprise"
          },
          "carrierAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/APIAddressViewModel"
              }
            ],
            "description": "Address of the carrier"
          },
          "carrierTaxNumber": {
            "type": "string",
            "description": "Tax number of the carrier"
          }
        },
        "additionalProperties": false,
        "description": "Details about the carrier assigned to an order"
      },
      "Comments": {
        "required": [
          "delivery",
          "pickup",
          "shipper"
        ],
        "type": "object",
        "properties": {
          "shipper": {
            "type": "string",
            "description": "Comment that is only visible for the Shipper and internal users"
          },
          "pickup": {
            "type": "string",
            "description": "Comment that is visible for everyone, related to the Pickup address"
          },
          "delivery": {
            "type": "string",
            "description": "Comment that is visible for everyone, related to the Delivery address"
          }
        },
        "additionalProperties": false,
        "description": "Object containing comments"
      },
      "DateTimeOption": {
        "required": [
          "earliest",
          "latest"
        ],
        "type": "object",
        "properties": {
          "earliest": {
            "type": "string",
            "description": "Earliest date and time.\nExample format: 2019-08-24T14:15:22Z",
            "format": "date-time"
          },
          "latest": {
            "type": "string",
            "description": "Latest date and time\nExample format: 2019-08-24T14:15:22Z",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Object containing date times"
      },
      "DateTimeOptionViewModel": {
        "required": [
          "earliest",
          "latest"
        ],
        "type": "object",
        "properties": {
          "earliest": {
            "type": "string",
            "description": "Earliest date",
            "format": "date-time"
          },
          "latest": {
            "type": "string",
            "description": "Latest date",
            "format": "date-time"
          }
        },
        "additionalProperties": false,
        "description": "Object containing dates"
      },
      "GroupViewModel": {
        "required": [
          "groupId",
          "groupName",
          "users"
        ],
        "type": "object",
        "properties": {
          "groupId": {
            "type": "string",
            "description": "Id of the group",
            "format": "uuid"
          },
          "groupName": {
            "type": "string",
            "description": "Name of the group"
          },
          "users": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/APIUserViewModel"
            },
            "description": "Users"
          }
        },
        "additionalProperties": false,
        "description": "Groups"
      },
      "HttpStatusCode": {
        "enum": [
          100,
          101,
          102,
          103,
          200,
          201,
          202,
          203,
          204,
          205,
          206,
          207,
          208,
          226,
          300,
          301,
          302,
          303,
          304,
          305,
          306,
          307,
          308,
          400,
          401,
          402,
          403,
          404,
          405,
          406,
          407,
          408,
          409,
          410,
          411,
          412,
          413,
          414,
          415,
          416,
          417,
          421,
          422,
          423,
          424,
          426,
          428,
          429,
          431,
          451,
          500,
          501,
          502,
          503,
          504,
          505,
          506,
          507,
          508,
          510,
          511
        ],
        "type": "integer",
        "description": "100 = Continue  101 = SwitchingProtocols  102 = Processing  103 = EarlyHints  200 = OK  201 = Created  202 = Accepted  203 = NonAuthoritativeInformation  204 = NoContent  205 = ResetContent  206 = PartialContent  207 = MultiStatus  208 = AlreadyReported  226 = IMUsed  300 = MultipleChoices  300 = Ambiguous  301 = MovedPermanently  301 = Moved  302 = Found  302 = Redirect  303 = SeeOther  303 = RedirectMethod  304 = NotModified  305 = UseProxy  306 = Unused  307 = TemporaryRedirect  307 = RedirectKeepVerb  308 = PermanentRedirect  400 = BadRequest  401 = Unauthorized  402 = PaymentRequired  403 = Forbidden  404 = NotFound  405 = MethodNotAllowed  406 = NotAcceptable  407 = ProxyAuthenticationRequired  408 = RequestTimeout  409 = Conflict  410 = Gone  411 = LengthRequired  412 = PreconditionFailed  413 = RequestEntityTooLarge  414 = RequestUriTooLong  415 = UnsupportedMediaType  416 = RequestedRangeNotSatisfiable  417 = ExpectationFailed  421 = MisdirectedRequest  422 = UnprocessableEntity  422 = UnprocessableContent  423 = Locked  424 = FailedDependency  426 = UpgradeRequired  428 = PreconditionRequired  429 = TooManyRequests  431 = RequestHeaderFieldsTooLarge  451 = UnavailableForLegalReasons  500 = InternalServerError  501 = NotImplemented  502 = BadGateway  503 = ServiceUnavailable  504 = GatewayTimeout  505 = HttpVersionNotSupported  506 = VariantAlsoNegotiates  507 = InsufficientStorage  508 = LoopDetected  510 = NotExtended  511 = NetworkAuthenticationRequired",
        "format": "int32",
        "x-enum-varnames": [
          "Continue",
          "SwitchingProtocols",
          "Processing",
          "EarlyHints",
          "OK",
          "Created",
          "Accepted",
          "NonAuthoritativeInformation",
          "NoContent",
          "ResetContent",
          "PartialContent",
          "MultiStatus",
          "AlreadyReported",
          "IMUsed",
          "MultipleChoices",
          "Ambiguous",
          "MovedPermanently",
          "Moved",
          "Found",
          "Redirect",
          "SeeOther",
          "RedirectMethod",
          "NotModified",
          "UseProxy",
          "Unused",
          "TemporaryRedirect",
          "RedirectKeepVerb",
          "PermanentRedirect",
          "BadRequest",
          "Unauthorized",
          "PaymentRequired",
          "Forbidden",
          "NotFound",
          "MethodNotAllowed",
          "NotAcceptable",
          "ProxyAuthenticationRequired",
          "RequestTimeout",
          "Conflict",
          "Gone",
          "LengthRequired",
          "PreconditionFailed",
          "RequestEntityTooLarge",
          "RequestUriTooLong",
          "UnsupportedMediaType",
          "RequestedRangeNotSatisfiable",
          "ExpectationFailed",
          "MisdirectedRequest",
          "UnprocessableEntity",
          "UnprocessableContent",
          "Locked",
          "FailedDependency",
          "UpgradeRequired",
          "PreconditionRequired",
          "TooManyRequests",
          "RequestHeaderFieldsTooLarge",
          "UnavailableForLegalReasons",
          "InternalServerError",
          "NotImplemented",
          "BadGateway",
          "ServiceUnavailable",
          "GatewayTimeout",
          "HttpVersionNotSupported",
          "VariantAlsoNegotiates",
          "InsufficientStorage",
          "LoopDetected",
          "NotExtended",
          "NetworkAuthenticationRequired"
        ]
      },
      "LaneViewModel": {
        "required": [
          "contacts",
          "deliveryAddress",
          "laneId",
          "laneReferenceNumber",
          "pickupAddress",
          "rates",
          "vehicleType"
        ],
        "type": "object",
        "properties": {
          "laneId": {
            "type": "string",
            "description": "Id of the lane",
            "format": "uuid"
          },
          "laneReferenceNumber": {
            "type": "string",
            "description": "Reference number of the lane"
          },
          "pickupAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/APIAddressViewModel"
              }
            ],
            "description": "Address related to the pickup location of the lane"
          },
          "deliveryAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/APIAddressViewModel"
              }
            ],
            "description": "Address related to the delivery location of the lane"
          },
          "vehicleType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/APIVehicleTypeViewModel"
              }
            ],
            "description": "Object containing information about the vehicle type"
          },
          "trailerType": {
            "allOf": [
              {
                "$ref": "#/components/schemas/TrailerViewModel"
              }
            ],
            "description": "Optional object containing information about the trailer type",
            "nullable": true
          },
          "contacts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/APIContactViewModel"
            },
            "description": "Object list of contacts related to the lane"
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/APIRateViewModel"
            },
            "description": "Object containing information about agreed rates for this lane"
          }
        },
        "additionalProperties": false,
        "description": "Object describing the properties of a given lane"
      },
      "LanesViewModel": {
        "required": [
          "lanes"
        ],
        "type": "object",
        "properties": {
          "lanes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LaneViewModel"
            },
            "description": "List of lanes"
          }
        },
        "additionalProperties": false,
        "description": "Object containing multiple lanes"
      },
      "OrderStopInformationViewModel": {
        "required": [
          "address",
          "requestedDate",
          "stopReference"
        ],
        "type": "object",
        "properties": {
          "stopReference": {
            "type": "string",
            "description": "Reference related to this stop"
          },
          "address": {
            "allOf": [
              {
                "$ref": "#/components/schemas/APIAddressViewModel"
              }
            ],
            "description": "Related address to this stop"
          },
          "requestedDate": {
            "type": "string",
            "description": "Date the order was requested",
            "format": "date-time"
          },
          "requestedDateWindowEnd": {
            "type": "string",
            "description": "If applicable, window end date the order was requested",
            "format": "date-time",
            "nullable": true
          },
          "timeSlotStartDate": {
            "type": "string",
            "description": "If applicable, the starting date of the confirmed Time slot",
            "format": "date-time",
            "nullable": true
          },
          "timeSlotEndDate": {
            "type": "string",
            "description": "If applicable, the end date of the confirmed Time slot",
            "format": "date-time",
            "nullable": true
          },
          "expectedDate": {
            "type": "string",
            "description": "ETA",
            "format": "date-time",
            "nullable": true
          },
          "arrivedDate": {
            "type": "string",
            "description": "Arrival at location date",
            "format": "date-time",
            "nullable": true
          },
          "completionDate": {
            "type": "string",
            "description": "Completion date, e.g. cargo loaded/unloaded",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Information about a stop related ot the order"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": { }
      },
      "Project44WebhookAckViewModel": {
        "required": [
          "bookingId",
          "isNew"
        ],
        "type": "object",
        "properties": {
          "bookingId": {
            "type": "string",
            "description": "The Project44 booking UUID that was received and is being processed."
          },
          "isNew": {
            "type": "boolean",
            "description": "True when the webhook was processed for the first time.\nFalse when it was a redelivery (idempotent — no duplicate order created)."
          }
        },
        "additionalProperties": false,
        "description": "Acknowledgement returned to Project44 after processing a booking-tender webhook.\nThe actual Accept/Reject is sent asynchronously via PUT to Project44's booking-response\nendpoint; this ack simply confirms receipt to their delivery infrastructure."
      },
      "References": {
        "required": [
          "delivery",
          "pickup",
          "shipper"
        ],
        "type": "object",
        "properties": {
          "shipper": {
            "type": "string",
            "description": "Reference that is related and only visible for the shipper."
          },
          "pickup": {
            "type": "string",
            "description": "Reference related to the pickup location\nThis is visible for the carrier, but also for any contacts related to the pickup location"
          },
          "delivery": {
            "type": "string",
            "description": "Reference related to the delivery location\nThis is visible for the carrier, but also for any contacts related to the delivery location"
          }
        },
        "additionalProperties": false,
        "description": "Object containing references"
      },
      "RequestLaneBookingViewModel": {
        "required": [
          "ccaOrderReferenceNumber",
          "ccaRequestReferenceNumber",
          "deliveryAddress",
          "deliveryDateTime",
          "pickupAddress",
          "pickupDateTime"
        ],
        "type": "object",
        "properties": {
          "ccaRequestReferenceNumber": {
            "type": "string",
            "description": "Reference number of the Request"
          },
          "ccaOrderReferenceNumber": {
            "type": "string",
            "description": "Reference nubmer of the Order"
          },
          "pickupAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/APIAddressViewModel"
              }
            ],
            "description": "Address object of the pickup location"
          },
          "deliveryAddress": {
            "allOf": [
              {
                "$ref": "#/components/schemas/APIAddressViewModel"
              }
            ],
            "description": "Address object of the delivery location"
          },
          "pickupDateTime": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTimeOptionViewModel"
              }
            ],
            "description": "Dates related to the pickup address"
          },
          "deliveryDateTime": {
            "allOf": [
              {
                "$ref": "#/components/schemas/DateTimeOptionViewModel"
              }
            ],
            "description": "Dates related to the delivery address"
          }
        },
        "additionalProperties": false,
        "description": "Result returned upon succesfuly placing a booking"
      },
      "Temperature": {
        "required": [
          "maxTemperature",
          "minTemperature",
          "useFahrenheit"
        ],
        "type": "object",
        "properties": {
          "useFahrenheit": {
            "type": "boolean",
            "description": "Indicate to use Fahrenheit. \nWill default to Celsius if false"
          },
          "minTemperature": {
            "type": "number",
            "description": "Min temperature",
            "format": "double"
          },
          "maxTemperature": {
            "type": "number",
            "description": "Max temperature",
            "format": "double"
          }
        },
        "additionalProperties": false,
        "description": "Temperature needed for a refrigerated type of trailer"
      },
      "TrailerViewModel": {
        "required": [
          "trailerTypeId",
          "trailerTypeName"
        ],
        "type": "object",
        "properties": {
          "trailerTypeId": {
            "type": "string",
            "description": "Id of the trailer type",
            "format": "uuid"
          },
          "trailerTypeName": {
            "type": "string",
            "description": "Name of the trailer type\ne.g. 'Reefer' or 'Box'"
          }
        },
        "additionalProperties": false,
        "description": "Object containing information about the trailer type"
      }
    }
  },
  "tags": [
    {
      "name": "Lane"
    },
    {
      "name": "Order"
    },
    {
      "name": "Project44Webhook"
    },
    {
      "name": "Request"
    },
    {
      "name": "User"
    },
    {
      "name": "Webhook"
    }
  ]
}