{
  "openapi": "3.0.3",
  "info": {
    "title": "Foxdeli Service API",
    "description": "The Foxdeli API offers a seamless integration for managing delivery services, designed to enhance customer satisfaction throughout the delivery process. It uses JWT tokens for secure authentication, which must be provided in the HTTP header as 'X-API-Key' with each request. With our API, e-shops can ensure a smooth and reliable delivery experience, improving customer confidence and loyalty. This documentation provides all necessary endpoints and usage details to get started efficiently.",
    "version": "8.64.0"
  },
  "servers": [
    {
      "url": "https://api.foxdeli.com/customer",
      "description": "Production API server for live data"
    },
    {
      "url": "https://api.sandbox.foxdeli.com/customer",
      "description": "Sandbox API server for integration testing"
    }
  ],
  "externalDocs": {
    "description": "Foxdeli API documentation",
    "url": "https://apidoc.foxdeli.com/"
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "tags": [
    {
      "name": "Token",
      "description": "Token operations"
    },
    {
      "name": "Order [v1]",
      "description": "Orders operations"
    },
    {
      "name": "Parcel [v1]",
      "description": "Parcel operations"
    },
    {
      "name": "PickupPlace",
      "description": "PickupPlaces operations"
    }
  ],
  "paths": {
    "/api/v1/token/refresh": {
      "post": {
        "tags": [
          "Token"
        ],
        "summary": "Returns fresh API access token",
        "description": "Finds an account with provided refresh token if exists and returns new API access token.",
        "operationId": "refresh",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshTokenCommand"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Refresh successful, fresh access token created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPair"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPair"
                }
              }
            }
          },
          "400": {
            "description": "Constraint violation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid refresh token.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v1/token/authorize": {
      "post": {
        "tags": [
          "Token"
        ],
        "summary": "Authorize and return API access token",
        "description": "Finds an account with provided username and password, if exists and returns new API access token.",
        "operationId": "authorize",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Authorization"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Login successful, access token created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPair"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenPair"
                }
              }
            }
          },
          "400": {
            "description": "Constraint violation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Account with provided credentials was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Account not active.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/api/v1/order/{orderId}/parcel/{parcelId}/state": {
      "put": {
        "tags": [
          "Parcel [v1]"
        ],
        "summary": "Update state of existing parcel",
        "description": "Updates state of existing parcel",
        "operationId": "updateParcelState",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order this parcel belongs to",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parcelId",
            "in": "path",
            "description": "id of parcel to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Parcel data to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParcelStateUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Parcel state successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Parcel to update was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Transition to delivery state not allowed",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/{orderId}/cancel": {
      "put": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Cancel existing order",
        "description": "Updates existing order state to Cancelled",
        "operationId": "cancelOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order to cancel.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order state successfully cancelled.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Order to cancel was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order": {
      "get": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Find existing order by externalId",
        "description": "Find existing order by externalId",
        "operationId": "findOrderByExternalId",
        "parameters": [
          {
            "name": "externalId",
            "in": "query",
            "description": "external id of order to search for",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eshopId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order is found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Constraint violation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Order with provided id was not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Create new order",
        "description": "Creates new order.",
        "operationId": "createOrder",
        "requestBody": {
          "description": "Order data to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderRegistration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Order successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/{orderId}/proforma-invoice": {
      "post": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Upload order proforma invoice file",
        "description": "Upload proforma invoice file and store it under order",
        "operationId": "uploadProformaInvoice",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order to attach proforma invoice to",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "File(s) successfully uploaded and saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              }
            }
          },
          "400": {
            "description": "Uploaded file is empty",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "413": {
            "description": "Uploaded file is larger than 10MB",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/{orderId}/parcel": {
      "post": {
        "tags": [
          "Parcel [v1]"
        ],
        "summary": "Create parcel",
        "description": "Creates new parcel for order",
        "operationId": "createParcel",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order this parcel belongs to",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Parcel data to create.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParcelRegistration"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Parcel successfully created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Order was not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/{orderId}/invoice": {
      "post": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Upload order invoice file",
        "description": "Upload invoice file and store it under order",
        "operationId": "uploadInvoice",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order to attach invoice to",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "File(s) successfully uploaded and saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              }
            }
          },
          "400": {
            "description": "Uploaded file is empty",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "413": {
            "description": "Uploaded file is larger than 10MB",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/{orderId}/file": {
      "post": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Upload file to order",
        "description": "Upload file and store it under order id.\n File will be attached to order communication emails.",
        "operationId": "uploadFile",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order to attach file to",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "description": "optional name of file. if not provided, name is derived from original file name of uploaded file",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "File successfully uploaded and saved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              }
            }
          },
          "400": {
            "description": "Uploaded file is empty",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "413": {
            "description": "Uploaded file is larger than 1MB",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/{orderId}": {
      "get": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Find existing order",
        "description": "Find existing order by id",
        "operationId": "findOrderById",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order to search for",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Order is found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Constraint violation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Order with provided id was not found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Update existing order",
        "description": "Updates existing order",
        "operationId": "updateOrder",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Order data to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Order successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Order to update was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Attempt to remove a product that is already contained in a parcel",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/{orderId}/parcel/{parcelId}": {
      "get": {
        "tags": [
          "Parcel [v1]"
        ],
        "summary": "Get existing parcel",
        "description": "Finds existing parcel from order.",
        "operationId": "findParcelById",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order this parcel belongs to",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parcelId",
            "in": "path",
            "description": "id of parcel to find.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Parcel is found.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              }
            }
          },
          "400": {
            "description": "Constraint violation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Parcel or order doesn't exist.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Parcel [v1]"
        ],
        "summary": "Delete existing parcel",
        "description": "Delete existing parcel.",
        "operationId": "deleteParcel",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order this parcel belongs to",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parcelId",
            "in": "path",
            "description": "id of parcel to delete.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Parcel successfully deleted."
          },
          "400": {
            "description": "Constraint violation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Parcel to delete or order was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Parcel [v1]"
        ],
        "summary": "Update existing parcel",
        "description": "Updates existing parcel.",
        "operationId": "updateParcel",
        "parameters": [
          {
            "name": "orderId",
            "in": "path",
            "description": "id of order this parcel belongs to",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "parcelId",
            "in": "path",
            "description": "id of parcel to update.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Parcel data to update.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ParcelUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Parcel successfully updated.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Parcel"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Parcel to update or order was not found.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Parcel references a product that is not contained in order this parcel belongs to",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/order/country": {
      "get": {
        "tags": [
          "Order [v1]"
        ],
        "summary": "Get all destination countries of all eshop orders",
        "description": "Get all (distinct) destination countries from all orders of the given eshop",
        "operationId": "getDestinationCountries",
        "parameters": [
          {
            "name": "eshopId",
            "in": "query",
            "description": "id of eshop",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of countries returned - pageable format but always all in one page",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponseCountryCode"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponseCountryCode"
                }
              }
            }
          },
          "400": {
            "description": "Constraint violation",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token provided.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "AccessDeniedException",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pickup-place": {
      "get": {
        "tags": [
          "PickupPlace"
        ],
        "summary": "Get eshop pickup places",
        "description": "Find all existing pickup places for an e-shop",
        "operationId": "getAllEshopPickupPlaces",
        "parameters": [
          {
            "name": "eshopId",
            "in": "query",
            "description": "UUID of eshop",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "schema": {
              "type": "integer",
              "default": 20
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pickup place (paged) collection successfully returned - may be empty",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponsePickupPlaceResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionResponsePickupPlaceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "Access denied (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "PickupPlace"
        ],
        "summary": "Create new pickup place",
        "description": "Create new pickup place",
        "operationId": "createPickupPlace",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PickupPlaceCreate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "New pickup place successfully created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickupPlaceResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PickupPlaceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "Access denied (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pickup-place/{id}/image": {
      "post": {
        "tags": [
          "PickupPlace"
        ],
        "summary": "Upload a pickup place image",
        "description": "Upload a pickup place image",
        "operationId": "uploadPickupPlaceImage",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "UUID of the pickup place",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "required": [
                  "file"
                ],
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Pickup place image successfully uploaded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/FileInfo"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "Access denied (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Pickup place not found (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "413": {
            "description": "Request payload (uploaded image) too large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/pickup-place/{id}": {
      "get": {
        "tags": [
          "PickupPlace"
        ],
        "summary": "Get pickup place by id",
        "description": "Get pickup place by id",
        "operationId": "getPickupPlace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "UUID of the pickup place",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Pickup place successfully returned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickupPlaceResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PickupPlaceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "Access denied (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Pickup place not found (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "PickupPlace"
        ],
        "summary": "Delete a pickup place",
        "description": "Delete a pickup place",
        "operationId": "deletePickupPlace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "UUID of the pickup place",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Pickup place successfully deleted"
          },
          "400": {
            "description": "Input data validation error - constraint violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "Access denied (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Pickup place not found (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "PickupPlace"
        ],
        "summary": "Update a pickup place",
        "description": "Update a pickup place",
        "operationId": "updatePickupPlace",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "UUID of the pickup place",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PickupPlaceUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Pickup place successfully updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PickupPlaceResponse"
                }
              },
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/PickupPlaceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Input data validation error - constraint violation",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid API token",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "403": {
            "description": "Access denied (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "404": {
            "description": "Pickup place not found (under the current user account)",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ProblemDetail": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string",
            "format": "uri"
          },
          "properties": {
            "type": "object",
            "additionalProperties": {
              "type": "object"
            }
          }
        }
      },
      "RefreshTokenCommand": {
        "type": "object",
        "properties": {
          "refreshToken": {
            "type": "string",
            "description": "Refresh token value."
          }
        },
        "description": "Refresh token value"
      },
      "TokenPair": {
        "required": [
          "refreshToken",
          "token"
        ],
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Auth token"
          },
          "refreshToken": {
            "type": "string",
            "description": "Refresh token"
          }
        },
        "description": "Auth token pair"
      },
      "Authorization": {
        "required": [
          "email",
          "password"
        ],
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "description": "Email to authorize",
            "example": "myuser@coolmail.com"
          },
          "password": {
            "type": "string",
            "description": "Secret password to authorize",
            "example": "supersecretpwd"
          }
        },
        "description": "Username and password to authorize"
      },
      "DeliveryStateRequest": {
        "type": "string",
        "description": "State of delivery of parcel",
        "example": "CANCELLED",
        "enum": [
          "ESHOP_PROCESSING",
          "MANUFACTURING",
          "AVAILABLE_FROM_MANUFACTURER",
          "PICKING",
          "READY_TO_SEND",
          "HANDED_TO_CARRIER",
          "IN_TRANSIT",
          "STORED_FOR_PICKUP",
          "DELIVERED",
          "RETURNED",
          "LOST",
          "CANCELLED"
        ]
      },
      "ParcelStateUpdate": {
        "required": [
          "state"
        ],
        "type": "object",
        "properties": {
          "state": {
            "$ref": "#/components/schemas/DeliveryStateRequest"
          },
          "occurred": {
            "type": "string",
            "description": "optional moment in time when this change happened. ISO 8601, format: YYYY-MM-DDThh:mm:ss.sssZ",
            "format": "date-time"
          },
          "note": {
            "type": "string",
            "description": "optional note describing the state change"
          }
        }
      },
      "Carrier": {
        "type": "string",
        "description": "carrier identifier",
        "example": "GLS",
        "enum": [
          "BUDBEE",
          "CZECH_POST",
          "DHL",
          "DIY",
          "DPD",
          "DPD_CZ",
          "DPD_PL",
          "DPD_SK",
          "EU_SHIPMENTS",
          "FAN_COURIER",
          "FEDEX",
          "GEBRUDER_WEISS",
          "GEIS",
          "GLS",
          "GLS_CZ",
          "GLS_HR",
          "GLS_HU",
          "GLS_RO",
          "GLS_SI",
          "GLS_SK",
          "GO_BALIK",
          "INPOST",
          "JAPO",
          "KURIER_123",
          "KURYR_123",
          "LANDMARK",
          "MESSENGER",
          "PACKETA",
          "PBH",
          "POST_AG",
          "POCZTA_POLSKA",
          "PPL",
          "PPL_CPL",
          "SAMEDAY",
          "SAMEDAY_RO",
          "SLOVAKIA_POST",
          "SPEEDY",
          "SPRING_GDS",
          "SPS",
          "SWISS_POST",
          "TAXYDROMIKI",
          "TOP_TRANS",
          "ULOZENKA",
          "URGENT_CARGUS",
          "UNKNOWN",
          "UPS",
          "WEDO",
          "PERSONAL_PICKUP"
        ]
      },
      "DeliveryDetails": {
        "type": "object",
        "properties": {
          "estimatedDeliveryDate": {
            "type": "string",
            "description": "Date of estimated delivery",
            "format": "date",
            "example": "2024-04-18"
          },
          "delay": {
            "$ref": "#/components/schemas/DeliveryDetailsDelay"
          }
        },
        "description": "details about order delivery if available"
      },
      "DeliveryDetailsDelay": {
        "type": "object",
        "properties": {
          "delayed": {
            "type": "boolean",
            "description": "If delivery is delayed",
            "example": true
          },
          "reason": {
            "type": "string",
            "description": "The reason for the delay",
            "example": "The manufacturer is on strike"
          }
        },
        "description": "Delivery delay details"
      },
      "DeliveryState": {
        "type": "string",
        "description": "state of delivery",
        "example": "STORED_FOR_PICKUP",
        "enum": [
          "CREATED",
          "ESHOP_PROCESSING",
          "MANUFACTURING",
          "AVAILABLE_FROM_MANUFACTURER",
          "PICKING",
          "READY_TO_SEND",
          "HANDED_TO_CARRIER",
          "IN_TRANSIT",
          "STORED_FOR_PICKUP",
          "DELIVERED",
          "RETURNED",
          "LOST",
          "CANCELLED",
          "EXPIRED"
        ]
      },
      "Dimensions": {
        "type": "object",
        "properties": {
          "weight": {
            "type": "number",
            "description": "Package weight in kg",
            "format": "double",
            "example": 1.2
          },
          "height": {
            "type": "integer",
            "description": "Package height in cm",
            "format": "int32",
            "example": 25
          },
          "length": {
            "type": "integer",
            "description": "Package length in cm",
            "format": "int32",
            "example": 30
          },
          "width": {
            "type": "integer",
            "description": "Package width in cm",
            "format": "int32",
            "example": 20
          }
        },
        "description": "Parcel dimensions"
      },
      "EmailEventType": {
        "type": "string",
        "description": "type of event for email communication",
        "enum": [
          "EMAIL_SENT",
          "EMAIL_PROCESSED",
          "EMAIL_DROPPED",
          "EMAIL_DELIVERED",
          "EMAIL_DEFERRED",
          "EMAIL_BOUNCED",
          "EMAIL_BLOCKED",
          "EMAIL_OPENED",
          "EMAIL_CLICKED",
          "EMAIL_SPAM_REPORT",
          "EMAIL_UNSUBSCRIBED",
          "EMAIL_GROUP_UNSUBSCRIBED",
          "EMAIL_GROUP_RESUBSCRIBED"
        ]
      },
      "ImportantState": {
        "type": "string",
        "description": "optional important state assigned to parcel. value is not assigned if parcel is not marked as important",
        "deprecated": true,
        "enum": [
          "BAD_RATING",
          "MALFUNCTION",
          "TIME_REASONS",
          "ACT_OF_GOD",
          "CARRIERS_FAULT",
          "DAMAGED",
          "NOT_REACHED",
          "DISPOSITION_CHANGE",
          "RETURNING",
          "SLIGHTLY_DELAYED",
          "NOT_PICKED_1DAY",
          "NOT_PICKED_2DAYS",
          "NOT_PICKED_3DAYS"
        ]
      },
      "Parcel": {
        "required": [
          "id",
          "orderId",
          "products",
          "tags",
          "timeline"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "identifier of parcel",
            "format": "uuid",
            "example": "2b54b81f-1ba6-4196-acc9-894d958bbce7"
          },
          "orderId": {
            "type": "string",
            "description": "id of order this parcel belongs to",
            "format": "uuid",
            "example": "1cad6be8-5bcc-43ff-b9be-a4ed53a2bce1"
          },
          "externalCreated": {
            "type": "string",
            "description": "moment in time when was parcel created in external system.",
            "format": "date-time",
            "example": "2012-12-31T23:59:59Z"
          },
          "dimensions": {
            "$ref": "#/components/schemas/Dimensions"
          },
          "deliveryDetails": {
            "$ref": "#/components/schemas/DeliveryDetails"
          },
          "pin": {
            "type": "string",
            "description": "optional PIN for pickup"
          },
          "state": {
            "$ref": "#/components/schemas/ParcelState"
          },
          "trackingState": {
            "$ref": "#/components/schemas/TrackingState"
          },
          "maxStoreDate": {
            "type": "string",
            "format": "date-time"
          },
          "deliveryWindow": {
            "$ref": "#/components/schemas/TimeWindow"
          },
          "activeTracking": {
            "$ref": "#/components/schemas/ParcelTracking"
          },
          "timeline": {
            "type": "array",
            "description": "Parcel timeline",
            "items": {
              "$ref": "#/components/schemas/ParcelTimeline"
            }
          },
          "products": {
            "type": "array",
            "description": "Products from order that are contained in this parcel",
            "items": {
              "type": "string",
              "description": "Products from order that are contained in this parcel"
            }
          },
          "tags": {
            "type": "array",
            "description": "Optional tags assigned to parcel",
            "items": {
              "$ref": "#/components/schemas/ParcelTag"
            }
          },
          "carrierTrackingUrl": {
            "type": "string",
            "description": "Full url to courier's original tracking page. DEPRECATION NOTICE: marked for removal. use activeTracking.url instead.",
            "deprecated": true
          },
          "created": {
            "type": "string",
            "description": "when was parcel created",
            "format": "date-time",
            "example": "2023-09-02T13:05:01.636Z"
          },
          "updated": {
            "type": "string",
            "description": "when was parcel last updated",
            "format": "date-time",
            "example": "2023-09-02T19:55:41.301Z"
          }
        },
        "description": "Parcel details"
      },
      "ParcelState": {
        "type": "object",
        "properties": {
          "delivery": {
            "$ref": "#/components/schemas/DeliveryState"
          },
          "important": {
            "$ref": "#/components/schemas/ImportantState"
          },
          "urgent": {
            "$ref": "#/components/schemas/UrgentState"
          },
          "deliverToday": {
            "type": "boolean",
            "description": "is parcel being delivered today?"
          },
          "returning": {
            "type": "boolean",
            "description": "is parcel returning back to sender?"
          }
        },
        "description": "State of parcel"
      },
      "ParcelTag": {
        "type": "string",
        "description": "Optional tags assigned to parcel",
        "enum": [
          "TRACKING_SUSPENDED"
        ]
      },
      "ParcelTimeline": {
        "type": "object",
        "properties": {
          "timelineId": {
            "type": "string",
            "description": "Unique id of record",
            "format": "uuid",
            "example": "12345678-1234-1234-1234-1234567890ab"
          },
          "type": {
            "$ref": "#/components/schemas/TimelineType"
          },
          "text": {
            "type": "string",
            "description": "Text of record",
            "example": "The client has changed the payment type"
          },
          "created": {
            "type": "string",
            "description": "moment in time when timeline record has been created",
            "format": "date-time",
            "example": "2022-02-16T10:48:11Z"
          },
          "author": {
            "type": "string",
            "description": "author of record",
            "example": "Malina Red"
          },
          "additionalParams": {
            "$ref": "#/components/schemas/TimelineAdditionalParams"
          }
        },
        "description": "Parcel timeline"
      },
      "ParcelTracking": {
        "required": [
          "carrier",
          "trackingId"
        ],
        "type": "object",
        "properties": {
          "trackingId": {
            "type": "string",
            "description": "identifier of this tracking",
            "format": "uuid",
            "example": "2b54b81f-1ba6-4196-acc9-894d958bbce7"
          },
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "number": {
            "type": "string",
            "description": "tracking number in carrier system",
            "example": "A1234567890"
          },
          "url": {
            "type": "string",
            "description": "url of tracking page in carrier system",
            "example": "https://gls-group.eu/CZ/cs/sledovani-zasilek?match=A1234567890"
          },
          "referenceId": {
            "type": "string",
            "description": "optional id to reference parcel in carrier tracking system",
            "example": "ax72dd"
          },
          "carrierConfigurationId": {
            "type": "string",
            "description": "optional id of carrier configuration in Foxdeli. Carrier configuration is used for communication with carrier api. If no value is provided and carrier requires authorization, primary carrier configuration for given carrier will be used.",
            "format": "uuid"
          },
          "courierPhone": {
            "type": "string",
            "description": "optional phone number of courier that is transporting parcel"
          }
        },
        "description": "Tracking of parcel in specific carrier system"
      },
      "TimeWindow": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "description": "moment in time when time window starts",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "description": "moment in time when time window ends",
            "format": "date-time"
          }
        },
        "description": "time window described by two moments in time; beginning and end"
      },
      "TimelineAdditionalParams": {
        "type": "object",
        "properties": {
          "shippingEmail": {
            "$ref": "#/components/schemas/TimelineShippingEmail"
          },
          "parcelState": {
            "$ref": "#/components/schemas/TimelineParcelState"
          },
          "parcelStateGroup": {
            "type": "string",
            "description": "optional group identifier computed from parcel state to determine if two parcel states represent same logical parcel state"
          },
          "parcelTrace": {
            "$ref": "#/components/schemas/TimelineParcelTrace"
          },
          "issueTracking": {
            "$ref": "#/components/schemas/TimelineIssueTracking"
          }
        },
        "description": "Additional parameters related to timeline record"
      },
      "TimelineIssueTracking": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "externalUrl": {
            "type": "string"
          }
        },
        "description": "details about issue tracking related to timeline records of type ISSUE_TRACKING"
      },
      "TimelineParcelState": {
        "type": "object",
        "properties": {
          "delivery": {
            "$ref": "#/components/schemas/DeliveryState"
          },
          "important": {
            "$ref": "#/components/schemas/ImportantState"
          },
          "urgent": {
            "$ref": "#/components/schemas/UrgentState"
          },
          "deliverToday": {
            "type": "boolean",
            "description": "is parcel being delivered today?"
          },
          "returning": {
            "type": "boolean",
            "description": "is parcel returning back to sender?"
          }
        },
        "description": "descriptor of parcel state that is related to created tracking timeline entry"
      },
      "TimelineParcelTrace": {
        "type": "object",
        "properties": {
          "created": {
            "type": "string",
            "description": "moment in time when was this trace created in foxdeli system",
            "format": "date-time"
          },
          "occurred": {
            "type": "string",
            "description": "moment in time when tracking event that represents this trace happened in carrier tracking system",
            "format": "date-time"
          },
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "trackingNumber": {
            "type": "string",
            "description": "tracking number of parcel related to tracking event"
          },
          "identifier": {
            "type": "string",
            "description": "identifier of parcel tracking state in carrier tracking system"
          },
          "text": {
            "type": "string",
            "description": "optional text containing additional details related to state of parcel"
          }
        },
        "description": "descriptor of parcel trace that is related to created tracking timeline entry. parcel trace is a container that holds tracking state fields provided by carrier tracking system.",
        "deprecated": true
      },
      "TimelineShippingEmail": {
        "type": "object",
        "properties": {
          "recipient": {
            "type": "string"
          },
          "emailId": {
            "type": "string",
            "format": "uuid"
          },
          "emailConfigId": {
            "type": "string",
            "format": "uuid"
          },
          "campaignId": {
            "type": "string",
            "format": "uuid"
          },
          "state": {
            "$ref": "#/components/schemas/WorkflowState"
          },
          "event": {
            "$ref": "#/components/schemas/EmailEventType"
          },
          "occurred": {
            "type": "string",
            "format": "date-time"
          }
        },
        "description": "details about email communication related to timeline records of type COMMUNICATION"
      },
      "TimelineType": {
        "type": "string",
        "description": "Type of timeline record",
        "example": "NOTE",
        "enum": [
          "NOTE",
          "COMMUNICATION",
          "ISSUE_COMMUNICATION",
          "TRACKING",
          "ISSUE_TRACKING"
        ]
      },
      "TrackingState": {
        "type": "string",
        "description": "state of parcel tracking",
        "enum": [
          "AWAITING",
          "SUSPENDED",
          "TRACKING",
          "MISSING_CREDENTIALS",
          "INVALID_CREDENTIALS",
          "MISSING_CARRIER_CONFIGURATION",
          "INACTIVE_CARRIER_CONFIGURATION",
          "EXPIRED",
          "CANCELLED",
          "MISSING_TRACKING_NUMBER",
          "INVALID_TRACKING_NUMBER",
          "UNKNOWN_TRACKING_NUMBER",
          "DONE"
        ]
      },
      "UrgentState": {
        "type": "string",
        "description": "optional urgent state assigned to parcel. value is not assigned if parcel is not marked as urgent",
        "deprecated": true,
        "enum": [
          "REJECTED_FOR_DELIVERY",
          "REJECTED_TAKEOVER",
          "INCORRECT_ADDRESS",
          "OTHER",
          "DELIVERY_DELAYED",
          "NOT_PICKED_4DAYS",
          "NOT_PICKED_5DAYS",
          "LAST_DAY_FOR_PICKUP"
        ]
      },
      "WorkflowState": {
        "type": "string",
        "example": "IN_TRANSIT",
        "enum": [
          "ACT_OF_GOD",
          "AVAILABLE_FROM_MANUFACTURER",
          "CANCELLED",
          "CARRIERS_FAULT",
          "CROSS_BORDER",
          "DAMAGED",
          "DELIVERED",
          "DELIVERY_DELAYED",
          "DELIVERY_TODAY",
          "DISPOSITION_CHANGED",
          "ESHOP_PROCESSING",
          "ESTIMATED_DELIVERY_DATE",
          "ESTIMATED_DELIVERY_DATE_DELAY",
          "EXPIRED",
          "HANDED_TO_CARRIER",
          "INCORRECT_ADDRESS",
          "IN_TRANSIT",
          "LAST_PICKUP_DAY",
          "LOST",
          "MALFUNCTION",
          "MANUFACTURING",
          "NOT_PICKED_UP_1DAY",
          "NOT_PICKED_UP_2DAYS",
          "NOT_PICKED_UP_3DAYS",
          "NOT_PICKED_UP_4DAYS",
          "NOT_PICKED_UP_5DAYS",
          "NOT_REACHED",
          "ORDER_ACCEPTED",
          "ORDER_CONTENT_CHANGED",
          "ORDER_DESTINATION_CHANGED",
          "ORDER_PAID",
          "ORDER_UNPAID",
          "ORDER_WAITING_FOR_PAYMENT",
          "ORDER_WAITING_FOR_PAYMENT_1DAY",
          "ORDER_WAITING_FOR_PAYMENT_2DAYS",
          "ORDER_WAITING_FOR_PAYMENT_30MIN",
          "ORDER_WAITING_FOR_PAYMENT_3DAYS",
          "ORDER_WAITING_FOR_PAYMENT_4DAYS",
          "ORDER_WAITING_FOR_PAYMENT_5DAYS",
          "OTHER",
          "PICKING",
          "RATING",
          "RATING_1_STAR",
          "RATING_2_STAR",
          "RATING_3_STAR",
          "RATING_4_STAR",
          "RATING_5_STAR",
          "READY_TO_PICKUP",
          "READY_TO_PICKUP_BOX",
          "READY_TO_PICKUP_RETAIL",
          "READY_TO_SEND",
          "REJECTED_DELIVERY",
          "REJECTED_FOR_DELIVERY",
          "RETURNED",
          "RETURNING",
          "SLIGHTLY_DELAYED",
          "TIME_REASONS"
        ]
      },
      "AdditionalCost": {
        "required": [
          "price",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AdditionalCostType"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "name": {
            "pattern": "^(?!\\s*$).+",
            "type": "string",
            "description": "Name of cost",
            "example": "Home delivery"
          }
        },
        "description": "Additional cost"
      },
      "AdditionalCostType": {
        "type": "string",
        "description": "Type of additional cost",
        "example": "SHIPPING",
        "enum": [
          "SHIPPING",
          "CASH_ON_DELIVERY",
          "CARD",
          "BANK_TRANSFER",
          "CASH",
          "PACKING",
          "DUTY",
          "OTHER"
        ]
      },
      "Address": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "description": "address line1",
            "example": "Sesame street"
          },
          "line2": {
            "type": "string",
            "description": "address line2",
            "example": "11b"
          },
          "city": {
            "type": "string",
            "example": "MyCoolCity"
          },
          "postalCode": {
            "type": "string",
            "example": "48228"
          },
          "countryCode": {
            "$ref": "#/components/schemas/CountryCode"
          },
          "state": {
            "type": "string",
            "description": "optional address state",
            "example": "Michigan"
          },
          "region": {
            "type": "string",
            "description": "optional address region",
            "example": "Michigan"
          },
          "longitude": {
            "type": "number",
            "description": "GPS longitude",
            "format": "double",
            "example": 50.0933864
          },
          "latitude": {
            "type": "number",
            "description": "GPS latitude",
            "format": "double",
            "example": 14.4542789
          }
        },
        "description": "Address details"
      },
      "BillingDetails": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name",
            "example": "John Doe"
          },
          "companyName": {
            "type": "string",
            "description": "Company name",
            "example": "Doe Ltd"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/Address"
          },
          "crn": {
            "type": "string",
            "description": "Company Registration Number",
            "example": "12345678"
          },
          "vatId": {
            "type": "string",
            "description": "Value Added Tax Number",
            "example": "CZ12345678"
          },
          "email": {
            "type": "string",
            "description": "Email address",
            "example": "johndoe@mail.com"
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "example": "+420 123 456 789"
          }
        },
        "description": "Billing details"
      },
      "CountryCode": {
        "type": "string",
        "description": "ISO-3166 code of country where ParcelShop/Box is located",
        "example": "US",
        "enum": [
          "UNDEFINED",
          "AC",
          "AD",
          "AE",
          "AF",
          "AG",
          "AI",
          "AL",
          "AM",
          "AN",
          "AO",
          "AQ",
          "AR",
          "AS",
          "AT",
          "AU",
          "AW",
          "AX",
          "AZ",
          "BA",
          "BB",
          "BD",
          "BE",
          "BF",
          "BG",
          "BH",
          "BI",
          "BJ",
          "BL",
          "BM",
          "BN",
          "BO",
          "BQ",
          "BR",
          "BS",
          "BT",
          "BU",
          "BV",
          "BW",
          "BY",
          "BZ",
          "CA",
          "CC",
          "CD",
          "CF",
          "CG",
          "CH",
          "CI",
          "CK",
          "CL",
          "CM",
          "CN",
          "CO",
          "CP",
          "CR",
          "CS",
          "CU",
          "CV",
          "CW",
          "CX",
          "CY",
          "CZ",
          "DE",
          "DG",
          "DJ",
          "DK",
          "DM",
          "DO",
          "DZ",
          "EA",
          "EC",
          "EE",
          "EG",
          "EH",
          "ER",
          "ES",
          "ET",
          "EU",
          "EZ",
          "FI",
          "FJ",
          "FK",
          "FM",
          "FO",
          "FR",
          "FX",
          "GA",
          "GB",
          "GD",
          "GE",
          "GF",
          "GG",
          "GH",
          "GI",
          "GL",
          "GM",
          "GN",
          "GP",
          "GQ",
          "GR",
          "GS",
          "GT",
          "GU",
          "GW",
          "GY",
          "HK",
          "HM",
          "HN",
          "HR",
          "HT",
          "HU",
          "IC",
          "ID",
          "IE",
          "IL",
          "IM",
          "IN",
          "IO",
          "IQ",
          "IR",
          "IS",
          "IT",
          "JE",
          "JM",
          "JO",
          "JP",
          "KE",
          "KG",
          "KH",
          "KI",
          "KM",
          "KN",
          "KP",
          "KR",
          "KW",
          "KY",
          "KZ",
          "LA",
          "LB",
          "LC",
          "LI",
          "LK",
          "LR",
          "LS",
          "LT",
          "LU",
          "LV",
          "LY",
          "MA",
          "MC",
          "MD",
          "ME",
          "MF",
          "MG",
          "MH",
          "MK",
          "ML",
          "MM",
          "MN",
          "MO",
          "MP",
          "MQ",
          "MR",
          "MS",
          "MT",
          "MU",
          "MV",
          "MW",
          "MX",
          "MY",
          "MZ",
          "NA",
          "NC",
          "NE",
          "NF",
          "NG",
          "NI",
          "NL",
          "NO",
          "NP",
          "NR",
          "NT",
          "NU",
          "NZ",
          "OM",
          "PA",
          "PE",
          "PF",
          "PG",
          "PH",
          "PK",
          "PL",
          "PM",
          "PN",
          "PR",
          "PS",
          "PT",
          "PW",
          "PY",
          "QA",
          "RE",
          "RO",
          "RS",
          "RU",
          "RW",
          "SA",
          "SB",
          "SC",
          "SD",
          "SE",
          "SF",
          "SG",
          "SH",
          "SI",
          "SJ",
          "SK",
          "SL",
          "SM",
          "SN",
          "SO",
          "SR",
          "SS",
          "ST",
          "SU",
          "SV",
          "SX",
          "SY",
          "SZ",
          "TA",
          "TC",
          "TD",
          "TF",
          "TG",
          "TH",
          "TJ",
          "TK",
          "TL",
          "TM",
          "TN",
          "TO",
          "TP",
          "TR",
          "TT",
          "TV",
          "TW",
          "TZ",
          "UA",
          "UG",
          "UK",
          "UM",
          "US",
          "UY",
          "UZ",
          "VA",
          "VC",
          "VE",
          "VG",
          "VI",
          "VN",
          "VU",
          "WF",
          "WS",
          "XI",
          "XU",
          "XK",
          "YE",
          "YT",
          "YU",
          "ZA",
          "ZM",
          "ZR",
          "ZW"
        ]
      },
      "Customer": {
        "required": [
          "email",
          "name",
          "phone"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Customer name",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "description": "Customer email",
            "example": "iboughtsomething@customer.com"
          },
          "phone": {
            "type": "string",
            "description": "Customer phone",
            "example": "+420 123 456 789"
          }
        },
        "description": "Customer details - name, phone, email"
      },
      "Destination": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DestinationType"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "parcelShop": {
            "$ref": "#/components/schemas/ParcelShopData"
          }
        },
        "description": "Destination of order - either house address or parcelShop/box"
      },
      "DestinationType": {
        "type": "string",
        "description": "Type of destination",
        "example": "HOUSE_ADDRESS",
        "enum": [
          "PARCEL_SHOP",
          "PARCEL_BOX",
          "HOUSE_ADDRESS"
        ]
      },
      "ExternalLinkIcon": {
        "type": "string",
        "description": "External Link Icon",
        "example": "FILE",
        "enum": [
          "LINK",
          "FILE"
        ]
      },
      "ExternalLinkResponse": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "link name",
            "example": "Invoice"
          },
          "url": {
            "type": "string",
            "description": "link url",
            "example": "https://example.com/invoice.pdf"
          },
          "icon": {
            "$ref": "#/components/schemas/ExternalLinkIcon"
          }
        },
        "description": "Order external links",
        "example": [],
        "deprecated": true
      },
      "File": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "identifier of file"
          },
          "name": {
            "type": "string",
            "description": "name of a file"
          },
          "url": {
            "type": "string",
            "description": "url to access file content"
          },
          "contentType": {
            "type": "string",
            "description": "content type of file"
          }
        },
        "description": "File info"
      },
      "LanguageCode": {
        "type": "string",
        "description": "Order language - two letter language code - ISO-639-1",
        "example": "cs",
        "enum": [
          "undefined",
          "aa",
          "ab",
          "ae",
          "af",
          "ak",
          "am",
          "an",
          "ar",
          "as",
          "av",
          "ay",
          "az",
          "ba",
          "be",
          "bg",
          "bh",
          "bi",
          "bm",
          "bn",
          "bo",
          "br",
          "bs",
          "ca",
          "ce",
          "ch",
          "co",
          "cr",
          "cs",
          "cu",
          "cv",
          "cy",
          "da",
          "de",
          "dv",
          "dz",
          "ee",
          "el",
          "en",
          "eo",
          "es",
          "et",
          "eu",
          "fa",
          "ff",
          "fi",
          "fj",
          "fo",
          "fr",
          "fy",
          "ga",
          "gd",
          "gl",
          "gn",
          "gu",
          "gv",
          "ha",
          "he",
          "hi",
          "ho",
          "hr",
          "ht",
          "hu",
          "hy",
          "hz",
          "ia",
          "id",
          "ie",
          "ig",
          "ii",
          "ik",
          "io",
          "is",
          "it",
          "iu",
          "ja",
          "jv",
          "ka",
          "kg",
          "ki",
          "kj",
          "kk",
          "kl",
          "km",
          "kn",
          "ko",
          "kr",
          "ks",
          "ku",
          "kv",
          "kw",
          "ky",
          "la",
          "lb",
          "lg",
          "li",
          "ln",
          "lo",
          "lt",
          "lu",
          "lv",
          "mg",
          "mh",
          "mi",
          "mk",
          "ml",
          "mn",
          "mr",
          "ms",
          "mt",
          "my",
          "na",
          "nb",
          "nd",
          "ne",
          "ng",
          "nl",
          "nn",
          "no",
          "nr",
          "nv",
          "ny",
          "oc",
          "oj",
          "om",
          "or",
          "os",
          "pa",
          "pi",
          "pl",
          "ps",
          "pt",
          "qu",
          "rm",
          "rn",
          "ro",
          "ru",
          "rw",
          "sa",
          "sc",
          "sd",
          "se",
          "sg",
          "si",
          "sk",
          "sl",
          "sm",
          "sn",
          "so",
          "sq",
          "sr",
          "ss",
          "st",
          "su",
          "sv",
          "sw",
          "ta",
          "te",
          "tg",
          "th",
          "ti",
          "tk",
          "tl",
          "tn",
          "to",
          "tr",
          "ts",
          "tt",
          "tw",
          "ty",
          "ug",
          "uk",
          "ur",
          "uz",
          "ve",
          "vi",
          "vo",
          "wa",
          "wo",
          "xh",
          "yi",
          "yo",
          "za",
          "zh",
          "zu"
        ]
      },
      "Link": {
        "type": "object",
        "properties": {
          "href": {
            "type": "string"
          }
        },
        "description": "link to a resource"
      },
      "Money": {
        "required": [
          "amount",
          "currency"
        ],
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "amount of money",
            "example": 99.96
          },
          "currency": {
            "type": "string",
            "description": "currency of amount in ISO-4217 format",
            "example": "CZK"
          }
        },
        "description": "amount of money in given currency"
      },
      "Order": {
        "required": [
          "additionalCosts",
          "communication",
          "eshopId",
          "externalLinks",
          "files",
          "id",
          "links",
          "marketId",
          "orderState",
          "parcels",
          "products",
          "recommendedProducts"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "identifier of order",
            "format": "uuid"
          },
          "platform": {
            "type": "string",
            "description": "Name of data source",
            "example": "shopify"
          },
          "orderNumber": {
            "type": "string",
            "description": "External number of order in eshop",
            "example": "A123456789"
          },
          "orderState": {
            "$ref": "#/components/schemas/OrderState"
          },
          "marketId": {
            "type": "string",
            "description": "Id of Market order belongs to",
            "format": "uuid",
            "example": "edf4b2ec-c1fc-42da-ba86-eb3a236cd565"
          },
          "eshopId": {
            "type": "string",
            "description": "Id of Eshop order belongs to",
            "format": "uuid",
            "example": "edf4b2ec-c1fc-42da-ba86-eb3a236cd565"
          },
          "externalCreated": {
            "type": "string",
            "description": "moment in time when was order created in external system.",
            "format": "date-time",
            "example": "2012-12-31T23:59:59Z"
          },
          "externalIdentifier": {
            "type": "string",
            "description": "Optional identifier of order in external system",
            "example": "ORD123456789"
          },
          "destination": {
            "$ref": "#/components/schemas/Destination"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "additionalCosts": {
            "type": "array",
            "description": "List of additional costs",
            "items": {
              "$ref": "#/components/schemas/AdditionalCost"
            }
          },
          "cashOnDelivery": {
            "$ref": "#/components/schemas/Money"
          },
          "payment": {
            "$ref": "#/components/schemas/PaymentResponse"
          },
          "customer": {
            "$ref": "#/components/schemas/Customer"
          },
          "parcels": {
            "type": "array",
            "description": "Parcels contained in this order",
            "items": {
              "$ref": "#/components/schemas/Parcel"
            }
          },
          "products": {
            "type": "array",
            "description": "Products contained in this order",
            "items": {
              "$ref": "#/components/schemas/Product"
            }
          },
          "recommendedProducts": {
            "type": "array",
            "description": "Products to be displayed in Recommended Products TnT/email module",
            "items": {
              "$ref": "#/components/schemas/RecommendedProduct"
            }
          },
          "cancelled": {
            "type": "string",
            "description": "Instant of cancellation. DEPRECATION NOTICE: field is marked for removal and will be removed in one of next major releases",
            "format": "date-time",
            "deprecated": true
          },
          "inUrgentState": {
            "type": "boolean",
            "description": "is order in urgent state?",
            "example": true
          },
          "inImportantState": {
            "type": "boolean",
            "description": "is order in important state?",
            "example": true
          },
          "malfunction": {
            "type": "boolean",
            "description": "is order in malfunction state?",
            "example": true
          },
          "snooze": {
            "$ref": "#/components/schemas/Snooze"
          },
          "created": {
            "type": "string",
            "description": "moment in time when was order created",
            "format": "date-time",
            "example": "2023-09-02T13:05:01.636Z"
          },
          "updated": {
            "type": "string",
            "description": "moment in time when was order last updated",
            "format": "date-time",
            "example": "2023-09-02T19:55:41.301Z"
          },
          "invoiceFileUrl": {
            "type": "string",
            "description": "(Foxdeli storage) URL of the invoice that belongs to this order (optional)",
            "example": "https://storage.url/invoices/11111111-2222-3333-4444-555555555555/123456.pdf"
          },
          "proformaInvoiceFileUrl": {
            "type": "string",
            "description": "(Foxdeli storage) URL of the proforma invoice that belongs to this order (optional)",
            "example": "https://storage.url/invoices/11111111-2222-3333-4444-555555555555/123456.pdf"
          },
          "files": {
            "type": "array",
            "description": "List of files attached to order",
            "items": {
              "$ref": "#/components/schemas/File"
            }
          },
          "links": {
            "$ref": "#/components/schemas/OrderLinks"
          },
          "billingDetails": {
            "$ref": "#/components/schemas/BillingDetails"
          },
          "language": {
            "$ref": "#/components/schemas/LanguageCode"
          },
          "externalLinks": {
            "type": "array",
            "description": "list of order external links. DEPRECATION NOTICE: marked for removal. use `communication.externalLinks` instead.",
            "example": [],
            "deprecated": true,
            "items": {
              "$ref": "#/components/schemas/ExternalLinkResponse"
            }
          },
          "communication": {
            "$ref": "#/components/schemas/OrderCommunication"
          }
        },
        "description": "Order details"
      },
      "OrderCommunication": {
        "type": "object",
        "properties": {
          "optional url of order in external system; typically order url in eshop": {
            "type": "string"
          },
          "externalLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkRequest"
            }
          }
        },
        "description": "Customization of communication for given order"
      },
      "OrderLinks": {
        "required": [
          "trackAndTrace"
        ],
        "type": "object",
        "properties": {
          "trackAndTrace": {
            "$ref": "#/components/schemas/Link"
          }
        }
      },
      "OrderState": {
        "type": "string",
        "description": "State of order",
        "example": "IN_TRANSIT",
        "enum": [
          "CREATED",
          "PICKING",
          "IN_TRANSIT",
          "PARTIALLY_DELIVERED",
          "DELIVERED",
          "UNDELIVERED",
          "CANCELLED",
          "RETURNED"
        ]
      },
      "ParcelShopData": {
        "required": [
          "carrier"
        ],
        "type": "object",
        "properties": {
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "countryCode": {
            "$ref": "#/components/schemas/CountryCode"
          },
          "parcelShopId": {
            "type": "string",
            "description": "Carriers ID of parcelShop/Box",
            "example": "A1234"
          },
          "pickupPlaceId": {
            "type": "string"
          },
          "businessHours": {
            "type": "string"
          }
        },
        "description": "Details about carriers parcelShop/Box to deliver to"
      },
      "PaymentMethod": {
        "type": "string",
        "description": "Method used for payment",
        "example": "CASH_ON_DELIVERY",
        "enum": [
          "CASH_ON_DELIVERY",
          "BANK_TRANSFER",
          "CARD",
          "CRYPTO",
          "OTHER"
        ]
      },
      "PaymentResponse": {
        "required": [
          "method",
          "service",
          "state"
        ],
        "type": "object",
        "properties": {
          "paid": {
            "type": "boolean",
            "description": "state of payment. DEPRECATION NOTICE: marked for removal, use `state` instead",
            "example": false,
            "deprecated": true
          },
          "state": {
            "$ref": "#/components/schemas/PaymentState"
          },
          "tag": {
            "$ref": "#/components/schemas/PaymentTag"
          },
          "method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "service": {
            "$ref": "#/components/schemas/PaymentService"
          },
          "link": {
            "type": "string",
            "description": "payment link",
            "example": "https://pay.me"
          }
        },
        "description": "Information about payment"
      },
      "PaymentService": {
        "type": "string",
        "description": "Type of service used for payment",
        "example": "PAYPAL",
        "enum": [
          "PAYPAL",
          "APPLE_PAY",
          "GOOGLE_PAY",
          "OTHER"
        ]
      },
      "PaymentState": {
        "type": "string",
        "description": "State of payment",
        "example": "PAID",
        "enum": [
          "UNKNOWN",
          "UNPAID",
          "PAID"
        ]
      },
      "PaymentTag": {
        "type": "string",
        "description": "Optional tag related to UNPAID state of payment",
        "example": "AWAITING_30MIN",
        "enum": [
          "AWAITING_30MIN",
          "AWAITING_1DAY",
          "AWAITING_2DAYS",
          "AWAITING_3DAYS",
          "AWAITING_4DAYS",
          "AWAITING_5DAYS",
          "AWAITING"
        ]
      },
      "Product": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProductType"
          },
          "sku": {
            "type": "string",
            "description": "product SKU",
            "example": "A1234"
          },
          "name": {
            "type": "string",
            "description": "name of product",
            "example": "Awesome product"
          },
          "description": {
            "type": "string",
            "description": "short product description.",
            "example": "So awesome you must have it!"
          },
          "url": {
            "type": "string",
            "description": "url of product detail.",
            "example": "https://mycoolshop.com/product/A1234"
          },
          "image": {
            "type": "string",
            "description": "url of product image.",
            "example": "https://mycoolshop.com/img/product/A1234.png"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "vat": {
            "type": "number",
            "description": "VAT value",
            "example": 23.5
          },
          "quantity": {
            "minimum": 1,
            "type": "integer",
            "description": "quantity ordered",
            "format": "int32",
            "example": 1
          },
          "referencedSku": {
            "type": "string",
            "description": "reference to the SKU of the product it belongs to, e.g. extended warranty. references product within same order",
            "example": "A9999"
          }
        },
        "description": "Product details"
      },
      "ProductType": {
        "type": "string",
        "description": "Type of product",
        "example": "PRODUCT",
        "enum": [
          "PRODUCT",
          "DIGITAL_PRODUCT",
          "SERVICE",
          "GIFT",
          "DISCOUNT",
          "VOUCHER"
        ]
      },
      "RecommendedProduct": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProductType"
          },
          "sku": {
            "type": "string",
            "description": "product SKU",
            "example": "A1234"
          },
          "name": {
            "type": "string",
            "description": "name of product",
            "example": "Awesome product"
          },
          "description": {
            "type": "string",
            "description": "short product description.",
            "example": "So awesome you must have it!"
          },
          "url": {
            "type": "string",
            "description": "url of product detail.",
            "example": "https://mycoolshop.com/product/A1234"
          },
          "image": {
            "type": "string",
            "description": "url of product image.",
            "example": "https://mycoolshop.com/img/product/A1234.png"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "description": "Recommended product details"
      },
      "Snooze": {
        "type": "object",
        "properties": {
          "until": {
            "type": "string",
            "description": "moment in time until which order is snoozed",
            "format": "date-time",
            "example": "2022-02-16T10:48:11Z"
          },
          "author": {
            "type": "string",
            "description": "author of snooze",
            "example": "John Doe"
          },
          "note": {
            "type": "string",
            "description": "snooze note",
            "example": "Resolved"
          },
          "snoozed": {
            "type": "boolean",
            "description": "is snooze currently active?",
            "example": false
          }
        },
        "description": "Snooze details"
      },
      "AdditionalCostRequest": {
        "required": [
          "price",
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/AdditionalCostType"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "name": {
            "pattern": "^(?!\\s*$).+",
            "type": "string",
            "description": "name of cost",
            "example": "Home delivery"
          }
        },
        "description": "Additional cost"
      },
      "AddressRequest": {
        "required": [
          "city",
          "countryCode",
          "line1",
          "postalCode"
        ],
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "description": "address line1",
            "example": "Sesame street"
          },
          "line2": {
            "type": "string",
            "description": "address line2",
            "example": "11b"
          },
          "city": {
            "type": "string",
            "description": "city name",
            "example": "MyCoolCity"
          },
          "postalCode": {
            "type": "string",
            "description": "zip code",
            "example": "48228"
          },
          "countryCode": {
            "$ref": "#/components/schemas/CountryCode"
          },
          "state": {
            "type": "string",
            "description": "optional address state",
            "example": "Michigan"
          },
          "region": {
            "type": "string",
            "description": "optional address region",
            "example": "Michigan"
          },
          "longitude": {
            "type": "number",
            "description": "GPS longitude",
            "format": "double",
            "example": 50.0933864
          },
          "latitude": {
            "type": "number",
            "description": "GPS latitude",
            "format": "double",
            "example": 14.4542789
          }
        },
        "description": "address details; required data for destination type HOUSE_ADDRESS"
      },
      "BillingDetailsRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name",
            "example": "John Doe"
          },
          "companyName": {
            "type": "string",
            "description": "Company name",
            "example": "Doe Ltd"
          },
          "billingAddress": {
            "$ref": "#/components/schemas/AddressRequest"
          },
          "crn": {
            "type": "string",
            "description": "Company Registration Number",
            "example": "12345678"
          },
          "vatId": {
            "type": "string",
            "description": "Value Added Tax Number",
            "example": "CZ12345678"
          },
          "email": {
            "type": "string",
            "description": "Email address",
            "example": "johndoe@mail.com"
          },
          "phone": {
            "type": "string",
            "description": "Phone number",
            "example": "+420 123 456 789"
          }
        },
        "description": "Billing details"
      },
      "CustomerRequest": {
        "required": [
          "email",
          "name",
          "phone"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Customer name",
            "example": "John Doe"
          },
          "email": {
            "type": "string",
            "description": "Customer email",
            "example": "iboughtsomething@customer.com"
          },
          "phone": {
            "type": "string",
            "description": "Customer phone",
            "example": "+420 123 456 789"
          }
        },
        "description": "Customer details - name, phone, email"
      },
      "DestinationRequest": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DestinationType"
          },
          "address": {
            "$ref": "#/components/schemas/AddressRequest"
          },
          "parcelShop": {
            "$ref": "#/components/schemas/ParcelShopRequest"
          }
        },
        "description": "Destination of order - either house address or parcelShop/box"
      },
      "OrderCommunicationRequest": {
        "type": "object",
        "properties": {
          "optional url of order in external system; typically order url in eshop": {
            "type": "string"
          },
          "externalLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkRequest"
            }
          }
        },
        "description": "Customization of communication for given order"
      },
      "OrderRegistration": {
        "required": [
          "customer",
          "eshopId",
          "price"
        ],
        "type": "object",
        "properties": {
          "eshopId": {
            "type": "string",
            "description": "id of the eshop order belongs to",
            "example": "12345678-1234-1234-1234-1234567890ab"
          },
          "marketId": {
            "type": "string",
            "description": "optional Id of the market order belongs to",
            "example": "12345678-1234-1234-1234-1234567890ab"
          },
          "platform": {
            "type": "string",
            "description": "name of data source",
            "example": "shopify"
          },
          "externalCreated": {
            "type": "string",
            "description": "moment in time when was order created in external system. ISO 8601, format: YYYY-MM-DDThh:mm:ss.sssZ",
            "format": "date-time",
            "example": "2012-12-31T23:59:59.125Z"
          },
          "orderNumber": {
            "type": "string",
            "description": "external number of order in eshop",
            "example": "A123456789"
          },
          "externalIdentifier": {
            "type": "string",
            "description": "optional identifier of order in external system. if provided, must be unique for each order.",
            "example": "ORD123456789"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "cashOnDelivery": {
            "$ref": "#/components/schemas/Money"
          },
          "additionalCosts": {
            "type": "array",
            "description": "list of additional costs that are charged for order in addition to basic price",
            "items": {
              "$ref": "#/components/schemas/AdditionalCostRequest"
            }
          },
          "payment": {
            "$ref": "#/components/schemas/PaymentRequest"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerRequest"
          },
          "destination": {
            "$ref": "#/components/schemas/DestinationRequest"
          },
          "products": {
            "type": "array",
            "description": "list of product details that are contained in order",
            "example": [],
            "items": {
              "$ref": "#/components/schemas/ProductRequest"
            }
          },
          "recommendedProducts": {
            "type": "array",
            "description": "list of product details to be displayed in Recommended Products TnT/email module",
            "example": [],
            "items": {
              "$ref": "#/components/schemas/RecommendedProductRequest"
            }
          },
          "billingDetails": {
            "$ref": "#/components/schemas/BillingDetailsRequest"
          },
          "language": {
            "$ref": "#/components/schemas/LanguageCode"
          },
          "externalLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkRequest"
            }
          },
          "communication": {
            "$ref": "#/components/schemas/OrderCommunicationRequest"
          }
        }
      },
      "ParcelShopRequest": {
        "required": [
          "carrier",
          "countryCode",
          "parcelShopId"
        ],
        "type": "object",
        "properties": {
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "countryCode": {
            "$ref": "#/components/schemas/CountryCode"
          },
          "parcelShopId": {
            "type": "string",
            "description": "identifier of of parcelShop/Box in carrier system",
            "example": "A1234"
          }
        },
        "description": "parcel shop/box details; required data for destination type PARCEL_SHOP|PARCEL_BOX"
      },
      "PaymentRequest": {
        "type": "object",
        "properties": {
          "paid": {
            "type": "boolean",
            "description": "state of payment. DEPRECATION NOTICE: marked for removal, use `state` instead",
            "example": false,
            "deprecated": true
          },
          "state": {
            "$ref": "#/components/schemas/PaymentState"
          },
          "method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "service": {
            "$ref": "#/components/schemas/PaymentService"
          },
          "link": {
            "type": "string",
            "description": "payment link",
            "example": "https://pay.me"
          },
          "occurred": {
            "type": "string",
            "description": "optional moment in time when was state of payment described by this request set in source system (typically eshop system). if not provided, current time from clock will be used. ISO 8601, format: YYYY-MM-DDThh:mm:ss.sssZ",
            "format": "date-time",
            "example": "2012-12-31T23:59:59.125Z"
          }
        },
        "description": "Information about payment"
      },
      "ProductRequest": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProductType"
          },
          "sku": {
            "type": "string",
            "description": "product SKU",
            "example": "A1234"
          },
          "name": {
            "type": "string",
            "description": "name of product",
            "example": "Awesome product"
          },
          "description": {
            "type": "string",
            "description": "short product description.",
            "example": "So awesome you must have it!"
          },
          "url": {
            "type": "string",
            "description": "url of product detail.",
            "example": "https://mycoolshop.com/product/A1234"
          },
          "image": {
            "type": "string",
            "description": "url of product image.",
            "example": "https://mycoolshop.com/img/product/A1234.png"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "vat": {
            "type": "number",
            "description": "VAT value",
            "example": 23.5
          },
          "quantity": {
            "minimum": 1,
            "type": "integer",
            "description": "quantity ordered",
            "format": "int32",
            "example": 1
          },
          "referencedSku": {
            "type": "string",
            "description": "reference to the SKU of product that this product belongs to, e.g. extended warranty. references product within same order",
            "example": "A9999"
          }
        },
        "description": "Product details",
        "example": []
      },
      "RecommendedProductRequest": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ProductType"
          },
          "sku": {
            "type": "string",
            "description": "product SKU",
            "example": "A1234"
          },
          "name": {
            "type": "string",
            "description": "name of product",
            "example": "Awesome product"
          },
          "description": {
            "type": "string",
            "description": "short product description.",
            "example": "So awesome you must have it!"
          },
          "url": {
            "type": "string",
            "description": "url of product detail.",
            "example": "https://mycoolshop.com/product/A1234"
          },
          "image": {
            "type": "string",
            "description": "url of product image.",
            "example": "https://mycoolshop.com/img/product/A1234.png"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          }
        },
        "description": "Recommended product details",
        "example": []
      },
      "FileInfo": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "identifier of file - deprecated - kept for backwards compatibility",
            "deprecated": true
          },
          "path": {
            "type": "string",
            "description": "(unique) path of the file in storage"
          },
          "url": {
            "type": "string",
            "description": "absolute url where to get file content"
          },
          "mediaLink": {
            "type": "string",
            "description": "deprecated - use url instead",
            "deprecated": true
          },
          "contentType": {
            "type": "string",
            "description": "mime content type of file"
          },
          "size": {
            "type": "integer",
            "description": "size of file in bytes",
            "format": "int64"
          },
          "created": {
            "type": "string",
            "description": "when was file created",
            "format": "date-time"
          },
          "updated": {
            "type": "string",
            "description": "when was file updated",
            "format": "date-time"
          }
        }
      },
      "DeliveryDetailsDelayRequest": {
        "type": "object",
        "properties": {
          "delayed": {
            "type": "boolean",
            "description": "If delivery is delayed",
            "example": true
          },
          "reason": {
            "type": "string",
            "description": "The reason for the delay",
            "example": "The manufacturer is on strike"
          }
        },
        "description": "Delivery delay details"
      },
      "DeliveryDetailsRequest": {
        "type": "object",
        "properties": {
          "estimatedDeliveryDate": {
            "type": "string",
            "description": "Date of estimated delivery",
            "format": "date",
            "example": "2024-04-18"
          },
          "delay": {
            "$ref": "#/components/schemas/DeliveryDetailsDelayRequest"
          }
        },
        "description": "Delivery details"
      },
      "DimensionsRequest": {
        "type": "object",
        "properties": {
          "weight": {
            "type": "number",
            "description": "weight in kg",
            "format": "double",
            "example": 1.2
          },
          "height": {
            "type": "integer",
            "description": "height in cm",
            "format": "int32",
            "example": 25
          },
          "length": {
            "type": "integer",
            "description": "length in cm",
            "format": "int32",
            "example": 30
          },
          "width": {
            "type": "integer",
            "description": "width in cm",
            "format": "int32",
            "example": 20
          }
        },
        "description": "Parcel dimensions"
      },
      "ParcelRegistration": {
        "type": "object",
        "properties": {
          "externalCreated": {
            "type": "string",
            "description": "optional moment in time when was parcel created in external system. ISO 8601, format: YYYY-MM-DDThh:mm:ss.sssZ",
            "format": "date-time",
            "example": "2012-12-31T23:59:59.125Z"
          },
          "products": {
            "type": "array",
            "description": "list of product SKUs from order that are contained in this parcel",
            "example": [
              "DS90987869"
            ],
            "items": {
              "type": "string",
              "description": "list of product SKUs from order that are contained in this parcel",
              "example": "[\"DS90987869\"]"
            }
          },
          "dimensions": {
            "$ref": "#/components/schemas/DimensionsRequest"
          },
          "deliveryDetails": {
            "$ref": "#/components/schemas/DeliveryDetailsRequest"
          },
          "pin": {
            "type": "string",
            "description": "optional PIN for pickup"
          },
          "tracking": {
            "type": "array",
            "description": "list of tracking data for each carrier that is transporting given parcel. Parcel may be transported by a) single carrier, in which case there is a single entry in this list or b) multiple carriers, in which case this list contains tracking data for each carrier in order in which the parcel will be transported.",
            "items": {
              "$ref": "#/components/schemas/ParcelTrackingConfigRequest"
            }
          },
          "tags": {
            "type": "array",
            "description": "optional tags assigned to parcel",
            "example": [],
            "items": {
              "$ref": "#/components/schemas/ParcelTag"
            }
          }
        }
      },
      "ParcelTrackingConfigRequest": {
        "type": "object",
        "properties": {
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "number": {
            "type": "string",
            "description": "tracking number in carrier tracking system. parcel is not tracked by Foxdeli until tracking number is provided",
            "example": "1234567890"
          },
          "referenceId": {
            "type": "string",
            "description": "optional id to reference parcel in carrier tracking system",
            "example": "12345"
          },
          "carrierConfigurationId": {
            "type": "string",
            "description": "id of carrier configuration in Foxdeli system. if no value is provided, Foxdeli attempts to use `primary` carrier configuration for given carrier while tracking parcel.",
            "example": "d3796e16-66d9-4d6e-8957-e92cc584a981"
          }
        },
        "description": "Configuration for tracking of parcel in specific carrier system.\nAt least one of the carrier or carrierConfigurationId values must be filled.\nIf both carrier and carrierConfigurationId values are filled, then carrier must match the carrier value of the stored carrier configuration"
      },
      "OrderUpdate": {
        "type": "object",
        "properties": {
          "platform": {
            "type": "string",
            "description": "name of data source",
            "example": "shopify"
          },
          "orderNumber": {
            "type": "string",
            "description": "external number of order in eshop",
            "example": "A123456789"
          },
          "externalCreated": {
            "type": "string",
            "description": "optional moment in time when was order created in external system. ISO 8601, format: YYYY-MM-DDThh:mm:ss.sssZ",
            "format": "date-time",
            "example": "2005-08-22T15:01:14Z"
          },
          "externalIdentifier": {
            "type": "string",
            "description": "optional identifier of order in external system. If provided, must be unique for each order.",
            "example": "ORD123456789"
          },
          "price": {
            "$ref": "#/components/schemas/Money"
          },
          "cashOnDelivery": {
            "$ref": "#/components/schemas/Money"
          },
          "additionalCosts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalCostRequest"
            }
          },
          "payment": {
            "$ref": "#/components/schemas/PaymentUpdateRequest"
          },
          "customer": {
            "$ref": "#/components/schemas/CustomerRequest"
          },
          "destination": {
            "$ref": "#/components/schemas/DestinationRequest"
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProductRequest"
            }
          },
          "recommendedProducts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecommendedProductRequest"
            }
          },
          "billingDetails": {
            "$ref": "#/components/schemas/BillingDetailsRequest"
          },
          "externalLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkRequest"
            }
          },
          "communication": {
            "$ref": "#/components/schemas/OrderCommunicationUpdateRequest"
          }
        }
      },
      "ParcelUpdate": {
        "type": "object",
        "properties": {
          "externalCreated": {
            "type": "string",
            "description": "optional moment in time when was parcel created in external system. ISO 8601, format: YYYY-MM-DDThh:mm:ss.sssZ",
            "format": "date-time",
            "example": "2005-08-22T15:01:14.125Z"
          },
          "products": {
            "type": "array",
            "items": {
              "type": "string",
              "description": "Product SKU from order that is contained in this parcel"
            }
          },
          "tags": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParcelTag"
            }
          },
          "dimensions": {
            "$ref": "#/components/schemas/DimensionsRequest"
          },
          "deliveryDetails": {
            "$ref": "#/components/schemas/DeliveryDetailsRequest"
          },
          "pin": {
            "type": "string",
            "description": "optional PIN for pickup"
          },
          "tracking": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParcelTrackingConfigRequest"
            }
          }
        }
      },
      "CollectionPage": {
        "type": "object",
        "properties": {
          "totalPages": {
            "type": "integer",
            "description": "Total pages",
            "format": "int32",
            "example": 100
          },
          "totalElements": {
            "type": "integer",
            "description": "Total elements",
            "format": "int64",
            "example": 2000
          },
          "size": {
            "type": "integer",
            "description": "Number of elements per page",
            "format": "int32",
            "example": 20
          },
          "number": {
            "type": "integer",
            "description": "Current page number",
            "format": "int32",
            "example": 1
          },
          "first": {
            "type": "boolean",
            "description": "First page",
            "example": true
          },
          "last": {
            "type": "boolean",
            "description": "Last page",
            "example": false
          }
        },
        "description": "Information about the position in list",
        "nullable": true
      },
      "CollectionResponseCountryCode": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Collection response wrapper",
            "items": {
              "$ref": "#/components/schemas/CountryCode"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CollectionPage"
          }
        }
      },
      "ExceptionalOpeningHours": {
        "required": [
          "hours"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "local date of opening hours exception",
            "format": "date",
            "example": "2023-02-17"
          },
          "hours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursTimeFrame"
            }
          },
          "reason": {
            "type": "string",
            "description": "reason of such exceptional opening hours",
            "example": "vacation"
          }
        },
        "description": "Details about exceptional opening hours for given date"
      },
      "ExternalLinkRequest": {
        "required": [
          "url"
        ],
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "link name",
            "example": "Invoice"
          },
          "url": {
            "type": "string",
            "description": "link url",
            "example": "https://example.com/invoice.pdf"
          },
          "icon": {
            "$ref": "#/components/schemas/ExternalLinkIcon"
          }
        },
        "description": "Order external link"
      },
      "OrderCommunicationUpdateRequest": {
        "type": "object",
        "properties": {
          "orderDetailUrl": {
            "type": "string",
            "description": "optional url of order in external system; typically order url in eshop. if not explicitly provided in request, existing value remains unchanged."
          },
          "externalLinks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExternalLinkRequest"
            }
          }
        },
        "description": "Customization of communication for given order"
      },
      "OpeningHoursTimeFrame": {
        "type": "object",
        "properties": {
          "from": {
            "pattern": "HH:mm:SS",
            "type": "string",
            "example": "08:00:00"
          },
          "to": {
            "pattern": "HH:mm:SS",
            "type": "string",
            "example": "18:00:00"
          }
        },
        "description": "Time frame of opening hours with starting and ending moment in local time"
      },
      "PaymentUpdateRequest": {
        "type": "object",
        "properties": {
          "paid": {
            "type": "boolean",
            "description": "state of payment. if not provided, existing state of payment assigned to order will remain unchanged. DEPRECATION NOTICE: marked for removal, use `state` instead",
            "example": false,
            "deprecated": true
          },
          "state": {
            "$ref": "#/components/schemas/PaymentState"
          },
          "method": {
            "$ref": "#/components/schemas/PaymentMethod"
          },
          "service": {
            "$ref": "#/components/schemas/PaymentService"
          },
          "link": {
            "type": "string",
            "description": "payment link. if not provided, existing payment link assigned to order will remain unchanged",
            "example": "https://pay.me"
          },
          "occurred": {
            "type": "string",
            "description": "optional moment in time when was state of payment described by this request set in source system (typically eshop system). if not provided, current time from clock will be used. ISO 8601, format: YYYY-MM-DDThh:mm:ss.sssZ",
            "format": "date-time",
            "example": "2012-12-31T23:59:59.125Z"
          }
        },
        "description": "Information about payment"
      },
      "CountryCode1": {
        "type": "string",
        "description": "Location country of the pickup place",
        "example": "CZ",
        "enum": [
          "UNDEFINED",
          "AC",
          "AD",
          "AE",
          "AF",
          "AG",
          "AI",
          "AL",
          "AM",
          "AN",
          "AO",
          "AQ",
          "AR",
          "AS",
          "AT",
          "AU",
          "AW",
          "AX",
          "AZ",
          "BA",
          "BB",
          "BD",
          "BE",
          "BF",
          "BG",
          "BH",
          "BI",
          "BJ",
          "BL",
          "BM",
          "BN",
          "BO",
          "BQ",
          "BR",
          "BS",
          "BT",
          "BU",
          "BV",
          "BW",
          "BY",
          "BZ",
          "CA",
          "CC",
          "CD",
          "CF",
          "CG",
          "CH",
          "CI",
          "CK",
          "CL",
          "CM",
          "CN",
          "CO",
          "CP",
          "CR",
          "CS",
          "CU",
          "CV",
          "CW",
          "CX",
          "CY",
          "CZ",
          "DE",
          "DG",
          "DJ",
          "DK",
          "DM",
          "DO",
          "DZ",
          "EA",
          "EC",
          "EE",
          "EG",
          "EH",
          "ER",
          "ES",
          "ET",
          "EU",
          "EZ",
          "FI",
          "FJ",
          "FK",
          "FM",
          "FO",
          "FR",
          "FX",
          "GA",
          "GB",
          "GD",
          "GE",
          "GF",
          "GG",
          "GH",
          "GI",
          "GL",
          "GM",
          "GN",
          "GP",
          "GQ",
          "GR",
          "GS",
          "GT",
          "GU",
          "GW",
          "GY",
          "HK",
          "HM",
          "HN",
          "HR",
          "HT",
          "HU",
          "IC",
          "ID",
          "IE",
          "IL",
          "IM",
          "IN",
          "IO",
          "IQ",
          "IR",
          "IS",
          "IT",
          "JE",
          "JM",
          "JO",
          "JP",
          "KE",
          "KG",
          "KH",
          "KI",
          "KM",
          "KN",
          "KP",
          "KR",
          "KW",
          "KY",
          "KZ",
          "LA",
          "LB",
          "LC",
          "LI",
          "LK",
          "LR",
          "LS",
          "LT",
          "LU",
          "LV",
          "LY",
          "MA",
          "MC",
          "MD",
          "ME",
          "MF",
          "MG",
          "MH",
          "MK",
          "ML",
          "MM",
          "MN",
          "MO",
          "MP",
          "MQ",
          "MR",
          "MS",
          "MT",
          "MU",
          "MV",
          "MW",
          "MX",
          "MY",
          "MZ",
          "NA",
          "NC",
          "NE",
          "NF",
          "NG",
          "NI",
          "NL",
          "NO",
          "NP",
          "NR",
          "NT",
          "NU",
          "NZ",
          "OM",
          "PA",
          "PE",
          "PF",
          "PG",
          "PH",
          "PK",
          "PL",
          "PM",
          "PN",
          "PR",
          "PS",
          "PT",
          "PW",
          "PY",
          "QA",
          "RE",
          "RO",
          "RS",
          "RU",
          "RW",
          "SA",
          "SB",
          "SC",
          "SD",
          "SE",
          "SF",
          "SG",
          "SH",
          "SI",
          "SJ",
          "SK",
          "SL",
          "SM",
          "SN",
          "SO",
          "SR",
          "SS",
          "ST",
          "SU",
          "SV",
          "SX",
          "SY",
          "SZ",
          "TA",
          "TC",
          "TD",
          "TF",
          "TG",
          "TH",
          "TJ",
          "TK",
          "TL",
          "TM",
          "TN",
          "TO",
          "TP",
          "TR",
          "TT",
          "TV",
          "TW",
          "TZ",
          "UA",
          "UG",
          "UK",
          "UM",
          "US",
          "UY",
          "UZ",
          "VA",
          "VC",
          "VE",
          "VG",
          "VI",
          "VN",
          "VU",
          "WF",
          "WS",
          "XI",
          "XU",
          "XK",
          "YE",
          "YT",
          "YU",
          "ZA",
          "ZM",
          "ZR",
          "ZW"
        ]
      },
      "ExceptionallyOpeningHoursRequest": {
        "required": [
          "date"
        ],
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "example": "2024-10-28"
          },
          "hours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          },
          "reason": {
            "type": "string",
            "example": "Public holidays"
          }
        }
      },
      "Gps": {
        "required": [
          "latitude",
          "longitude"
        ],
        "type": "object",
        "properties": {
          "latitude": {
            "type": "string"
          },
          "longitude": {
            "type": "string"
          }
        }
      },
      "LocationRequest": {
        "required": [
          "city",
          "gps",
          "line1",
          "zipCode"
        ],
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "example": "Krizikova 70"
          },
          "line2": {
            "type": "string"
          },
          "city": {
            "type": "string",
            "example": "Praha 8"
          },
          "region": {
            "type": "string"
          },
          "state": {
            "type": "string",
            "description": "State name - applicable for countries such as the US, Canada, etc.",
            "example": "California"
          },
          "zipCode": {
            "type": "string",
            "example": "158 00"
          },
          "gps": {
            "$ref": "#/components/schemas/Gps"
          }
        },
        "description": "Location (address) of the pickup place - except for country"
      },
      "OpeningHoursIntervalRequest": {
        "required": [
          "from",
          "to"
        ],
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "example": "09:00"
          },
          "to": {
            "type": "string",
            "example": "17:00"
          }
        }
      },
      "OpeningHoursRequest": {
        "required": [
          "regular"
        ],
        "type": "object",
        "properties": {
          "regular": {
            "$ref": "#/components/schemas/RegularOpeningHoursRequest"
          },
          "exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ExceptionallyOpeningHoursRequest"
            }
          }
        },
        "description": "Opening hours of the pickup place"
      },
      "PickupPlaceCreate": {
        "required": [
          "countryCode",
          "email",
          "eshopId",
          "location",
          "name",
          "openingHours",
          "originPickupPlaceId",
          "phone",
          "storageTimeInDays",
          "type"
        ],
        "type": "object",
        "properties": {
          "eshopId": {
            "type": "string",
            "description": "Id of the eshop this pickup place belongs to - required if originType != CARRIER",
            "format": "uuid",
            "example": "12345678-1234-1234-1234-1234567890ab"
          },
          "type": {
            "$ref": "#/components/schemas/DestinationType"
          },
          "originPickupPlaceId": {
            "type": "string",
            "description": "Origin-specific id of the pickup place",
            "example": "123456789"
          },
          "name": {
            "type": "string",
            "description": "Name of the pickup place",
            "example": "Pobocka Karlin"
          },
          "location": {
            "$ref": "#/components/schemas/LocationRequest"
          },
          "countryCode": {
            "$ref": "#/components/schemas/CountryCode1"
          },
          "note": {
            "type": "string",
            "description": "Optional note on the pickup place",
            "example": "This pickup place is a really nice place"
          },
          "phone": {
            "type": "string",
            "description": "Pickup place phone",
            "example": "+420 987 654 321"
          },
          "email": {
            "type": "string",
            "example": "karlin@mybriliantcompany.com"
          },
          "storageTimeInDays": {
            "type": "integer",
            "format": "int32",
            "example": 3
          },
          "openingHours": {
            "$ref": "#/components/schemas/OpeningHoursRequest"
          }
        }
      },
      "RegularOpeningHoursRequest": {
        "type": "object",
        "properties": {
          "monday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          },
          "tuesday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          },
          "wednesday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          },
          "thursday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          },
          "friday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          },
          "saturday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          },
          "sunday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalRequest"
            }
          }
        }
      },
      "ExceptionallyOpeningHoursResponse": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "example": "2023-02-17"
          },
          "from": {
            "pattern": "HH:mm:ss",
            "type": "string",
            "example": "08:00:00",
            "deprecated": true
          },
          "to": {
            "pattern": "HH:mm:ss",
            "type": "string",
            "example": "18:00:00",
            "deprecated": true
          },
          "hours": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          },
          "reason": {
            "type": "string",
            "example": "Reconstruction"
          }
        },
        "description": "Exceptional opening hours - e.g. public holidays"
      },
      "GPS": {
        "type": "object",
        "properties": {
          "latitude": {
            "type": "number",
            "description": "GPS latitude",
            "format": "double",
            "example": 14.4542789
          },
          "longitude": {
            "type": "number",
            "description": "GPS longitude",
            "format": "double",
            "example": 50.0933864
          }
        },
        "description": "GPS of pickup place location"
      },
      "LocationResponse": {
        "type": "object",
        "properties": {
          "line1": {
            "type": "string",
            "description": "address line1",
            "example": "Sesame street 11b"
          },
          "line2": {
            "type": "string",
            "description": "address line2"
          },
          "city": {
            "type": "string",
            "example": "MyCoolCity"
          },
          "region": {
            "type": "string",
            "description": "optional address region",
            "example": "Michigan"
          },
          "state": {
            "type": "string",
            "description": "optional address state",
            "example": "Michigan"
          },
          "zipCode": {
            "type": "string",
            "example": "48228"
          },
          "gps": {
            "$ref": "#/components/schemas/GPS"
          }
        },
        "description": "Location of pickup place"
      },
      "OpeningHoursIntervalResponse": {
        "type": "object",
        "properties": {
          "from": {
            "pattern": "HH:mm:ss",
            "type": "string",
            "example": "08:00:00"
          },
          "to": {
            "pattern": "HH:mm:ss",
            "type": "string",
            "example": "18:00:00"
          }
        }
      },
      "OpeningHoursResponse": {
        "required": [
          "exceptions",
          "regular"
        ],
        "type": "object",
        "properties": {
          "regular": {
            "$ref": "#/components/schemas/RegularOpeningHoursResponse"
          },
          "exceptions": {
            "type": "array",
            "description": "Exceptional opening hours - e.g. public holidays",
            "items": {
              "$ref": "#/components/schemas/ExceptionallyOpeningHoursResponse"
            }
          }
        },
        "description": "Opening Hours and exceptions"
      },
      "OriginType": {
        "type": "string",
        "description": "Type of origin system",
        "example": "SHOPTET",
        "enum": [
          "CARRIER",
          "SHOPTET",
          "SHOPTET_PREMIUM",
          "SHOPIFY",
          "UPGATES",
          "API_USER"
        ]
      },
      "PickupPlaceResponse": {
        "required": [
          "carrier",
          "countryCode",
          "email",
          "id",
          "location",
          "name",
          "openingHours",
          "origin",
          "originPickupPlaceId",
          "phone",
          "type",
          "zoneId"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Identifier of pickup place",
            "format": "uuid"
          },
          "eshopId": {
            "type": "string",
            "description": "Id of the eshop this pickup place belongs to",
            "format": "uuid",
            "example": "edf4b2ec-c1fc-42da-ba86-eb3a236cd565"
          },
          "type": {
            "$ref": "#/components/schemas/DestinationType"
          },
          "carrier": {
            "$ref": "#/components/schemas/Carrier"
          },
          "originPickupPlaceId": {
            "type": "string",
            "description": "Origin ID of parcelShop/Box",
            "example": "FZ001"
          },
          "origin": {
            "$ref": "#/components/schemas/OriginType"
          },
          "countryCode": {
            "$ref": "#/components/schemas/CountryCode1"
          },
          "zoneId": {
            "type": "string",
            "example": "America/New_York"
          },
          "name": {
            "type": "string",
            "example": "My cool pickup place"
          },
          "location": {
            "$ref": "#/components/schemas/LocationResponse"
          },
          "note": {
            "type": "string",
            "example": "Amazing place"
          },
          "phone": {
            "type": "string",
            "description": "Customer phone",
            "example": "+420 123 456 789"
          },
          "email": {
            "type": "string",
            "description": "email",
            "example": "iboughtsomething@customer.com"
          },
          "image": {
            "type": "string",
            "description": "Pickup place image link",
            "example": "https://cdn.images/amazing.png"
          },
          "storageTime": {
            "type": "integer",
            "description": "How long the shipment will be stored, in days",
            "format": "int32",
            "example": 4
          },
          "openingHours": {
            "$ref": "#/components/schemas/OpeningHoursResponse"
          }
        },
        "description": "Pickup Place"
      },
      "RegularOpeningHoursResponse": {
        "type": "object",
        "properties": {
          "monday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          },
          "tuesday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          },
          "wednesday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          },
          "thursday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          },
          "friday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          },
          "saturday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          },
          "sunday": {
            "type": "array",
            "description": "Time interval(s) during the day when the place is open - null or empty means closed all day",
            "items": {
              "$ref": "#/components/schemas/OpeningHoursIntervalResponse"
            }
          }
        },
        "description": "Regular opening hours"
      },
      "PickupPlaceUpdate": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/DestinationType"
          },
          "originPickupPlaceId": {
            "type": "string",
            "description": "Origin-specific id of the pickup place",
            "example": "123456789"
          },
          "name": {
            "type": "string",
            "description": "Name of the pickup place",
            "example": "Pobocka Karlin"
          },
          "location": {
            "$ref": "#/components/schemas/LocationRequest"
          },
          "countryCode": {
            "$ref": "#/components/schemas/CountryCode1"
          },
          "note": {
            "type": "string",
            "description": "Optional note on the pickup place",
            "example": "This pickup place is a really nice place"
          },
          "phone": {
            "type": "string",
            "description": "Pickup place phone",
            "example": "+420 987 654 321"
          },
          "email": {
            "type": "string",
            "example": "karlin@mybriliantcompany.com"
          },
          "storageTimeInDays": {
            "type": "integer",
            "format": "int32",
            "example": 3
          },
          "openingHours": {
            "$ref": "#/components/schemas/OpeningHoursRequest"
          }
        }
      },
      "CollectionResponsePickupPlaceResponse": {
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "description": "Collection response wrapper",
            "items": {
              "$ref": "#/components/schemas/PickupPlaceResponse"
            }
          },
          "page": {
            "$ref": "#/components/schemas/CollectionPage"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "name": "X-API-Key",
        "in": "header"
      }
    }
  }
}
