{
  "openapi": "3.1.0",
  "info": {
    "title": "Schemas for www.prow.trade",
    "version": "1.6.0"
  },
  "components": {
    "schemas": {
      "Address": {
        "type": "object",
        "title": "Address",
        "description": "",
        "properties": {
          "countryCode": {
            "type": "string"
          },
          "county": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "street": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          },
          "notes": {
            "type": "string"
          }
        },
        "additionalProperties": false
      },
      "Attachment": {
        "type": "object",
        "title": "Attachment",
        "description": "",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "examples": [
              "https://any-timber-erp.com/sample/pointed_v5"
            ]
          },
          "file": {
            "type": "string",
            "format": "byte",
            "examples": [
              "V5_drawing"
            ]
          },
          "format": {
            "type": "string",
            "examples": [
              "pdf"
            ]
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "40858"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "67041389-e564-4b63-96d3-c69f8df7bc4c"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "EudrNumber": {
        "type": "object",
        "title": "EudrNumber",
        "description": "",
        "properties": {
          "referenceNumber": {
            "type": "string",
            "description": "Reference number (public)",
            "examples": [
              "46345"
            ]
          },
          "verificationNumber": {
            "type": "string",
            "description": "Confirmation number (private)",
            "examples": [
              "46345ds"
            ]
          },
          "notes": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Grade": {
        "type": "object",
        "title": "Grade",
        "description": "Grade defines the qualities of wood above species.\r\nSpecifically:\r\nKnots - e.g. max size, count per area, position (face/arris)\r\nDefects - e.g. cracks, shakes, bule, rot, twist, worms, bends, wane, colour changes - including the maximum allowances\r\nComposition - e.g. Solid wood / Finger Jointed / Edge Glued / CLT\r\n(note that humidity/drying attributes are under Treatment-\u0026gt;Seasoning)\r\n",
        "properties": {
          "name": {
            "type": "string",
            "description": "Meaning of the name/code is pre-agreed between the parties. Recommended to use standard notion of relevant market or as close as possible.",
            "examples": [
              "B"
            ]
          },
          "codeName": {
            "type": "string",
            "description": "Can be used in addition to Name attribute to make the mapping easier - this is relevant when the sending (to the API) party can not provide numeric ID or GUID attribute.",
            "examples": [
              "B"
            ]
          },
          "clearFacesCount": {
            "type": "integer",
            "description": "Number of wider sides knot-free. Value can be 1 or 2.",
            "examples": [
              "1"
            ]
          },
          "clearEdgesCount": {
            "type": "integer",
            "description": "Number of narrower sides knot-free. Value can be 1 or 2.",
            "examples": [
              "0"
            ]
          },
          "clearSidesType": {
            "type": "string",
            "description": "Indication of \u0022how clear\u0022 the surface must be e.g. sometimes full knots below 3mm in diameter are allowed. Values must be pre-agreed between the parties.",
            "examples": [
              "K3"
            ]
          },
          "fjVertical": {
            "type": "boolean",
            "description": "Vertical finger-joint used",
            "examples": [
              "true"
            ]
          },
          "fjHorizontal": {
            "type": "boolean",
            "description": "Horizontal finger-joint used",
            "examples": [
              "false"
            ]
          },
          "fjLength": {
            "type": "number",
            "format": "decimal",
            "description": "Length of the \u0022finger\u0022 in finger-joint process in millimeters (mm)",
            "examples": [
              "5"
            ]
          },
          "laminated": {
            "type": "string",
            "description": "Denotes edge-glued timber. Any value could be read as \u0022yes\u0022 but the data type is (not YesNo) left open for parties to further specify the lamination type.",
            "examples": [
              "false"
            ]
          },
          "glue": {
            "type": "string",
            "description": "Used together with laminated/FJ in case parties want to further specify that the glue must be e.g. waterproof",
            "examples": [
              "waterproof"
            ]
          },
          "sawingPattern": {
            "$ref": "#/components/schemas/SawingPattern"
          },
          "heartwoodRate": {
            "type": "number",
            "format": "decimal",
            "description": "Maximum % of heartwood that can be contained within the pack/lot.",
            "examples": [
              "50"
            ]
          },
          "maxRingWidth": {
            "type": "number",
            "format": "decimal",
            "description": "Specifies the maximum tree year/growth ring size in millimeters (mm)",
            "examples": [
              "2.5"
            ]
          },
          "roundwoodInWater": {
            "type": "integer",
            "description": "The maximum number of days the roundwood (that the material is cut from) has been in the water",
            "examples": [
              "17"
            ]
          },
          "reject": {
            "type": "boolean",
            "examples": [
              "none"
            ]
          },
          "rejectSpecification": {
            "type": "string",
            "description": "Any value could be read as \u0022yes\u0022 but the data type is (not YesNo) left open for parties to further specify different reject levels."
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "151"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "c2da9bbf-d0a2-4d2e-85ef-010d67f33190"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Impregnation": {
        "type": "object",
        "title": "Impregnation",
        "description": "Chemical treatment against decay and insect infestation",
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "Tan Green H3"
            ]
          },
          "chemical": {
            "type": "string",
            "description": "Substance used for protection\r\n(TBD: can we convert it to an enum?)",
            "examples": [
              "Tanalith"
            ]
          },
          "level": {
            "type": "integer",
            "description": "Values should be in range 1..6",
            "examples": [
              "3"
            ]
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "1285"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "6f3982bb-e594-4317-93bd-081144215fce"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Minibundle": {
        "type": "object",
        "title": "Minibundle",
        "description": "",
        "properties": {
          "columns": {
            "type": "integer",
            "description": "How many pieces (boards) in the bundle horizontally in one layer. In case of non-rectangular bundle (e.g. rounded moldings) this is just the total number of pieces.",
            "examples": [
              "5"
            ]
          },
          "rows": {
            "type": "integer",
            "description": "How many pieces (boards) in the bundle vertically = how many layers",
            "examples": [
              "3"
            ]
          },
          "specification": {
            "type": "string",
            "description": "Used when different mini-bundling styles are used by parties e.g. ends/fully wrapped in plastic, string-tied.",
            "examples": [
              "strings both ends"
            ]
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "501"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "6c992af0-cc88-4443-ba72-9a965f04c364"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Order": {
        "type": "object",
        "title": "Order",
        "description": "",
        "properties": {
          "title": {
            "type": "string"
          },
          "orderNumber": {
            "type": "integer"
          },
          "numberAmendment": {
            "type": "string"
          },
          "numberBuyer": {
            "type": "string"
          },
          "numberSeller": {
            "type": "string"
          },
          "serviceContract": {
            "type": "boolean"
          },
          "contractType": {
            "type": "string"
          },
          "issueDate": {
            "type": "string",
            "format": "date-time"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "buyer": {
            "$ref": "#/components/schemas/Account"
          },
          "seller": {
            "$ref": "#/components/schemas/Account"
          },
          "shipFrom": {
            "$ref": "#/components/schemas/Account"
          },
          "destination": {
            "$ref": "#/components/schemas/Account"
          },
          "agent": {
            "$ref": "#/components/schemas/Account"
          },
          "parties": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            }
          },
          "incoterms": {
            "type": "string"
          },
          "paymentTerms": {
            "type": "string"
          },
          "currency": {
            "type": "string"
          },
          "clauses1": {
            "type": "string"
          },
          "clauses2": {
            "type": "string"
          },
          "clauses3": {
            "type": "string"
          },
          "contactPerson": {
            "type": "string"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderRow"
            }
          },
          "expenses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderExpense"
            }
          },
          "original": {
            "$ref": "#/components/schemas/Attachment"
          },
          "documents": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Attachment"
            }
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "OrderExpense": {
        "type": "object",
        "title": "OrderExpense",
        "description": "",
        "properties": {
          "title": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "price": {
            "type": "number",
            "format": "decimal"
          },
          "priceBasis": {
            "$ref": "#/components/schemas/UOM"
          },
          "valueBasis": {
            "$ref": "#/components/schemas/UOM",
            "description": "TBD: dependency to Incoterms?"
          },
          "responsibility": {
            "$ref": "#/components/schemas/Responsibility"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "OrderRow": {
        "type": "object",
        "title": "OrderRow",
        "description": "Article data is kept outside Wood class to enable for non-timber items",
        "properties": {
          "rowNumber": {
            "type": "integer"
          },
          "rowIdentifier": {
            "type": "string"
          },
          "articleID": {
            "type": "string"
          },
          "articleName": {
            "type": "string"
          },
          "wood": {
            "$ref": "#/components/schemas/Wood"
          },
          "lengths": {
            "$ref": "#/components/schemas/TimberLengths"
          },
          "ean": {
            "type": "string"
          },
          "ean2": {
            "type": "string"
          },
          "material": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "format": "decimal"
          },
          "quantityUnit": {
            "$ref": "#/components/schemas/UOM"
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "reference": {
            "type": "string"
          },
          "destination": {
            "$ref": "#/components/schemas/Account"
          },
          "price": {
            "$ref": "#/components/schemas/Price"
          },
          "packHeight": {
            "type": "number",
            "format": "decimal"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Packing": {
        "type": "object",
        "title": "Packing",
        "description": "",
        "properties": {
          "name": {
            "type": "string"
          },
          "plasticSides": {
            "type": "integer",
            "description": "How many sides of the pack to wrap in plastic, typical values are 1 and 5.",
            "examples": [
              "5"
            ]
          },
          "plasticSpecification": {
            "type": "string",
            "description": "Used in case the parties need different types of plastics for different packs and need to distinguish between them.",
            "examples": [
              "without logos"
            ]
          },
          "pallet": {
            "type": "boolean",
            "description": "EUR/EPAL - pallet under the pack",
            "examples": [
              "true"
            ]
          },
          "columns": {
            "type": "integer",
            "description": "How many pieces (boards) in the pack horizontally in one layer.",
            "examples": [
              "15"
            ]
          },
          "rows": {
            "type": "integer",
            "description": "How many pieces (boards) in the pack vertically = how many layers.",
            "examples": [
              "9"
            ]
          },
          "sticksCount": {
            "type": "integer",
            "description": "How many sticks in one layer (the same level (horizontally).",
            "examples": [
              "6"
            ]
          },
          "sticksLayers": {
            "type": "integer",
            "description": "After how many layers to use sticks. Value 1 means sticks between each layer.",
            "examples": [
              "2"
            ]
          },
          "strapsCount": {
            "type": "integer",
            "description": "How many straps around the pack",
            "examples": [
              "4"
            ]
          },
          "strapsType": {
            "$ref": "#/components/schemas/Straps",
            "examples": [
              "plastic"
            ]
          },
          "labelsCount": {
            "type": "integer",
            "description": "How many pack labels to apply on",
            "examples": [
              "3"
            ]
          },
          "labelsPlacement": {
            "type": "string",
            "description": "Used in case parties need different logic for label placement (for the same number of labels) on different packs.",
            "examples": [
              "both ends \u002B side"
            ]
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "988"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "14607f9d-0e17-4510-b928-cd39cd78c954"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Price": {
        "type": "object",
        "title": "Price",
        "description": "",
        "properties": {
          "currencyCode": {
            "type": "string"
          },
          "priceUnit": {
            "$ref": "#/components/schemas/UOM"
          },
          "value": {
            "type": "number",
            "format": "decimal",
            "nullable": false
          }
        },
        "additionalProperties": false,
        "required": [
          "value"
        ]
      },
      "Profile": {
        "type": "object",
        "title": "Profile",
        "description": "Profile is figuratively speaking the 2D image of the piece (board) when looked at from the end; for sawn timber it\u0027s always rectangle, for e.g. terrace board it\u0027s a rectangle with notches on one face side. See also Shape description.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Meaning of the name/code is pre-agreed between the parties. Classic examples are process- or machinery related e.g. planed (S4S), calibrated, milled, rounded, S4Sr3",
            "examples": [
              "S4S R3"
            ]
          },
          "edgesCount": {
            "type": "integer",
            "description": "Number of thinner sides processed, value can be 1 or 2",
            "examples": [
              "2"
            ]
          },
          "facesCount": {
            "type": "integer",
            "description": "Number of wider sides processed, value can be 1 or 2",
            "examples": [
              "4"
            ]
          },
          "arrisStyle": {
            "type": "string",
            "description": "Classic examples are sharp (not eased), rounded, chamfered",
            "examples": [
              "Rounded"
            ]
          },
          "arrisRadius": {
            "type": "number",
            "format": "decimal",
            "description": "Used together with ArrisStyle attribute, value in millimeters (mm)",
            "examples": [
              "3"
            ]
          },
          "drawing": {
            "$ref": "#/components/schemas/Attachment",
            "description": "Can be a web (http/ftp) or an internal reference as agreed between the parties"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "788"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "1f9f3c29-eeb5-4013-9279-6f942b76335a"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "SawnPackLength": {
        "type": "object",
        "title": "SawnPackLength",
        "description": "",
        "properties": {
          "length": {
            "type": "number",
            "format": "decimal",
            "nullable": false
          },
          "pieces": {
            "type": "integer",
            "nullable": false,
            "description": "Number of pieces (boards) within the pack of that length",
            "examples": [
              "89"
            ]
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "50112"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "958a50f9-d0c1-4e19-a407-428e012eabff"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "required": [
          "length",
          "pieces"
        ]
      },
      "SawnShipment": {
        "type": "object",
        "title": "SawnShipment",
        "description": "",
        "properties": {
          "wood": {
            "$ref": "#/components/schemas/Wood",
            "nullable": false
          },
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SawnPack",
              "nullable": false
            }
          },
          "rowNumber": {
            "type": "integer",
            "examples": [
              "1"
            ]
          },
          "eudrNumbers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EudrNumber"
            }
          },
          "name": {
            "type": "string",
            "examples": [
              "T\u00F5stamaa ehitusele"
            ]
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "234"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "92d8a352-ff8e-446d-8ca5-eb22d1fb5499"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "required": [
          "wood",
          "packs"
        ]
      },
      "Seasoning": {
        "type": "object",
        "title": "Seasoning",
        "description": "Dryness/humidity properties of the wood",
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "KD 8%"
            ]
          },
          "kd": {
            "type": "boolean",
            "description": "Indicates quick drying process in a kiln. Value \u0022No\u0022 is specified it indicates long drying in ambient temperature.",
            "examples": [
              "true"
            ]
          },
          "ht5630": {
            "type": "boolean",
            "description": "The wood has been certified as ISPM 15 standard for Heat Treated 56/30",
            "examples": [
              "true"
            ]
          },
          "percent": {
            "type": "number",
            "format": "decimal",
            "description": "Nominal humidity % with \u002B/- 2% tolerance. Can be interpreted as wet material when left empty.",
            "examples": [
              "8"
            ]
          },
          "thermoIntense": {
            "type": "integer",
            "description": "Possible values: Yes=Intense, No=Medium, null=no thermo treatment.\r\n(TBD: if new needed thermo types would show up, we\u0027d better to convert it to an enum?)"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "7858"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "1ac2fa57-ae55-40bb-8e05-d2c7b14a14f2"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Shape": {
        "type": "object",
        "title": "Shape",
        "description": "Used (as opposed to Profile) for mechanical shapes \u0022visible\u0022 in the 2D image when looking the piece (board) from the side e.g. pointed ends, grooves, holes.",
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "Pointed V5"
            ]
          },
          "drawing": {
            "$ref": "#/components/schemas/Attachment",
            "description": "Can be a web (http/ftp) or an internal reference as agreed between the parties"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "1407"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "5f2176ed-1ce4-4a83-833a-2991bcfc612d"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Stock": {
        "type": "object",
        "title": "Stock",
        "description": "There are two ways to express availability in a certain location. We can specify either\r\na) each pack with all necessary details (suggested)\r\nb) quantities of wood by length (simplified)\r\nYou should not have both Stock.Length and Stock.Packs specified, some API-s might have constraint to limit only one non-null.",
        "properties": {
          "location": {
            "$ref": "#/components/schemas/Account"
          },
          "name": {
            "type": "string"
          },
          "rowNumber": {
            "type": "integer"
          },
          "wood": {
            "$ref": "#/components/schemas/Wood"
          },
          "packs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SawnPack"
            }
          },
          "lengths": {
            "$ref": "#/components/schemas/TimberLengths"
          },
          "quantity": {
            "type": "number",
            "format": "decimal"
          },
          "quantityUnit": {
            "$ref": "#/components/schemas/UOM"
          },
          "price": {
            "type": "number",
            "format": "decimal"
          },
          "priceUnit": {
            "$ref": "#/components/schemas/UOM"
          },
          "currency": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Surface": {
        "type": "object",
        "title": "Surface",
        "description": "That includes e.g. painting, oiling, lacquering, brushing, paper and other surface treatments",
        "properties": {
          "name": {
            "type": "string",
            "examples": [
              "Oiled Hay"
            ]
          },
          "ralCode": {
            "type": "string",
            "description": "Values limited to RAL colour standard"
          },
          "ncsCode": {
            "type": "string",
            "description": "Values limited to NCS color standard"
          },
          "rgbCode": {
            "type": "string",
            "description": "Values limited to RGB color model in HEX format",
            "examples": [
              "#ffcc66"
            ]
          },
          "transparency": {
            "type": "number",
            "format": "decimal",
            "description": "Percent of transparency of the coating material",
            "examples": [
              "70"
            ]
          },
          "refinement": {
            "type": "string",
            "description": "Additional details of the surface treatment e.g. granularity or strength of brushing",
            "examples": [
              "Granular"
            ]
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "1355"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "3236fd03-c549-47d1-a715-39663abb4acd"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "TimberLengths": {
        "type": "object",
        "title": "TimberLengths",
        "description": "",
        "properties": {
          "exact": {
            "type": "array",
            "items": {
              "type": "number",
              "format": "decimal"
            }
          },
          "minimum": {
            "type": "number",
            "format": "decimal"
          },
          "maximum": {
            "type": "number",
            "format": "decimal"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Tolerances": {
        "type": "object",
        "title": "Tolerances",
        "description": "",
        "properties": {
          "thicknessPlus": {
            "type": "number",
            "format": "decimal",
            "description": "Maximum difference ABOVE specified Thickness in millimeters (mm)",
            "examples": [
              "0.2"
            ]
          },
          "thicknessMinus": {
            "type": "number",
            "format": "decimal",
            "description": "Maximum difference BELOW specified Thickness in millimeters (mm)",
            "examples": [
              "0"
            ]
          },
          "widthPlus": {
            "type": "number",
            "format": "decimal",
            "description": "Maximum difference ABOVE specified Width in millimeters (mm)",
            "examples": [
              "0.3"
            ]
          },
          "widthMinus": {
            "type": "number",
            "format": "decimal",
            "description": "Maximum difference BELOW specified Width in millimeters (mm)",
            "examples": [
              "0"
            ]
          },
          "lengthPlus": {
            "type": "number",
            "format": "decimal",
            "description": "Maximum difference ABOVE specified Length in millimeters (mm)",
            "examples": [
              "2"
            ]
          },
          "lengthMinus": {
            "type": "number",
            "format": "decimal",
            "description": "Maximum difference BELOW specified Length in millimeters (mm)",
            "examples": [
              "1"
            ]
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "1012"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "ec047650-29f8-412b-884f-75c59bb7cbb7"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Treatment": {
        "type": "object",
        "title": "Treatment",
        "description": "Treatment refers to set of qualities of timber that can change during the \u0022lifetime\u0022 of a pack i.e. while the pack number is the same. Treatment entity itself (mostly) refers to combinations of the 4 components.",
        "properties": {
          "name": {
            "type": "string",
            "description": "Meaning of the name/code is pre-agreed between the parties. Some classic examples are KD10% Tanalith, Black Painted \u0026 Pointed, Intense-Thermo Grooved",
            "examples": [
              "KD8 HT"
            ]
          },
          "seasoning": {
            "$ref": "#/components/schemas/Seasoning"
          },
          "impregnation": {
            "$ref": "#/components/schemas/Impregnation"
          },
          "surface": {
            "$ref": "#/components/schemas/Surface"
          },
          "shape": {
            "$ref": "#/components/schemas/Shape"
          },
          "other": {
            "type": "string",
            "description": "All other qualities under the definition described in Treatment entity that do not belong below any of the components e.g. Brandlabeled",
            "examples": [
              "Stamped"
            ]
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "5678"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "406847e8-bc59-46cc-9ba6-6deab8f4999e"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Wood": {
        "type": "object",
        "title": "Wood",
        "description": "Dimensions\r\nThere are 3 sets of dimension (Thickness * Width) with numbers (not names) because not all parties use the common Actual/Nominal logic. \r\nIn most cases only the primary size would be used.\r\nThe interpretation of the dimension numbers 1..3 is delegated to the parties as needed.\r\nUsually Thickness \u0026lt; Width but when the opposite is specified it means the board within the pack must be turned standing on the thinner edge.",
        "properties": {
          "species": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Species",
              "nullable": false
            }
          },
          "grade": {
            "$ref": "#/components/schemas/Grade"
          },
          "thickness": {
            "type": "number",
            "format": "decimal",
            "nullable": false,
            "description": "Value in millimeters (mm). See the logic in Wood class documentation Dimensions section.",
            "examples": [
              "12.5"
            ]
          },
          "thickness2": {
            "type": "number",
            "format": "decimal",
            "description": "Value in millimeters (mm). See the logic in Wood class documentation Dimensions section.",
            "examples": [
              "0"
            ]
          },
          "thickness3": {
            "type": "number",
            "format": "decimal",
            "description": "Value in millimeters (mm). See the logic in Wood class documentation Dimensions section.",
            "examples": [
              "0"
            ]
          },
          "width": {
            "type": "number",
            "format": "decimal",
            "nullable": false,
            "description": "Value in millimeters (mm). See the logic in Wood class documentation Dimensions section.",
            "examples": [
              "95"
            ]
          },
          "width2": {
            "type": "number",
            "format": "decimal",
            "description": "Value in millimeters (mm). See the logic in Wood class documentation Dimensions section.",
            "examples": [
              "0"
            ]
          },
          "width3": {
            "type": "number",
            "format": "decimal",
            "description": "Value in millimeters (mm). See the logic in Wood class documentation Dimensions section.",
            "examples": [
              "0"
            ]
          },
          "ppp": {
            "type": "integer",
            "description": "Pieces Per Pack (PPP) should not be filled when there is the exact pack description including PackLength attribute",
            "examples": [
              "98"
            ]
          },
          "treatment": {
            "$ref": "#/components/schemas/Treatment"
          },
          "profile": {
            "$ref": "#/components/schemas/Profile"
          },
          "minibundle": {
            "$ref": "#/components/schemas/Minibundle"
          },
          "certificatePercent": {
            "type": "number",
            "format": "decimal",
            "description": "Mainly used with PEFC cert",
            "examples": [
              "89"
            ]
          },
          "certification": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Certificate"
            }
          },
          "epdGwp": {
            "type": "number",
            "format": "decimal",
            "description": "Environmental Product Declarations (EPD) measure in the Global Warming Potential (GWP) per cubic meter (m\u00B3)",
            "examples": [
              "15.6"
            ]
          },
          "tolerances": {
            "$ref": "#/components/schemas/Tolerances"
          },
          "packing": {
            "$ref": "#/components/schemas/Packing"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "456"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "c9d461c2-7ddf-41b5-9e84-49ecbabebd1e"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "required": [
          "species",
          "thickness",
          "width"
        ]
      },
      "Waybill": {
        "type": "object",
        "title": "Waybill",
        "description": "Represents a delivery note / specification to customer / service partner or relocation of own goods",
        "properties": {
          "submissionTime": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "departureTime": {
            "type": "string",
            "format": "date-time",
            "nullable": false
          },
          "unloadingTime": {
            "type": "string",
            "format": "date-time"
          },
          "number": {
            "type": "string"
          },
          "numberSender": {
            "type": "string"
          },
          "seller": {
            "$ref": "#/components/schemas/Account"
          },
          "receiver": {
            "$ref": "#/components/schemas/Account",
            "nullable": false
          },
          "owner": {
            "$ref": "#/components/schemas/Account",
            "nullable": false
          },
          "agent": {
            "$ref": "#/components/schemas/Account"
          },
          "shipFrom": {
            "$ref": "#/components/schemas/Account"
          },
          "destination": {
            "$ref": "#/components/schemas/Account"
          },
          "transport": {
            "$ref": "#/components/schemas/Account",
            "nullable": false
          },
          "supervisor": {
            "$ref": "#/components/schemas/Account"
          },
          "totalJourneyMileage": {
            "type": "number",
            "format": "decimal"
          },
          "sawnShipments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SawnShipment"
            }
          },
          "currency": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "required": [
          "submissionTime",
          "departureTime",
          "receiver",
          "owner",
          "transport"
        ]
      },
      "SawnPack": {
        "type": "object",
        "title": "SawnPack",
        "description": "By definition there\u0027s only single cross-cut-dimensions in a pack, for Oak etc varying with let\u0027s use average width or virtual sub-packs",
        "properties": {
          "rowNumber": {
            "type": "integer",
            "description": "Sequence number often referred to as \u0022position\u0022 on that waybill or lot. Values should be numbers like from 1 .. 30 (e.g.) without gaps.",
            "examples": [
              "1"
            ]
          },
          "packNumber": {
            "type": "string",
            "nullable": false,
            "description": "Unique identifier which is printed / written on the pack. Usually this is additionally bar-coded and/or QR-coded.",
            "examples": [
              "R340125a"
            ]
          },
          "marking": {
            "type": "string",
            "description": "Identifier that is usually printed or written on the pack to specify (distinguish) a batch/lot to be handled together. In contrast to PackNumber attribute this is NOT unique.",
            "examples": [
              "MA-123X"
            ]
          },
          "articleID": {
            "type": "string",
            "description": "Product identifier as agreed between the partners. It might duplicate some of the information in other attributes or describe the goods completely - in which case all other attributes can be null.",
            "examples": [
              "A888"
            ]
          },
          "articleName": {
            "type": "string",
            "description": "This should only be filled when parties have agreed upon insert of articles \u0022on the fly\u0022 to the destination system via API.",
            "examples": [
              "Cover Board 88"
            ]
          },
          "ean": {
            "type": "string",
            "description": "The International Article Number (also known as European Article Number or EAN) from GS1 Organization. API-s might limit the value with the 13-digit constraint.",
            "examples": [
              "878020137961"
            ]
          },
          "ean2": {
            "type": "string",
            "description": "Would be used when a product is e.g. shipped directly to a customer\u0027s customer who resells them as their own product under a different EAN.",
            "examples": [
              "978020137962"
            ]
          },
          "pieces": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SawnPackLength",
              "nullable": false
            },
            "description": "In case of a normal fixed-length pack the list contains of only 1 element."
          },
          "contract": {
            "type": "string",
            "description": "Reference to sales/purchase agreement",
            "examples": [
              "FP-AA-12345 X"
            ]
          },
          "volume": {
            "type": "number",
            "format": "decimal",
            "nullable": false,
            "description": "Whole quantity of the pack in cubic meters (m\u00B3)",
            "examples": [
              "4.504"
            ]
          },
          "runningMeters": {
            "type": "number",
            "format": "decimal",
            "description": "Whole quantity of the pack in meters (m) i.e. summary of the lengths of all boards.",
            "examples": [
              "379.2"
            ]
          },
          "price": {
            "$ref": "#/components/schemas/Price",
            "description": "Currency and other options (e.g. Incoterms) should be pre-agreed between the parties and might relate to the Contract attribute.",
            "examples": [
              "202.5"
            ]
          },
          "creation": {
            "type": "string",
            "format": "date-time",
            "description": "This is mainly to easily get the age of the pack.",
            "examples": [
              "2024-12-05T07:15:02Z"
            ]
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string",
            "examples": [
              "1889"
            ]
          },
          "targetID": {
            "type": "string",
            "examples": [
              "7e7834f3-b4ef-4931-b478-f08effc2549f"
            ]
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false,
        "required": [
          "packNumber",
          "pieces",
          "volume"
        ]
      },
      "Account": {
        "type": "object",
        "title": "Account",
        "description": "Represents any kind of company / institution / location that is a stakeholder in the game",
        "properties": {
          "name": {
            "type": "string"
          },
          "legalName": {
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "registrationNumber": {
            "type": "string"
          },
          "vatNumber": {
            "type": "string"
          },
          "gln": {
            "type": "string"
          },
          "contactPerson": {
            "type": "string"
          },
          "www": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "pefcNumber": {
            "type": "string"
          },
          "fscNumber": {
            "type": "string"
          },
          "notes": {
            "type": "string"
          },
          "sourceID": {
            "type": "string"
          },
          "targetID": {
            "type": "string"
          },
          "customData": {
            "type": "object"
          }
        },
        "additionalProperties": false
      },
      "Certificate": {
        "type": "string",
        "enum": [
          "nocert",
          "pefc",
          "pefccs",
          "fsc100",
          "fscmix",
          "fsc70",
          "fsc10",
          "fsccw"
        ],
        "x-enumNames": [
          "No Cert",
          "PEFC",
          "PEFC CS",
          "FSC 100",
          "FSC Mix",
          "FSC 70",
          "FSC 10",
          "FSC CW"
        ],
        "additionalProperties": false
      },
      "Responsibility": {
        "type": "string",
        "enum": [
          "customer",
          "supplier",
          "agent"
        ],
        "x-enumNames": [
          "Customer",
          "Supplier",
          "Agent"
        ],
        "additionalProperties": false
      },
      "SawingPattern": {
        "type": "string",
        "enum": [
          "live",
          "cant",
          "grade",
          "radial",
          "dimensional",
          "rift",
          "flat",
          "quarter"
        ],
        "x-enumNames": [
          "Live",
          "Cant",
          "Grade",
          "Radial",
          "Dimensional",
          "Rift",
          "Flat",
          "Quarter"
        ],
        "additionalProperties": false
      },
      "Species": {
        "type": "string",
        "enum": [
          "afrormosia",
          "afzelia",
          "agba",
          "alaskanCedar",
          "alder",
          "alpineFir",
          "amabilisFir",
          "amapa",
          "andoung",
          "anegre",
          "antiaris",
          "ash",
          "aspen",
          "aspenPolar",
          "austrianSpruce",
          "avodire",
          "ayan",
          "ayousAko",
          "balsamFir",
          "balsamPolar",
          "bamboo",
          "basswood",
          "beech",
          "birch",
          "birdseyeMaple",
          "blackCherry",
          "blackCottonwood",
          "blackGuarea",
          "blackSpruce",
          "bubinga",
          "californiaRedFir",
          "caribeanPine",
          "carolinaPine",
          "cedar",
          "ceiba",
          "cembraPine",
          "cherry",
          "chestnut",
          "coastSpecies",
          "cypress",
          "danta",
          "douglasFir",
          "douka",
          "easternCottonwood",
          "easternHemlock",
          "easternSoftwoods",
          "easternSpruce",
          "easternWhiteCedar",
          "easternWhitePine",
          "elliotti",
          "engelmanSpruce",
          "eucalyptus",
          "europeanLarch",
          "exotic",
          "figureSycamore",
          "fir",
          "frake",
          "framire",
          "gaboon",
          "grandFir",
          "greyElm",
          "hardMaple",
          "hemlock",
          "hornbeam",
          "idahoWhitePine",
          "ilomba",
          "imbira",
          "incCedar",
          "inlRedCedar",
          "ipe",
          "iroko",
          "jackPine",
          "kaya",
          "koto",
          "larch",
          "larricioPine",
          "lauan",
          "limba",
          "locust",
          "lodgepolePine",
          "mahogany",
          "macore",
          "mansonia",
          "maple",
          "maritimePine",
          "meranti",
          "merbeau",
          "mexicanPine",
          "mixedSoftwood",
          "mixedSYP",
          "mixedTropicalHardwood",
          "mntnHemlock",
          "niangon",
          "nobelFir",
          "norwaySpruce",
          "northernAspen",
          "northernPine",
          "northernSpecies",
          "oak",
          "okume",
          "oliverAsh",
          "olon",
          "omu",
          "oregonPine",
          "ozigo",
          "pacificCoastHemlock",
          "pacificSilverFir",
          "padauk",
          "paoAmarello",
          "pear",
          "pearwood",
          "pine",
          "plane",
          "plywoodComposite",
          "ponderosaPine",
          "prtOrfCed",
          "poucouli",
          "purpleheart",
          "radiata",
          "radiataPine",
          "redCedar",
          "redElm",
          "redOak",
          "redPine",
          "redSpruce",
          "redWhitewood",
          "redwood",
          "rioRosewood",
          "rosewood",
          "sandPine",
          "santosRosewood",
          "sapelle",
          "satinwood",
          "scotsPine",
          "silkyOak",
          "sitkaSpruce",
          "southernPine",
          "southernPondPine",
          "southernSprucePine",
          "spf",
          "spruce",
          "sugarPine",
          "swissPear",
          "swissStonePine",
          "sycamore",
          "syp",
          "taeda",
          "tamarack",
          "tauari",
          "teak",
          "tiama",
          "tineo",
          "tropicalOliver",
          "utile",
          "virginiaPine",
          "walnut",
          "wenge",
          "wey",
          "westernCedars",
          "westernHemlock",
          "westernRedCedar",
          "westernWhitePine",
          "westernWhiteSpruce",
          "westernWoods",
          "whitebarkPine",
          "whiteFir",
          "whiteOak",
          "whiteSpruce",
          "whiteWood",
          "yellowCedar",
          "yellowCypress",
          "yellowPoplar",
          "zebrano"
        ],
        "x-enumNames": [
          "Afrormosia",
          "Afzelia",
          "Agba",
          "AlaskanCedar",
          "Alder",
          "AlpineFir",
          "AmabilisFir",
          "Amapa",
          "Andoung",
          "Anegre",
          "Antiaris",
          "Ash",
          "Aspen",
          "AspenPolar",
          "AustrianSpruce",
          "Avodire",
          "Ayan",
          "Ayous/Ako",
          "BalsamFir",
          "BalsamPolar",
          "Bamboo",
          "Basswood",
          "Beech",
          "Birch",
          "BirdseyeMaple",
          "BlackCherry",
          "BlackCottonwood",
          "BlackGuarea",
          "BlackSpruce",
          "Bubinga",
          "CaliforniaRedFir",
          "CaribeanPine",
          "CarolinaPine",
          "Cedar",
          "Ceiba",
          "CembraPine",
          "Cherry",
          "Chestnut",
          "CoastSpecies",
          "Cypress",
          "Danta",
          "DouglasFir",
          "Douka",
          "EasternCottonwood",
          "EasternHemlock",
          "EasternSoftwoods",
          "EasternSpruce",
          "EasternWhiteCedar",
          "EasternWhitePine",
          "Elliotti",
          "EngelmanSpruce",
          "Eucalyptus",
          "EuropeanLarch",
          "Exotic",
          "FigureSycamore",
          "Fir",
          "Frake",
          "Framire",
          "Gaboon",
          "GrandFir",
          "GreyElm",
          "HardMaple",
          "Hemlock",
          "Hornbeam",
          "IdahoWhitePine",
          "Ilomba",
          "Imbira",
          "IncCedar",
          "InlRedCedar",
          "Ipe",
          "Iroko",
          "JackPine",
          "Kaya",
          "Koto",
          "Larch",
          "LarricioPine",
          "Lauan",
          "Limba",
          "Locust",
          "LodgepolePine",
          "Mahogany",
          "Macore",
          "Mansonia",
          "Maple",
          "MaritimePine",
          "Meranti",
          "Merbeau",
          "MexicanPine",
          "MixedSoftwood",
          "MixedSYP",
          "MixedTropicalHardwood",
          "MntnHemlock",
          "Niangon",
          "NobelFir",
          "NorwaySpruce",
          "NorthernAspen",
          "NorthernPine",
          "NorthernSpecies",
          "Oak",
          "Okume",
          "OliverAsh",
          "Olon",
          "Omu",
          "OregonPine",
          "Ozigo",
          "PacificCoastHemlock",
          "PacificSilverFir",
          "Padauk",
          "PaoAmarello",
          "Pear",
          "Pearwood",
          "Pine",
          "Plane",
          "PlywoodComposite",
          "PonderosaPine",
          "PrtOrfCed",
          "Poucouli",
          "Purpleheart",
          "Radiata",
          "RadiataPine",
          "RedCedar",
          "RedElm",
          "RedOak",
          "RedPine",
          "RedSpruce",
          "RedWhitewood",
          "Redwood",
          "RioRosewood",
          "Rosewood",
          "SandPine",
          "SantosRosewood",
          "Sapelle",
          "Satinwood",
          "ScotsPine",
          "SilkyOak",
          "SitkaSpruce",
          "SouthernPine",
          "SouthernPondPine",
          "SouthernSprucePine",
          "SPF",
          "Spruce",
          "SugarPine",
          "SwissPear",
          "SwissStonePine",
          "Sycamore",
          "SYP",
          "Taeda",
          "Tamarack",
          "Tauari",
          "Teak",
          "Tiama",
          "Tineo",
          "TropicalOliver",
          "Utile",
          "VirginiaPine",
          "Walnut",
          "Wenge",
          "Wey",
          "WesternCedars",
          "WesternHemlock",
          "WesternRedCedar",
          "WesternWhitePine",
          "WesternWhiteSpruce",
          "WesternWoods",
          "WhitebarkPine",
          "WhiteFir",
          "WhiteOak",
          "WhiteSpruce",
          "WhiteWood",
          "YellowCedar",
          "YellowCypress",
          "YellowPoplar",
          "Zebrano"
        ],
        "additionalProperties": false
      },
      "Straps": {
        "type": "string",
        "enum": [
          "metal",
          "plastic"
        ],
        "x-enumNames": [
          "Metal",
          "Plastic"
        ],
        "additionalProperties": false
      },
      "UOM": {
        "type": "string",
        "enum": [
          "volume",
          "runningMeter",
          "piece",
          "pack"
        ],
        "x-enumNames": [
          "Volume",
          "RunningMeter",
          "Piece",
          "Pack"
        ],
        "additionalProperties": false
      }
    }
  }
}