{
 "openapi": "3.1.0",
 "info": {
  "title": "Holio TMS API",
  "version": "v1",
  "description": "The machine-caller part of the TMS service's API. Generated by developers/tools/refresh-spec.mjs."
 },
 "servers": [
  {
   "url": "https://vibe.holiostage.com/api/tms",
   "description": "Vibe"
  }
 ],
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/v1/organizations/{organizationId}/tms/order-shipments": {
   "get": {
    "tags": [
     "order-shipment"
    ],
    "operationId": "orderShipment.list",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "source",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "[a-z][a-z0-9_]{0,30}"
      }
     },
     {
      "name": "connectionId",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "externalOrderId",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "maxLength": 100,
       "minLength": 1
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/OrderShipmentRow"
         }
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "order-shipment"
    ],
    "operationId": "orderShipment.ship",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9._:-]{1,100}"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OrderShipmentRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Booked before with this Idempotency-Key, or skipped",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/OrderShipmentResult"
        }
       }
      }
     },
     "201": {
      "description": "Booked",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/OrderShipmentResult"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/order-shipments/{shipmentId}/reprint": {
   "post": {
    "tags": [
     "order-shipment"
    ],
    "operationId": "orderShipment.reprint",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OrderShipmentReprintRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/OrderShipmentReprintResult"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/order-shipments/preview": {
   "post": {
    "tags": [
     "order-shipment"
    ],
    "operationId": "orderShipment.preview",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OrderShipmentRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/OrderShipmentPreview"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/order-returns": {
   "post": {
    "tags": [
     "order-shipment"
    ],
    "operationId": "orderShipment.shipReturn",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9._:-]{1,100}"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/OrderReturnRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Booked before with this Idempotency-Key",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/OrderShipmentResult"
        }
       }
      }
     },
     "201": {
      "description": "Booked",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/OrderShipmentResult"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments": {
   "get": {
    "tags": [
     "shipment-record"
    ],
    "operationId": "shipmentRecord.shipments",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "booking_unknown|created|collected|in_transit|delivered|returned|voided"
      }
     },
     {
      "name": "transportStatus",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "ordered|booking_unknown|created|collected|in_transit|out_for_delivery|ready_for_pickup|delivery_attempted|delivered|returning|returned|voided|not_sent|lost"
      }
     },
     {
      "name": "deviation",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "delayed|damaged|wrong_address|customs_hold|refused|missing_scan|other"
      }
     },
     {
      "name": "carrierId",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9_-]{1,64}"
      }
     },
     {
      "name": "engine",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "holio|profrakt|legacy"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0,
       "maximum": 10000,
       "minimum": 0
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 50,
       "maximum": 200,
       "minimum": 1
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalShipmentPage"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "internal-booking"
    ],
    "operationId": "internalBooking.book",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9._:-]{1,100}"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/InternalBookingRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Booked before with this Idempotency-Key",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "201": {
      "description": "Booked",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "202": {
      "description": "Waits for approval",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/BookingApproval"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/void": {
   "post": {
    "tags": [
     "internal-booking"
    ],
    "operationId": "internalBooking.voidShipment",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalShipmentView"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/track": {
   "post": {
    "tags": [
     "internal-booking"
    ],
    "operationId": "internalBooking.track",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalShipmentView"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/label/refetch": {
   "post": {
    "tags": [
     "internal-booking"
    ],
    "operationId": "internalBooking.refetchLabel",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/LabelLink"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/checks": {
   "post": {
    "tags": [
     "internal-booking"
    ],
    "operationId": "internalBooking.check",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/InternalBookingRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalBookingCheck"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-quotes": {
   "post": {
    "tags": [
     "price-list"
    ],
    "operationId": "priceList.quote",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/InternalQuoteRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalQuote"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-pickups": {
   "get": {
    "tags": [
     "pickup"
    ],
    "operationId": "pickup.page",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "status",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "booking_unknown|booked|cancelled"
      }
     },
     {
      "name": "from",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "format": "date"
      }
     },
     {
      "name": "to",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "format": "date"
      }
     },
     {
      "name": "page",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 0,
       "maximum": 10000,
       "minimum": 0
      }
     },
     {
      "name": "size",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 50,
       "maximum": 200,
       "minimum": 1
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalPickupPage"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   },
   "post": {
    "tags": [
     "pickup"
    ],
    "operationId": "pickup.book",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "Idempotency-Key",
      "in": "header",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9._:-]{1,100}"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/InternalPickupRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "Ordered before with this Idempotency-Key",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalPickupAnswer"
        }
       }
      }
     },
     "201": {
      "description": "Ordered",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalPickupAnswer"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-pickups/{pickupId}/cancel": {
   "post": {
    "tags": [
     "pickup"
    ],
    "operationId": "pickup.cancel",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "pickupId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalPickupView"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/checkout/rates": {
   "post": {
    "tags": [
     "checkout"
    ],
    "operationId": "checkout.rates",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "requestBody": {
     "content": {
      "application/json": {
       "schema": {
        "$ref": "#/components/schemas/CheckoutRatesRequest"
       }
      }
     },
     "required": true
    },
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CheckoutRatesAnswer"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "409": {
      "description": "Not possible in the resource's current state",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}": {
   "get": {
    "tags": [
     "shipment-record"
    ],
    "operationId": "shipmentRecord.shipment",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalShipmentView"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/tracking": {
   "get": {
    "tags": [
     "shipment-record"
    ],
    "operationId": "shipmentRecord.tracking",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalShipmentTracking"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/label": {
   "get": {
    "tags": [
     "internal-booking"
    ],
    "operationId": "internalBooking.label",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/LabelLink"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/events": {
   "get": {
    "tags": [
     "internal-booking"
    ],
    "operationId": "internalBooking.events",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/InternalShipmentTrackingEvent"
         }
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/documents": {
   "get": {
    "tags": [
     "shipment-print"
    ],
    "operationId": "shipmentPrint.documents",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShipmentDocumentList"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-shipments/{shipmentId}/documents/{document}": {
   "get": {
    "tags": [
     "shipment-print"
    ],
    "operationId": "shipmentPrint.document",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "shipmentId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "document",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "label|delivery_note"
      }
     },
     {
      "name": "format",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "default": "pdf",
       "pattern": "pdf|zpl"
      }
     },
     {
      "name": "dpi",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 203,
       "maximum": 600,
       "minimum": 203
      }
     },
     {
      "name": "labelWidthMm",
      "in": "query",
      "required": false,
      "schema": {
       "type": "integer",
       "format": "int32",
       "default": 102,
       "maximum": 220,
       "minimum": 25
      }
     },
     {
      "name": "language",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "nb|sv|en"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ShipmentDocumentLink"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/internal-pickups/{pickupId}": {
   "get": {
    "tags": [
     "pickup"
    ],
    "operationId": "pickup.get",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "pickupId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/InternalPickupView"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/checkout/pickup-points": {
   "get": {
    "tags": [
     "checkout"
    ],
    "operationId": "checkout.pickupPointsForCode",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "code",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "maxLength": 300,
       "minLength": 1
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z]{2}"
      }
     },
     {
      "name": "postalCode",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9 -]{1,12}"
      }
     },
     {
      "name": "city",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "maxLength": 100,
       "minLength": 0
      }
     },
     {
      "name": "address",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "maxLength": 100,
       "minLength": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CheckoutPickupPoints"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/catalogue/products": {
   "get": {
    "tags": [
     "catalog"
    ],
    "operationId": "catalog.products",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "carrierId",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9_-]{1,64}"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/ProductView"
         }
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/catalogue/products/{productId}": {
   "get": {
    "tags": [
     "catalog"
    ],
    "operationId": "catalog.product",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "productId",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9_-]{1,80}"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/ProductView"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/catalogue/postal-codes/{countryCode}/{postalCode}": {
   "get": {
    "tags": [
     "catalog"
    ],
    "operationId": "catalog.postalCode",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "countryCode",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z]{2}"
      }
     },
     {
      "name": "postalCode",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z0-9 -]{1,12}"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/PostalCodeView"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "404": {
      "description": "Not found",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/catalogue/carriers": {
   "get": {
    "tags": [
     "catalog"
    ],
    "operationId": "catalog.carriers",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/CarrierView"
         }
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/catalogue/capabilities": {
   "get": {
    "tags": [
     "carrier-capability"
    ],
    "operationId": "carrierCapability.capabilities",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "$ref": "#/components/schemas/CarrierCapabilityMatrix"
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  },
  "/v1/organizations/{organizationId}/tms/catalogue/addresses": {
   "get": {
    "tags": [
     "catalog"
    ],
    "operationId": "catalog.addresses",
    "parameters": [
     {
      "name": "organizationId",
      "in": "path",
      "description": "The organization the token or API key is for",
      "required": true,
      "schema": {
       "type": "string",
       "format": "uuid"
      }
     },
     {
      "name": "country",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "pattern": "[A-Za-z]{2}"
      }
     },
     {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string",
       "maxLength": 100,
       "minLength": 0
      }
     }
    ],
    "responses": {
     "200": {
      "description": "OK",
      "content": {
       "application/json": {
        "schema": {
         "type": "array",
         "items": {
          "$ref": "#/components/schemas/AddressSuggestion"
         }
        }
       }
      }
     },
     "400": {
      "description": "The request is invalid; a body that fails validation lists its fields in errors",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "401": {
      "description": "No valid token or API key",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     },
     "403": {
      "description": "A permission is missing, or the token is for another organization",
      "content": {
       "application/problem+json": {
        "schema": {
         "$ref": "#/components/schemas/ProblemDetail"
        }
       }
      }
     }
    }
   }
  }
 },
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "description": "An access token from Keycloak for one organization, or an API key from the identity service (hol_…)",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "AddressSuggestion": {
    "type": "object",
    "properties": {
     "addressLine": {
      "type": "string"
     },
     "postalCode": {
      "type": "string"
     },
     "city": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "addressLine",
     "postalCode"
    ]
   },
   "BookingAllocation": {
    "type": "object",
    "properties": {
     "department": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 50,
      "minLength": 0
     },
     "project": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 50,
      "minLength": 0
     },
     "costCenter": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 50,
      "minLength": 0
     },
     "reference": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 50,
      "minLength": 0
     }
    }
   },
   "BookingApproval": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "status": {
      "type": "string",
      "enum": [
       "pending",
       "approved",
       "rejected"
      ]
     },
     "reasons": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "amount": {
      "type": [
       "number",
       "null"
      ]
     },
     "currency": {
      "type": [
       "string",
       "null"
      ]
     },
     "agreementId": {
      "type": "string"
     },
     "productId": {
      "type": "string"
     },
     "receiverName": {
      "type": "string"
     },
     "receiverCountryCode": {
      "type": "string"
     },
     "requestedBy": {
      "type": [
       "string",
       "null"
      ]
     },
     "decidedBy": {
      "type": [
       "string",
       "null"
      ]
     },
     "decidedAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "note": {
      "type": [
       "string",
       "null"
      ]
     },
     "shipmentId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "agreementId",
     "createdAt",
     "id",
     "productId",
     "reasons",
     "receiverCountryCode",
     "receiverName",
     "status"
    ]
   },
   "CarrierCapabilityMatrix": {
    "type": "object",
    "properties": {
     "capabilities": {
      "type": "array",
      "items": {
       "type": "string",
       "enum": [
        "booking",
        "labels",
        "tracking",
        "void",
        "pickups",
        "service_points",
        "agreement_prices",
        "read_back",
        "test_mode",
        "returns",
        "customs",
        "dangerous_goods",
        "service_point_booking",
        "own_numbers",
        "freight",
        "freight_terms"
       ]
      }
     },
     "evidence": {
      "type": "string"
     },
     "carriers": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/CarrierCapabilityRow"
      }
     }
    },
    "required": [
     "capabilities",
     "carriers",
     "evidence"
    ]
   },
   "CarrierCapabilityRow": {
    "type": "object",
    "properties": {
     "carrierId": {
      "type": "string"
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     },
     "inCatalogue": {
      "type": "boolean"
     },
     "declared": {
      "type": "boolean"
     },
     "capabilities": {
      "type": "array",
      "items": {
       "type": "string",
       "enum": [
        "booking",
        "labels",
        "tracking",
        "void",
        "pickups",
        "service_points",
        "agreement_prices",
        "read_back",
        "test_mode",
        "returns",
        "customs",
        "dangerous_goods",
        "service_point_booking",
        "own_numbers",
        "freight",
        "freight_terms"
       ]
      }
     },
     "labelFormats": {
      "type": "array",
      "items": {
       "type": "string",
       "enum": [
        "pdf",
        "zpl",
        "png"
       ]
      }
     },
     "voidMode": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "cancels",
       "lapses_unused",
       "cancel_with_carrier",
       null
      ]
     }
    },
    "required": [
     "capabilities",
     "carrierId",
     "declared",
     "inCatalogue",
     "labelFormats"
    ]
   },
   "CarrierView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "logoSquare": {
      "type": [
       "string",
       "null"
      ]
     },
     "logoWide": {
      "type": [
       "string",
       "null"
      ]
     },
     "products": {
      "type": "integer",
      "format": "int32"
     },
     "fees": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/FeeView"
      }
     },
     "retired": {
      "type": "boolean"
     }
    },
    "required": [
     "fees",
     "id",
     "name",
     "products",
     "retired"
    ]
   },
   "CheckoutAddress": {
    "type": "object",
    "properties": {
     "country": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z]{2}"
     },
     "postalCode": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9 -]{1,12}"
     },
     "city": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "addressLine1": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 0
     },
     "addressLine2": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 0
     },
     "company": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 0
     },
     "phone": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 40,
      "minLength": 0
     }
    }
   },
   "CheckoutItem": {
    "type": "object",
    "properties": {
     "sku": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "quantity": {
      "type": "integer",
      "format": "int32",
      "maximum": 100000,
      "minimum": 1
     },
     "grams": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32",
      "minimum": 0
     },
     "unitPriceMinor": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64",
      "minimum": 0
     }
    },
    "required": [
     "quantity"
    ]
   },
   "CheckoutPickupPoint": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     },
     "address": {
      "type": [
       "string",
       "null"
      ]
     },
     "distanceKm": {
      "type": [
       "number",
       "null"
      ]
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "customerNumber": {
      "type": [
       "string",
       "null"
      ]
     },
     "pointType": {
      "type": [
       "string",
       "null"
      ]
     },
     "openingHours": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    },
    "required": [
     "id",
     "openingHours"
    ]
   },
   "CheckoutPickupPoints": {
    "type": "object",
    "properties": {
     "points": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/CheckoutPickupPoint"
      }
     }
    },
    "required": [
     "points"
    ]
   },
   "CheckoutRate": {
    "type": "object",
    "properties": {
     "methodId": {
      "type": "string",
      "format": "uuid"
     },
     "code": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "priceMinor": {
      "type": "integer",
      "format": "int64"
     },
     "currency": {
      "type": "string"
     },
     "priceSource": {
      "type": "string",
      "enum": [
       "carrier",
       "markup",
       "flat",
       "price_rule",
       "order_value_range",
       "postal_code_range",
       "weight_range",
       "fallback",
       "free"
      ]
     },
     "minDeliveryDate": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "maxDeliveryDate": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "pickupPoint": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/PickupPointOption"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [
     "code",
     "currency",
     "methodId",
     "name",
     "priceMinor",
     "priceSource"
    ]
   },
   "CheckoutRatesAnswer": {
    "type": "object",
    "properties": {
     "originId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "rates": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/CheckoutRate"
      }
     },
     "skipped": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/CheckoutSkipped"
      }
     }
    },
    "required": [
     "rates",
     "skipped"
    ]
   },
   "CheckoutRatesRequest": {
    "type": "object",
    "properties": {
     "originId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "originRef": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 1
     },
     "origin": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/CheckoutAddress"
       },
       {
        "type": "null"
       }
      ]
     },
     "destination": {
      "$ref": "#/components/schemas/CheckoutAddress"
     },
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/CheckoutItem"
      },
      "maxItems": 500,
      "minItems": 0
     },
     "orderValueMinor": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64",
      "minimum": 0
     },
     "currency": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Z]{3}"
     },
     "connectionId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     }
    },
    "required": [
     "currency",
     "destination",
     "items"
    ]
   },
   "CheckoutSkipped": {
    "type": "object",
    "properties": {
     "methodId": {
      "type": "string",
      "format": "uuid"
     },
     "reason": {
      "type": "string"
     }
    },
    "required": [
     "methodId",
     "reason"
    ]
   },
   "FeeView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "amount": {
      "type": "number"
     },
     "pipOrUnattended": {
      "type": "boolean"
     }
    },
    "required": [
     "amount",
     "id",
     "name",
     "pipOrUnattended"
    ]
   },
   "Finding": {
    "type": "object",
    "properties": {
     "ruleId": {
      "type": "string"
     },
     "packageIndex": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "value": {
      "type": "string"
     },
     "actual": {
      "type": [
       "number",
       "null"
      ]
     },
     "unit": {
      "type": [
       "string",
       "null"
      ]
     },
     "outcome": {
      "type": "string",
      "enum": [
       "failed",
       "not_checked",
       "unknown"
      ]
     },
     "reason": {
      "type": "string"
     }
    },
    "required": [
     "outcome",
     "reason",
     "ruleId",
     "value"
    ]
   },
   "InternalBookingCheck": {
    "type": "object",
    "properties": {
     "productId": {
      "type": "string"
     },
     "available": {
      "type": "boolean"
     },
     "passed": {
      "type": "boolean"
     },
     "enforced": {
      "type": "boolean"
     },
     "findings": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/Finding"
      }
     },
     "pickupPoint": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "found",
       "unknown",
       "not_checked",
       null
      ]
     }
    },
    "required": [
     "available",
     "enforced",
     "findings",
     "passed",
     "productId"
    ]
   },
   "InternalBookingCustoms": {
    "type": "object",
    "properties": {
     "currency": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z]{3}"
     },
     "reason": {
      "type": "string",
      "enum": [
       "sale",
       "gift",
       "sample",
       "return",
       "repair",
       "other"
      ]
     },
     "invoiceNumber": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 35,
      "minLength": 0
     },
     "invoiceDate": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "incoterm": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z]{3}"
     },
     "eori": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9]{1,20}"
     },
     "voecNumber": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9 -]{1,35}"
     },
     "declarationNumber": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9]{1,70}"
     },
     "lines": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalBookingCustomsLine"
      },
      "maxItems": 100,
      "minItems": 0
     }
    },
    "required": [
     "currency",
     "lines",
     "reason"
    ]
   },
   "InternalBookingCustomsLine": {
    "type": "object",
    "properties": {
     "description": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "hsCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[0-9]{6,14}"
     },
     "originCountryCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z]{2}"
     },
     "quantity": {
      "type": "integer",
      "format": "int32",
      "exclusiveMinimum": 0,
      "maximum": 1000000
     },
     "unitValue": {
      "type": "number",
      "maximum": 100000000,
      "minimum": 0
     },
     "netWeightKg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100000
     }
    },
    "required": [
     "description",
     "hsCode",
     "netWeightKg",
     "originCountryCode",
     "quantity",
     "unitValue"
    ]
   },
   "InternalBookingDangerousGoods": {
    "type": "object",
    "properties": {
     "parcelIndex": {
      "type": "integer",
      "format": "int32",
      "maximum": 49,
      "minimum": 0
     },
     "unNumber": {
      "type": "string",
      "minLength": 1,
      "pattern": "[0-9]{4}"
     },
     "hazardClass": {
      "type": "string",
      "minLength": 1,
      "pattern": "[1-9](\\.[1-6])?"
     },
     "packingGroup": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "I|II|III"
     },
     "properShippingName": {
      "type": "string",
      "maxLength": 200,
      "minLength": 0
     },
     "netQuantityKg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 10000
     },
     "limitedQuantity": {
      "type": "boolean"
     }
    },
    "required": [
     "hazardClass",
     "limitedQuantity",
     "netQuantityKg",
     "parcelIndex",
     "properShippingName",
     "unNumber"
    ]
   },
   "InternalBookingFreightTerms": {
    "type": "object",
    "properties": {
     "payer": {
      "type": "string",
      "enum": [
       "sender",
       "receiver",
       "third_party"
      ]
     },
     "payerCustomerNumber": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9-]{1,35}"
     },
     "thirdParty": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalBookingParty"
       },
       {
        "type": "null"
       }
      ]
     },
     "incoterm": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z]{3}"
     }
    },
    "required": [
     "payer"
    ]
   },
   "InternalBookingParcel": {
    "type": "object",
    "properties": {
     "weightKg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 10000
     },
     "lengthCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1400
     },
     "widthCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     },
     "heightCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     },
     "description": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "unit": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "parcel",
       "carton",
       "eur_pallet",
       "half_pallet",
       "quarter_pallet",
       "one_way_pallet",
       "roll_cage",
       "other_floor_unit",
       null
      ]
     },
     "loadingMetres": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 100
     },
     "stackable": {
      "type": [
       "boolean",
       "null"
      ]
     }
    },
    "required": [
     "weightKg"
    ]
   },
   "InternalBookingParty": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "contactName": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "address1": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "address2": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "postalCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z0-9 -]{1,12}"
     },
     "city": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "countryCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z]{2}"
     },
     "phone": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 40,
      "minLength": 0
     },
     "email": {
      "type": [
       "string",
       "null"
      ],
      "format": "email",
      "maxLength": 200,
      "minLength": 0
     }
    },
    "required": [
     "address1",
     "countryCode",
     "name",
     "postalCode"
    ]
   },
   "InternalBookingRequest": {
    "type": "object",
    "properties": {
     "agreementId": {
      "type": "string",
      "format": "uuid"
     },
     "productId": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z0-9_-]{1,80}"
     },
     "sender": {
      "$ref": "#/components/schemas/InternalBookingParty"
     },
     "receiver": {
      "$ref": "#/components/schemas/InternalBookingParty"
     },
     "parcels": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalBookingParcel"
      },
      "maxItems": 50,
      "minItems": 0
     },
     "reference": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 35,
      "minLength": 0
     },
     "services": {
      "type": [
       "array",
       "null"
      ],
      "items": {
       "type": "string",
       "pattern": "[A-Za-z0-9_-]{1,80}"
      },
      "maxItems": 20,
      "minItems": 0
     },
     "pickupPointId": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9_-]{1,40}"
     },
     "isReturn": {
      "type": [
       "boolean",
       "null"
      ]
     },
     "routedFrom": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalBookingRoutedFrom"
       },
       {
        "type": "null"
       }
      ]
     },
     "client": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/PriceClient"
       },
       {
        "type": "null"
       }
      ]
     },
     "shippingDate": {
      "type": [
       "string",
       "null"
      ],
      "format": "date"
     },
     "labelFormat": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "pdf",
       "zpl",
       "png",
       null
      ]
     },
     "customs": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalBookingCustoms"
       },
       {
        "type": "null"
       }
      ]
     },
     "freightTerms": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalBookingFreightTerms"
       },
       {
        "type": "null"
       }
      ]
     },
     "allocation": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/BookingAllocation"
       },
       {
        "type": "null"
       }
      ]
     },
     "dangerousGoods": {
      "type": [
       "array",
       "null"
      ],
      "items": {
       "$ref": "#/components/schemas/InternalBookingDangerousGoods"
      },
      "maxItems": 10,
      "minItems": 0
     }
    },
    "required": [
     "agreementId",
     "parcels",
     "productId",
     "receiver",
     "sender"
    ]
   },
   "InternalBookingRoutedFrom": {
    "type": "object",
    "properties": {
     "productId": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z0-9_-]{1,80}"
     },
     "agreementId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "reason": {
      "type": "string",
      "minLength": 1,
      "pattern": "[a-z][a-z_]{0,39}"
     }
    },
    "required": [
     "productId",
     "reason"
    ]
   },
   "InternalPickupAddress": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "contactName": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "address1": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "address2": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "postalCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z0-9 -]{1,12}"
     },
     "city": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "countryCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z]{2}"
     },
     "phone": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 40,
      "minLength": 0
     },
     "email": {
      "type": [
       "string",
       "null"
      ],
      "format": "email",
      "maxLength": 200,
      "minLength": 0
     }
    },
    "required": [
     "address1",
     "countryCode",
     "name",
     "postalCode"
    ]
   },
   "InternalPickupAnswer": {
    "type": "object",
    "properties": {
     "pickup": {
      "$ref": "#/components/schemas/InternalPickupView"
     },
     "replay": {
      "type": "boolean"
     }
    },
    "required": [
     "pickup",
     "replay"
    ]
   },
   "InternalPickupPage": {
    "type": "object",
    "properties": {
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalPickupView"
      }
     },
     "page": {
      "type": "integer",
      "format": "int32"
     },
     "size": {
      "type": "integer",
      "format": "int32"
     },
     "hasMore": {
      "type": "boolean"
     }
    },
    "required": [
     "hasMore",
     "items",
     "page",
     "size"
    ]
   },
   "InternalPickupRequest": {
    "type": "object",
    "properties": {
     "agreementId": {
      "type": "string",
      "format": "uuid"
     },
     "date": {
      "type": "string",
      "format": "date"
     },
     "readyAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "time-local"
     },
     "closesAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "time-local"
     },
     "address": {
      "$ref": "#/components/schemas/InternalPickupAddress"
     },
     "packages": {
      "type": "integer",
      "format": "int32",
      "maximum": 9999,
      "minimum": 0
     },
     "pallets": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32",
      "maximum": 999,
      "minimum": 0
     },
     "weightKg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100000
     },
     "volumeDm3": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32",
      "exclusiveMinimum": 0,
      "maximum": 1000000
     },
     "shipmentIds": {
      "type": [
       "array",
       "null"
      ],
      "items": {
       "type": "string",
       "format": "uuid"
      },
      "maxItems": 100,
      "minItems": 0
     },
     "instructions": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 0
     }
    },
    "required": [
     "address",
     "agreementId",
     "date",
     "packages",
     "weightKg"
    ]
   },
   "InternalPickupView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "carrierId": {
      "type": "string"
     },
     "agreementId": {
      "type": "string",
      "format": "uuid"
     },
     "status": {
      "type": "string"
     },
     "address": {
      "$ref": "#/components/schemas/InternalPickupAddress"
     },
     "date": {
      "type": "string",
      "format": "date"
     },
     "readyAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "time-local"
     },
     "closesAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "time-local"
     },
     "packages": {
      "type": "integer",
      "format": "int32"
     },
     "pallets": {
      "type": "integer",
      "format": "int32"
     },
     "weightKg": {
      "type": "number"
     },
     "volumeDm3": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "shipmentIds": {
      "type": "array",
      "items": {
       "type": "string",
       "format": "uuid"
      }
     },
     "instructions": {
      "type": [
       "string",
       "null"
      ]
     },
     "pickupNumber": {
      "type": [
       "string",
       "null"
      ]
     },
     "earliestAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "latestAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "bookedAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "cancelledAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "carrierCancelled": {
      "type": [
       "boolean",
       "null"
      ]
     }
    },
    "required": [
     "address",
     "agreementId",
     "carrierId",
     "createdAt",
     "date",
     "id",
     "packages",
     "pallets",
     "shipmentIds",
     "status",
     "weightKg"
    ]
   },
   "InternalQuote": {
    "type": "object",
    "properties": {
     "status": {
      "type": "string",
      "enum": [
       "priced",
       "unavailable",
       "hidden"
      ]
     },
     "source": {
      "type": "string"
     },
     "agreementId": {
      "type": "string",
      "format": "uuid"
     },
     "productId": {
      "type": "string"
     },
     "version": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "contentHash": {
      "type": [
       "string",
       "null"
      ]
     },
     "zone": {
      "type": [
       "string",
       "null"
      ]
     },
     "total": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/QuoteMoney"
       },
       {
        "type": "null"
       }
      ]
     },
     "components": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/QuoteComponent"
      }
     },
     "packages": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/QuotePackageWeight"
      }
     },
     "vatIncluded": {
      "type": "boolean"
     },
     "pricedAt": {
      "type": "string",
      "format": "date-time"
     },
     "reasons": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/QuoteReason"
      }
     },
     "sale": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/QuoteSale"
       },
       {
        "type": "null"
       }
      ]
     },
     "confidence": {
      "type": "string",
      "enum": [
       "firm",
       "indicative",
       "none"
      ]
     },
     "verifyLater": {
      "type": "boolean"
     },
     "snapshotAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     }
    },
    "required": [
     "agreementId",
     "components",
     "confidence",
     "packages",
     "pricedAt",
     "productId",
     "reasons",
     "source",
     "status",
     "vatIncluded",
     "verifyLater"
    ]
   },
   "InternalQuoteRequest": {
    "type": "object",
    "properties": {
     "agreementId": {
      "type": "string",
      "format": "uuid"
     },
     "productId": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z0-9_-]{1,80}"
     },
     "sender": {
      "$ref": "#/components/schemas/QuotePlace"
     },
     "receiver": {
      "$ref": "#/components/schemas/QuotePlace"
     },
     "parcels": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/QuoteParcel"
      },
      "maxItems": 50,
      "minItems": 1
     },
     "at": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "client": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/PriceClient"
       },
       {
        "type": "null"
       }
      ]
     },
     "services": {
      "type": "array",
      "items": {
       "type": "string",
       "pattern": "[A-Za-z0-9_-]{1,80}"
      },
      "maxItems": 50,
      "minItems": 0
     }
    },
    "required": [
     "agreementId",
     "parcels",
     "productId",
     "receiver",
     "sender",
     "services"
    ]
   },
   "InternalShipmentDeviation": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "trackingId": {
      "type": [
       "string",
       "null"
      ]
     },
     "kind": {
      "type": "string"
     },
     "carrierStatus": {
      "type": [
       "string",
       "null"
      ]
     },
     "openedAt": {
      "type": "string",
      "format": "date-time"
     },
     "closedAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "closedBy": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "id",
     "kind",
     "openedAt"
    ]
   },
   "InternalShipmentFreightTerms": {
    "type": "object",
    "properties": {
     "payer": {
      "type": "string",
      "enum": [
       "sender",
       "receiver",
       "third_party"
      ]
     },
     "payerCustomerNumber": {
      "type": [
       "string",
       "null"
      ]
     },
     "thirdParty": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalShipmentParty"
       },
       {
        "type": "null"
       }
      ]
     },
     "incoterm": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "payer"
    ]
   },
   "InternalShipmentPage": {
    "type": "object",
    "properties": {
     "items": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalShipmentView"
      }
     },
     "page": {
      "type": "integer",
      "format": "int32"
     },
     "size": {
      "type": "integer",
      "format": "int32"
     },
     "more": {
      "type": "boolean"
     }
    },
    "required": [
     "items",
     "more",
     "page",
     "size"
    ]
   },
   "InternalShipmentParty": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string"
     },
     "contactName": {
      "type": [
       "string",
       "null"
      ]
     },
     "address1": {
      "type": "string"
     },
     "address2": {
      "type": [
       "string",
       "null"
      ]
     },
     "postalCode": {
      "type": "string"
     },
     "city": {
      "type": [
       "string",
       "null"
      ]
     },
     "countryCode": {
      "type": "string"
     },
     "phone": {
      "type": [
       "string",
       "null"
      ]
     },
     "email": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "address1",
     "countryCode",
     "name",
     "postalCode"
    ]
   },
   "InternalShipmentPriceSource": {
    "type": "object",
    "properties": {
     "versionId": {
      "type": "string",
      "format": "uuid"
     },
     "version": {
      "type": "integer",
      "format": "int32"
     },
     "contentHash": {
      "type": "string"
     },
     "confidence": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "firm",
       "indicative",
       null
      ]
     }
    },
    "required": [
     "contentHash",
     "version",
     "versionId"
    ]
   },
   "InternalShipmentPrices": {
    "type": "object",
    "properties": {
     "carrier": {
      "type": [
       "number",
       "null"
      ]
     },
     "agreement": {
      "type": [
       "number",
       "null"
      ]
     },
     "client": {
      "type": [
       "number",
       "null"
      ]
     },
     "currency": {
      "type": "string"
     },
     "priceList": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalShipmentPriceSource"
       },
       {
        "type": "null"
       }
      ]
     },
     "sale": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalShipmentSale"
       },
       {
        "type": "null"
       }
      ]
     },
     "costHidden": {
      "type": "boolean"
     },
     "surcharges": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalShipmentSurchargeSource"
      }
     }
    },
    "required": [
     "costHidden",
     "currency",
     "surcharges"
    ]
   },
   "InternalShipmentRoutedFrom": {
    "type": "object",
    "properties": {
     "carrierId": {
      "type": "string"
     },
     "productId": {
      "type": "string"
     },
     "agreementId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "reason": {
      "type": "string"
     }
    },
    "required": [
     "carrierId",
     "productId",
     "reason"
    ]
   },
   "InternalShipmentSale": {
    "type": "object",
    "properties": {
     "kind": {
      "type": "string"
     },
     "ref": {
      "type": "string"
     },
     "clientPriceId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "clientPrice": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalShipmentPriceSource"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [
     "kind",
     "ref"
    ]
   },
   "InternalShipmentSurchargeSource": {
    "type": "object",
    "properties": {
     "seriesId": {
      "type": "string",
      "format": "uuid"
     },
     "seriesCode": {
      "type": "string"
     },
     "versionId": {
      "type": "string",
      "format": "uuid"
     },
     "versionNumber": {
      "type": "integer",
      "format": "int32"
     },
     "amount": {
      "type": "string",
      "format": "decimal"
     }
    },
    "required": [
     "amount",
     "seriesCode",
     "seriesId",
     "versionId",
     "versionNumber"
    ]
   },
   "InternalShipmentTracking": {
    "type": "object",
    "properties": {
     "shipmentId": {
      "type": "string",
      "format": "uuid"
     },
     "transportStatus": {
      "type": "string"
     },
     "transportStatusAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "events": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalShipmentTrackingEvent"
      }
     },
     "deviations": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalShipmentDeviation"
      }
     }
    },
    "required": [
     "deviations",
     "events",
     "shipmentId",
     "transportStatus"
    ]
   },
   "InternalShipmentTrackingEvent": {
    "type": "object",
    "properties": {
     "trackingId": {
      "type": [
       "string",
       "null"
      ]
     },
     "carrierStatus": {
      "type": "string"
     },
     "status": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "occurredAt": {
      "type": "string",
      "format": "date-time"
     },
     "source": {
      "type": "string"
     },
     "deviation": {
      "type": [
       "string",
       "null"
      ]
     },
     "actor": {
      "type": [
       "string",
       "null"
      ]
     },
     "reason": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "carrierStatus",
     "occurredAt",
     "source"
    ]
   },
   "InternalShipmentView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "engine": {
      "type": "string"
     },
     "carrierId": {
      "type": "string"
     },
     "agreementId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "productId": {
      "type": "string"
     },
     "status": {
      "type": "string"
     },
     "shipmentNumber": {
      "type": [
       "string",
       "null"
      ]
     },
     "trackingUrl": {
      "type": [
       "string",
       "null"
      ]
     },
     "sender": {
      "$ref": "#/components/schemas/InternalShipmentParty"
     },
     "receiver": {
      "$ref": "#/components/schemas/InternalShipmentParty"
     },
     "reference": {
      "type": [
       "string",
       "null"
      ]
     },
     "isReturn": {
      "type": "boolean"
     },
     "packages": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/PackageView"
      }
     },
     "prices": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalShipmentPrices"
       },
       {
        "type": "null"
       }
      ]
     },
     "hasLabel": {
      "type": "boolean"
     },
     "revision": {
      "type": "integer",
      "format": "int64"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     },
     "bookedAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "collectedAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "deliveredAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "routedFrom": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalShipmentRoutedFrom"
       },
       {
        "type": "null"
       }
      ]
     },
     "agreementOwner": {
      "type": "string",
      "enum": [
       "profrakt",
       "customer"
      ]
     },
     "billedBy": {
      "type": "string",
      "enum": [
       "profrakt",
       "carrier"
      ]
     },
     "co2eGrams": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64"
     },
     "transportStatus": {
      "type": "string"
     },
     "transportStatusAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "deviations": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/InternalShipmentDeviation"
      }
     },
     "freightTerms": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/InternalShipmentFreightTerms"
       },
       {
        "type": "null"
       }
      ]
     },
     "allocation": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/BookingAllocation"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [
     "agreementOwner",
     "billedBy",
     "carrierId",
     "createdAt",
     "deviations",
     "engine",
     "hasLabel",
     "id",
     "isReturn",
     "packages",
     "productId",
     "receiver",
     "revision",
     "sender",
     "status",
     "transportStatus"
    ]
   },
   "LabelLink": {
    "type": "object",
    "properties": {
     "url": {
      "type": "string",
      "format": "uri"
     },
     "expiresAt": {
      "type": "string",
      "format": "date-time"
     },
     "format": {
      "type": "string",
      "enum": [
       "pdf",
       "zpl",
       "png"
      ]
     }
    },
    "required": [
     "expiresAt",
     "format",
     "url"
    ]
   },
   "OrderReturnMethod": {
    "type": "object",
    "properties": {
     "methodId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "productId": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9_-]{1,80}"
     }
    }
   },
   "OrderReturnRequest": {
    "type": "object",
    "properties": {
     "order": {
      "$ref": "#/components/schemas/OrderShipmentOrder"
     },
     "returnMethod": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderReturnMethod"
       },
       {
        "type": "null"
       }
      ]
     },
     "customer": {
      "$ref": "#/components/schemas/OrderShipmentReceiver"
     },
     "originId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "originRef": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 1
     },
     "lines": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/OrderShipmentLine"
      },
      "maxItems": 500,
      "minItems": 0
     },
     "parcels": {
      "type": [
       "array",
       "null"
      ],
      "items": {
       "$ref": "#/components/schemas/OrderShipmentParcel"
      },
      "maxItems": 50,
      "minItems": 0
     },
     "pickupPoint": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentPickupPoint"
       },
       {
        "type": "null"
       }
      ]
     },
     "sendQrCode": {
      "type": [
       "boolean",
       "null"
      ]
     },
     "print": {
      "type": [
       "boolean",
       "null"
      ]
     },
     "printerId": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64",
      "exclusiveMinimum": 0
     }
    },
    "required": [
     "customer",
     "lines",
     "order"
    ]
   },
   "OrderShipmentCustoms": {
    "type": "object",
    "properties": {
     "contentsDescription": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 50,
      "minLength": 0
     },
     "incoterms": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "DAP|DDP"
     },
     "iossNumber": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9]{1,20}"
     },
     "declaration": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 1000,
      "minLength": 0
     },
     "lines": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/OrderShipmentCustomsLine"
      },
      "maxItems": 500,
      "minItems": 0
     }
    },
    "required": [
     "lines"
    ]
   },
   "OrderShipmentCustomsLine": {
    "type": "object",
    "properties": {
     "sku": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "title": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 300,
      "minLength": 0
     },
     "hsCode": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[0-9. ]{4,14}"
     },
     "originCountry": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z]{2}"
     },
     "description": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     }
    }
   },
   "OrderShipmentCustomsLinePreview": {
    "type": "object",
    "properties": {
     "sku": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": "string"
     },
     "hsCode": {
      "type": [
       "string",
       "null"
      ]
     },
     "originCountry": {
      "type": [
       "string",
       "null"
      ]
     },
     "quantity": {
      "type": "integer",
      "format": "int32"
     },
     "unitValue": {
      "type": "number"
     },
     "currency": {
      "type": "string"
     },
     "unitWeightKg": {
      "type": "number"
     }
    },
    "required": [
     "currency",
     "description",
     "quantity",
     "unitValue",
     "unitWeightKg"
    ]
   },
   "OrderShipmentCustomsPreview": {
    "type": "object",
    "properties": {
     "required": {
      "type": "boolean"
     },
     "kind": {
      "type": [
       "string",
       "null"
      ]
     },
     "lines": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/OrderShipmentCustomsLinePreview"
      }
     },
     "missing": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    },
    "required": [
     "lines",
     "missing",
     "required"
    ]
   },
   "OrderShipmentLine": {
    "type": "object",
    "properties": {
     "sku": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "title": {
      "type": "string",
      "maxLength": 300,
      "minLength": 0
     },
     "quantity": {
      "type": "integer",
      "format": "int32",
      "maximum": 100000,
      "minimum": 1
     },
     "grams": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32",
      "maximum": 1000000,
      "minimum": 0
     },
     "unitPriceMinor": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64",
      "minimum": 0
     },
     "hsCode": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[0-9. ]{4,14}"
     },
     "originCountry": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z]{2}"
     }
    },
    "required": [
     "quantity",
     "title"
    ]
   },
   "OrderShipmentMethod": {
    "type": "object",
    "properties": {
     "methodId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "shippingCode": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 300,
      "minLength": 0
     },
     "shippingTitle": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 300,
      "minLength": 0
     }
    }
   },
   "OrderShipmentMoney": {
    "type": "object",
    "properties": {
     "priceMinor": {
      "type": "integer",
      "format": "int64"
     },
     "currency": {
      "type": "string"
     }
    },
    "required": [
     "currency",
     "priceMinor"
    ]
   },
   "OrderShipmentOrder": {
    "type": "object",
    "properties": {
     "source": {
      "type": "string",
      "minLength": 1,
      "pattern": "[a-z][a-z0-9_]{0,30}"
     },
     "connectionId": {
      "type": "string",
      "format": "uuid"
     },
     "externalOrderId": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "orderName": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "groupKey": {
      "type": "string",
      "maxLength": 2000,
      "minLength": 0
     },
     "fulfillmentOrderIds": {
      "type": "array",
      "items": {
       "type": "string",
       "maxLength": 200,
       "minLength": 0
      },
      "maxItems": 50,
      "minItems": 0
     },
     "currency": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Z]{3}"
     }
    },
    "required": [
     "connectionId",
     "externalOrderId",
     "fulfillmentOrderIds",
     "groupKey",
     "orderName",
     "source"
    ]
   },
   "OrderShipmentParcel": {
    "type": "object",
    "properties": {
     "weightKg": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     },
     "lengthCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     },
     "widthCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     },
     "heightCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     }
    }
   },
   "OrderShipmentPickupPoint": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z0-9._-]{1,40}"
     },
     "customerNumber": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9_-]{1,64}"
     },
     "pointType": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9_-]{1,64}"
     },
     "name": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "address1": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "postalCode": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9 -]{1,12}"
     },
     "city": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "country": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z]{2}"
     }
    },
    "required": [
     "id"
    ]
   },
   "OrderShipmentPreview": {
    "type": "object",
    "properties": {
     "method": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentPreviewMethod"
       },
       {
        "type": "null"
       }
      ]
     },
     "methodReason": {
      "type": [
       "string",
       "null"
      ]
     },
     "origin": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentPreviewOrigin"
       },
       {
        "type": "null"
       }
      ]
     },
     "originReason": {
      "type": [
       "string",
       "null"
      ]
     },
     "parcels": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/OrderShipmentPreviewParcel"
      }
     },
     "priceEstimate": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentMoney"
       },
       {
        "type": "null"
       }
      ]
     },
     "customs": {
      "$ref": "#/components/schemas/OrderShipmentCustomsPreview"
     },
     "defaultServices": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "availableServices": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/OrderShipmentServiceOption"
      }
     },
     "pickupPointRequired": {
      "type": "boolean"
     },
     "singleLabel": {
      "type": "boolean"
     },
     "fulfil": {
      "type": "boolean"
     }
    },
    "required": [
     "availableServices",
     "customs",
     "defaultServices",
     "fulfil",
     "parcels",
     "pickupPointRequired",
     "singleLabel"
    ]
   },
   "OrderShipmentPreviewMethod": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "code": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "carrierName": {
      "type": "string"
     },
     "productId": {
      "type": "string"
     },
     "engine": {
      "type": "string"
     }
    },
    "required": [
     "carrierName",
     "code",
     "engine",
     "id",
     "name",
     "productId"
    ]
   },
   "OrderShipmentPreviewOrigin": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid"
     },
     "name": {
      "type": "string"
     },
     "printerId": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64"
     }
    },
    "required": [
     "id",
     "name"
    ]
   },
   "OrderShipmentPreviewParcel": {
    "type": "object",
    "properties": {
     "weightKg": {
      "type": "number"
     },
     "lengthCm": {
      "type": [
       "number",
       "null"
      ]
     },
     "widthCm": {
      "type": [
       "number",
       "null"
      ]
     },
     "heightCm": {
      "type": [
       "number",
       "null"
      ]
     }
    },
    "required": [
     "weightKg"
    ]
   },
   "OrderShipmentReceiver": {
    "type": "object",
    "properties": {
     "name": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "company": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "contactName": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "address1": {
      "type": "string",
      "maxLength": 100,
      "minLength": 0
     },
     "address2": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "postalCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z0-9 -]{1,12}"
     },
     "city": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 100,
      "minLength": 0
     },
     "countryCode": {
      "type": "string",
      "minLength": 1,
      "pattern": "[A-Za-z]{2}"
     },
     "phone": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 40,
      "minLength": 0
     },
     "email": {
      "type": [
       "string",
       "null"
      ],
      "format": "email",
      "maxLength": 200,
      "minLength": 0
     }
    },
    "required": [
     "address1",
     "countryCode",
     "name",
     "postalCode"
    ]
   },
   "OrderShipmentReprintRequest": {
    "type": "object",
    "properties": {
     "print": {
      "type": [
       "boolean",
       "null"
      ]
     },
     "printerId": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64",
      "exclusiveMinimum": 0
     },
     "copies": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32",
      "maximum": 10,
      "minimum": 1
     }
    }
   },
   "OrderShipmentReprintResult": {
    "type": "object",
    "properties": {
     "shipmentId": {
      "type": "string",
      "format": "uuid"
     },
     "trackingNumber": {
      "type": "string"
     },
     "trackingUrl": {
      "type": [
       "string",
       "null"
      ]
     },
     "labelPdf": {
      "type": [
       "string",
       "null"
      ],
      "format": "byte"
     },
     "printed": {
      "type": "boolean"
     },
     "copies": {
      "type": "integer",
      "format": "int32"
     }
    },
    "required": [
     "copies",
     "printed",
     "shipmentId",
     "trackingNumber"
    ]
   },
   "OrderShipmentRequest": {
    "type": "object",
    "properties": {
     "order": {
      "$ref": "#/components/schemas/OrderShipmentOrder"
     },
     "method": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentMethod"
       },
       {
        "type": "null"
       }
      ]
     },
     "originId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "originRef": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 1
     },
     "receiver": {
      "$ref": "#/components/schemas/OrderShipmentReceiver"
     },
     "lines": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/OrderShipmentLine"
      },
      "maxItems": 500,
      "minItems": 0
     },
     "parcels": {
      "type": [
       "array",
       "null"
      ],
      "items": {
       "$ref": "#/components/schemas/OrderShipmentParcel"
      },
      "maxItems": 50,
      "minItems": 0
     },
     "pickupPoint": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentPickupPoint"
       },
       {
        "type": "null"
       }
      ]
     },
     "services": {
      "type": [
       "array",
       "null"
      ],
      "items": {
       "type": "string",
       "minLength": 1,
       "pattern": "[A-Za-z0-9_.-]{1,80}"
      },
      "maxItems": 20,
      "minItems": 0
     },
     "customs": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentCustoms"
       },
       {
        "type": "null"
       }
      ]
     },
     "print": {
      "type": [
       "boolean",
       "null"
      ]
     },
     "printerId": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64",
      "exclusiveMinimum": 0
     },
     "returnLabel": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentReturnLabel"
       },
       {
        "type": "null"
       }
      ]
     },
     "mode": {
      "type": [
       "string",
       "null"
      ],
      "enum": [
       "manual",
       "auto",
       "third_party",
       null
      ]
     },
     "fulfil": {
      "type": [
       "boolean",
       "null"
      ]
     }
    },
    "required": [
     "lines",
     "order",
     "receiver"
    ]
   },
   "OrderShipmentResult": {
    "type": "object",
    "properties": {
     "shipmentId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "methodId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "code": {
      "type": [
       "string",
       "null"
      ]
     },
     "engine": {
      "type": [
       "string",
       "null"
      ]
     },
     "carrierName": {
      "type": [
       "string",
       "null"
      ]
     },
     "trackingNumber": {
      "type": [
       "string",
       "null"
      ]
     },
     "trackingUrl": {
      "type": [
       "string",
       "null"
      ]
     },
     "labelPdf": {
      "type": [
       "string",
       "null"
      ],
      "format": "byte"
     },
     "printed": {
      "type": "boolean"
     },
     "replay": {
      "type": "boolean"
     },
     "fulfil": {
      "type": "boolean"
     },
     "isReturn": {
      "type": "boolean"
     },
     "returnShipment": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentReturn"
       },
       {
        "type": "null"
       }
      ]
     },
     "returnError": {
      "type": [
       "string",
       "null"
      ]
     },
     "skipped": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/OrderShipmentSkipped"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [
     "fulfil",
     "isReturn",
     "printed",
     "replay"
    ]
   },
   "OrderShipmentReturn": {
    "type": "object",
    "properties": {
     "shipmentId": {
      "type": "string",
      "format": "uuid"
     },
     "trackingNumber": {
      "type": "string"
     },
     "trackingUrl": {
      "type": [
       "string",
       "null"
      ]
     },
     "labelPdf": {
      "type": [
       "string",
       "null"
      ],
      "format": "byte"
     },
     "printed": {
      "type": "boolean"
     }
    },
    "required": [
     "printed",
     "shipmentId",
     "trackingNumber"
    ]
   },
   "OrderShipmentReturnLabel": {
    "type": "object",
    "properties": {
     "methodId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "returnProductId": {
      "type": [
       "string",
       "null"
      ],
      "pattern": "[A-Za-z0-9_-]{1,80}"
     },
     "sendQrCode": {
      "type": [
       "boolean",
       "null"
      ]
     }
    }
   },
   "OrderShipmentRow": {
    "type": "object",
    "properties": {
     "shipmentId": {
      "type": "string",
      "format": "uuid"
     },
     "source": {
      "type": "string"
     },
     "connectionId": {
      "type": "string",
      "format": "uuid"
     },
     "externalOrderId": {
      "type": "string"
     },
     "orderName": {
      "type": "string"
     },
     "groupKey": {
      "type": "string"
     },
     "fulfillmentOrderIds": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "mode": {
      "type": "string"
     },
     "methodId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "code": {
      "type": [
       "string",
       "null"
      ]
     },
     "engine": {
      "type": "string"
     },
     "carrierId": {
      "type": "string"
     },
     "carrierName": {
      "type": "string"
     },
     "productId": {
      "type": "string"
     },
     "trackingNumber": {
      "type": "string"
     },
     "trackingUrl": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "type": "string"
     },
     "fulfil": {
      "type": "boolean"
     },
     "isReturn": {
      "type": "boolean"
     },
     "parentId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "printed": {
      "type": "boolean"
     },
     "createdAt": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "carrierId",
     "carrierName",
     "connectionId",
     "createdAt",
     "engine",
     "externalOrderId",
     "fulfil",
     "fulfillmentOrderIds",
     "groupKey",
     "isReturn",
     "mode",
     "orderName",
     "printed",
     "productId",
     "shipmentId",
     "source",
     "status",
     "trackingNumber"
    ]
   },
   "OrderShipmentServiceOption": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "id"
    ]
   },
   "OrderShipmentSkipped": {
    "type": "object",
    "properties": {
     "reason": {
      "type": "string"
     }
    },
    "required": [
     "reason"
    ]
   },
   "PackageView": {
    "type": "object",
    "properties": {
     "position": {
      "type": "integer",
      "format": "int32"
     },
     "trackingId": {
      "type": [
       "string",
       "null"
      ]
     },
     "weightGrams": {
      "type": "integer",
      "format": "int32"
     },
     "lengthMm": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "widthMm": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "heightMm": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     },
     "status": {
      "type": [
       "string",
       "null"
      ]
     },
     "statusAt": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "unit": {
      "type": [
       "string",
       "null"
      ],
      "description": "The unit of goods (B2BTMS-01): parcel, carton, eur_pallet, half_pallet, quarter_pallet, one_way_pallet, roll_cage or other_floor_unit; null for a parcel booked before units"
     },
     "loadingMetres": {
      "type": [
       "number",
       "null"
      ]
     },
     "stackable": {
      "type": [
       "boolean",
       "null"
      ]
     }
    },
    "required": [
     "position",
     "weightGrams"
    ]
   },
   "PickupPointOption": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": [
       "string",
       "null"
      ]
     },
     "addressLine1": {
      "type": [
       "string",
       "null"
      ]
     },
     "addressLine2": {
      "type": [
       "string",
       "null"
      ]
     },
     "postalCode": {
      "type": [
       "string",
       "null"
      ]
     },
     "city": {
      "type": [
       "string",
       "null"
      ]
     },
     "country": {
      "type": [
       "string",
       "null"
      ]
     },
     "distanceKm": {
      "type": [
       "number",
       "null"
      ]
     },
     "openingHours": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "customerNumber": {
      "type": [
       "string",
       "null"
      ]
     },
     "pointType": {
      "type": [
       "string",
       "null"
      ]
     },
     "description": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "id",
     "openingHours"
    ]
   },
   "PostalCodeView": {
    "type": "object",
    "properties": {
     "countryCode": {
      "type": "string"
     },
     "postalCode": {
      "type": "string"
     },
     "city": {
      "type": [
       "string",
       "null"
      ]
     },
     "latitude": {
      "type": [
       "number",
       "null"
      ],
      "format": "double"
     },
     "longitude": {
      "type": [
       "number",
       "null"
      ],
      "format": "double"
     },
     "terminals": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/TerminalView"
      }
     }
    },
    "required": [
     "countryCode",
     "postalCode",
     "terminals"
    ]
   },
   "PriceClient": {
    "type": "object",
    "properties": {
     "kind": {
      "type": "string",
      "enum": [
       "organization",
       "party",
       "customer"
      ]
     },
     "ref": {
      "type": "string",
      "pattern": "[A-Za-z0-9][A-Za-z0-9._:-]{0,79}"
     },
     "name": {
      "type": [
       "string",
       "null"
      ],
      "maxLength": 200,
      "minLength": 1
     }
    },
    "required": [
     "kind",
     "ref"
    ]
   },
   "ProblemDetail": {
    "type": "object",
    "properties": {
     "type": {
      "type": "string",
      "format": "uri"
     },
     "title": {
      "type": "string"
     },
     "status": {
      "type": "integer",
      "format": "int32"
     },
     "detail": {
      "type": "string",
      "description": "In the language of Content-Language"
     },
     "instance": {
      "type": "string",
      "format": "uri"
     },
     "code": {
      "type": "string",
      "description": "A refusal's stable code, such as drive_trashed"
     },
     "parameters": {
      "type": "object",
      "description": "The values the refusal's detail names"
     },
     "errors": {
      "type": "array",
      "description": "Only when a request fails validation",
      "items": {
       "type": "object",
       "properties": {
        "field": {
         "type": [
          "string",
          "null"
         ],
         "description": "The path in the request body, such as stops[0].latitude"
        },
        "message": {
         "type": "string",
         "description": "In the language of Content-Language"
        },
        "code": {
         "type": "string",
         "description": "The constraint in lower snake case, such as not_blank or size"
        },
        "parameters": {
         "type": "object",
         "description": "The constraint's attributes, such as min and max"
        }
       }
      }
     }
    }
   },
   "ProductView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "carrierId": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "originalId": {
      "type": [
       "string",
       "null"
      ]
     },
     "isReturn": {
      "type": "boolean"
     },
     "isB2b": {
      "type": "boolean"
     },
     "isProfrakt": {
      "type": "boolean"
     },
     "sendsFrom": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "deliversTo": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "rules": {
      "type": "object",
      "additionalProperties": {
       "type": "string"
      }
     },
     "services": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ServiceView"
      }
     },
     "items": {
      "type": "array",
      "items": {
       "type": "string"
      }
     },
     "retired": {
      "type": "boolean"
     }
    },
    "required": [
     "carrierId",
     "deliversTo",
     "id",
     "isB2b",
     "isProfrakt",
     "isReturn",
     "items",
     "name",
     "retired",
     "rules",
     "sendsFrom",
     "services"
    ]
   },
   "QuoteComponent": {
    "type": "object",
    "properties": {
     "kind": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "packageNumber": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "amount": {
      "$ref": "#/components/schemas/QuoteMoney"
     },
     "basis": {
      "type": "string"
     },
     "surcharge": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/SurchargeEvidence"
       },
       {
        "type": "null"
       }
      ]
     }
    },
    "required": [
     "amount",
     "basis",
     "kind",
     "name"
    ]
   },
   "QuoteMoney": {
    "type": "object",
    "properties": {
     "minor": {
      "type": "integer",
      "format": "int64"
     },
     "currency": {
      "type": "string"
     }
    },
    "required": [
     "currency",
     "minor"
    ]
   },
   "QuotePackageWeight": {
    "type": "object",
    "properties": {
     "number": {
      "type": "integer",
      "format": "int32"
     },
     "actualGrams": {
      "type": "integer",
      "format": "int64"
     },
     "volumeGrams": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64"
     },
     "chargeableGrams": {
      "type": "integer",
      "format": "int64"
     },
     "loadingMetreGrams": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int64"
     }
    },
    "required": [
     "actualGrams",
     "chargeableGrams",
     "number"
    ]
   },
   "QuoteParcel": {
    "type": "object",
    "properties": {
     "weightKg": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 10000
     },
     "lengthCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1400
     },
     "widthCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     },
     "heightCm": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 1000
     },
     "loadingMetres": {
      "type": [
       "number",
       "null"
      ],
      "exclusiveMinimum": 0,
      "maximum": 100
     }
    },
    "required": [
     "weightKg"
    ]
   },
   "QuotePlace": {
    "type": "object",
    "properties": {
     "countryCode": {
      "type": "string",
      "pattern": "[A-Za-z]{2}"
     },
     "postalCode": {
      "type": "string",
      "pattern": "[A-Za-z0-9 -]{1,12}"
     }
    },
    "required": [
     "countryCode",
     "postalCode"
    ]
   },
   "QuoteReason": {
    "type": "object",
    "properties": {
     "code": {
      "type": "string"
     },
     "message": {
      "type": "string"
     }
    },
    "required": [
     "code",
     "message"
    ]
   },
   "QuoteSale": {
    "type": "object",
    "properties": {
     "status": {
      "type": "string"
     },
     "client": {
      "$ref": "#/components/schemas/PriceClient"
     },
     "clientPriceId": {
      "type": [
       "string",
       "null"
      ],
      "format": "uuid"
     },
     "version": {
      "type": [
       "integer",
       "null"
      ],
      "format": "int32"
     },
     "contentHash": {
      "type": [
       "string",
       "null"
      ]
     },
     "zone": {
      "type": [
       "string",
       "null"
      ]
     },
     "total": {
      "anyOf": [
       {
        "$ref": "#/components/schemas/QuoteMoney"
       },
       {
        "type": "null"
       }
      ]
     },
     "components": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/QuoteComponent"
      }
     },
     "reasons": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/QuoteReason"
      }
     }
    },
    "required": [
     "client",
     "components",
     "reasons",
     "status"
    ]
   },
   "ServiceView": {
    "type": "object",
    "properties": {
     "id": {
      "type": "string"
     },
     "name": {
      "type": "string"
     },
     "originalId": {
      "type": [
       "string",
       "null"
      ]
     },
     "type": {
      "type": [
       "string",
       "null"
      ]
     },
     "isDefault": {
      "type": "boolean"
     }
    },
    "required": [
     "id",
     "isDefault",
     "name"
    ]
   },
   "ShipmentDocumentLink": {
    "type": "object",
    "properties": {
     "url": {
      "type": "string",
      "format": "uri"
     },
     "format": {
      "type": "string"
     },
     "expiresAt": {
      "type": "string",
      "format": "date-time"
     }
    },
    "required": [
     "expiresAt",
     "format",
     "url"
    ]
   },
   "ShipmentDocumentList": {
    "type": "object",
    "properties": {
     "shipmentId": {
      "type": "string",
      "format": "uuid"
     },
     "carrierLabelFormat": {
      "type": "string"
     },
     "documents": {
      "type": "array",
      "items": {
       "$ref": "#/components/schemas/ShipmentDocumentView"
      }
     }
    },
    "required": [
     "carrierLabelFormat",
     "documents",
     "shipmentId"
    ]
   },
   "ShipmentDocumentView": {
    "type": "object",
    "properties": {
     "document": {
      "type": "string"
     },
     "formats": {
      "type": "array",
      "items": {
       "type": "string"
      }
     }
    },
    "required": [
     "document",
     "formats"
    ]
   },
   "SurchargeEvidence": {
    "type": "object",
    "properties": {
     "seriesId": {
      "type": "string",
      "format": "uuid"
     },
     "seriesCode": {
      "type": "string"
     },
     "component": {
      "type": "string",
      "enum": [
       "fuel",
       "currency",
       "roadtoll",
       "other"
      ]
     },
     "calculation": {
      "type": "string",
      "enum": [
       "percentoffreight",
       "pershipment",
       "perpackage"
      ]
     },
     "versionId": {
      "type": "string",
      "format": "uuid"
     },
     "versionNumber": {
      "type": "integer",
      "format": "int32"
     },
     "rate": {
      "type": "string",
      "format": "decimal"
     },
     "currency": {
      "type": [
       "string",
       "null"
      ]
     },
     "effectiveFrom": {
      "type": "string",
      "format": "date-time"
     },
     "effectiveTo": {
      "type": [
       "string",
       "null"
      ],
      "format": "date-time"
     },
     "end": {
      "type": "string",
      "enum": [
       "explicit",
       "next",
       "open"
      ]
     },
     "periodText": {
      "type": [
       "string",
       "null"
      ]
     },
     "source": {
      "type": "string"
     },
     "sourceRef": {
      "type": [
       "string",
       "null"
      ]
     },
     "reviewedAt": {
      "type": "string",
      "format": "date-time"
     },
     "reviewedBy": {
      "type": [
       "string",
       "null"
      ]
     }
    },
    "required": [
     "calculation",
     "component",
     "effectiveFrom",
     "end",
     "rate",
     "reviewedAt",
     "seriesCode",
     "seriesId",
     "source",
     "versionId",
     "versionNumber"
    ]
   },
   "TerminalView": {
    "type": "object",
    "properties": {
     "carrierId": {
      "type": "string"
     },
     "terminalCode": {
      "type": "string"
     },
     "rate": {
      "type": [
       "string",
       "null"
      ]
     },
     "roadToll": {
      "type": [
       "number",
       "null"
      ]
     }
    },
    "required": [
     "carrierId",
     "terminalCode"
    ]
   }
  }
 }
}
