{
  "$schema": "http://json-schema.org/schema#",
  "definitions": {
    "measurement": {
      "properties": {
        "grossWeight": {
          "type": [
            "number",
            "null"
          ],
          "description": "Kilograms.",
          "multipleOf": 0.001
        },
        "netWeight": {
          "type": [
            "number",
            "null"
          ],
          "description": "Kilograms.",
          "multipleOf": 0.001
        },
        "chargeableWeight": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001,
          "description": "Kilograms."
        },
        "quantity": {
          "type": [
            "number",
            "null"
          ]
        },
        "volume": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001,
          "description": "Cubic metres."
        },
        "volumeWeight": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001,
          "description": "Kilograms. Usually only used for air freight."
        },
        "loadIndex": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001
        },
        "palletPlaces": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001
        }
      }
    },
    "dimensions": {
      "properties": {
        "length": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001,
          "description": "Metres."
        },
        "width": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001,
          "description": "Metres."
        },
        "height": {
          "type": [
            "number",
            "null"
          ],
          "multipleOf": 0.001,
          "description": "Metres."
        }
      }
    },
    "cargoLine": {
      "properties": {
        "mark": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 50
        },
        "packageType": {
          "type": [
            "string"
          ],
          "enum": [
            "uld16Feet",
            "uld20Feet",
            "container20Feet",
            "container20FeetReefer",
            "container40Feet",
            "container45Feet",
            "container45FeetHighCube",
            "aap",
            "ake",
            "bag",
            "pallet",
            "box",
            "containerCcTag5",
            "containerCc",
            "chepEuroPallet",
            "colli",
            "chepPallet",
            "crate",
            "carton",
            "containerDc",
            "deciMeterLoadIndex",
            "airplaneEngine",
            "euroPallet",
            "oneWayPallet",
            "extention",
            "flowPallet",
            "container40FeetHighCube",
            "helicopter",
            "halfPlanePlate",
            "container40FeetReefer",
            "horizontalStack",
            "ibc",
            "industrialPallet",
            "kilograms",
            "load",
            "meterLoadIndex",
            "cubicMeter",
            "shipment",
            "batch",
            "hour",
            "week",
            "shelveLocation",
            "otherPalletType",
            "piece",
            "planePlateLoose",
            "planePlate",
            "rollContainer217LoadIndex",
            "rollContainer240LoadIndex",
            "rollContainer278LoadIndex",
            "rollContainer233LoadIndex",
            "reefer",
            "roadTrain",
            "shelves",
            "skid",
            "stack",
            "truck",
            "trailer",
            "uld",
            "wingPlate",
            "multiple"
          ]
        },
        "measurement": {
          "type": [
            "object"
          ],
          "$ref": "#/definitions/measurement"
        },
        "goodsType": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            null,
            "airCargo",
            "airCargoPalletized",
            "alcohol",
            "aluminium",
            "beer",
            "carParts",
            "ceramics",
            "cheese",
            "chemicals",
            "chocolate",
            "cigarettes",
            "computerParts",
            "consumerElectronics",
            "cosmetics",
            "empty",
            "flowers",
            "food",
            "fruit",
            "furniture",
            "general",
            "glass",
            "householdArticles",
            "lighting",
            "liquor",
            "machines",
            "mail",
            "meat",
            "medicalEquipment",
            "motorGp",
            "nickel",
            "paint",
            "paper",
            "perishables",
            "pharmaceuticals",
            "plants",
            "plastics",
            "shoes",
            "solarPanels",
            "textile",
            "tobacco",
            "toys",
            "vegetables",
            "packingMaterials",
            "wine",
            "wood"
          ]
        },
        "goodsDescription": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 20
        }
      },
      "additionalProperties": true,
      "required": [
        "measurement",
        "packageType"
      ]
    },
    "detailLine": {
      "allOf": [
        {
          "$ref": "#/definitions/cargoLine"
        },
        {
          "properties": {
            "id": {
              "type": [
                "string",
                "null"
              ],
              "description": "Unique within the detail line."
            },
            "awb": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          "additionalProperties": true
        }
      ]
    },
    "goodsLine": {
      "allOf": [
        {
          "$ref": "#/definitions/cargoLine"
        },
        {
          "properties": {
            "dimensions": {
              "type": [
                "object",
                "null"
              ],
              "$ref": "#/definitions/dimensions"
            },
            "detailLines": {
              "type": [
                "array",
                "null"
              ],
              "description": "Further breakdown of the goods. If this was not provided when the shipment was created, there will be a single detail line for each goods line.",
              "items": {
                "type": "object",
                "$ref": "#/definitions/detailLine"
              }
            },
            "dangerousGoods": {
              "type": [
                "array",
                "null"
              ],
              "maxItems": 1,
              "items": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "maxLength": 4,
                    "pattern": "^[0-9]{1,4}$",
                    "description": "UN code."
                  },
                  "suffix": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 3,
                    "pattern": "^[0-9]{1,3}$"
                  },
                  "tunnelCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "code"
                ]
              }
            }
          },
          "additionalProperties": true
        }
      ]
    },
    "address": {
      "properties": {
        "locationCode": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "description": "In case the location is an airport, this will be the IATA code."
        },
        "locationName": {
          "type": [
            "string",
            "null"
          ]
        },
        "name1": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100
        },
        "line1": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "description": "Street name and number."
        },
        "line2": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100,
          "description": "Street name and number."
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100
        },
        "postalCode": {
          "type": "string",
          "maxLength": 10
        },
        "countryName": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100
        },
        "countryCode": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 2,
          "pattern": "^[A-Z]{2}$",
          "description": "ISO-2 country code."
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ]
        },
        "phone": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100
        },
        "fax": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100
        },
        "mail": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 100
        }
      },
      "required": [
        "postalCode"
      ]
    },
    "party": {
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ]
        },
        "number": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[0-9]{6}$",
          "maxLength": 6,
          "description": "Jan de Rijk number of the existing party in Jan de Rijk system."
        },
        "code": {
          "type": "string",
          "maxLength": 20,
          "description": "Jan de Rijk code of the existing party in Jan de Rijk system."
        },
        "address": {
          "type": "object",
          "$ref": "#/definitions/address"
        },
        "remarks": {
          "type": [
            "string",
            "null"
          ]
        },
        "characteristics": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "isDepot": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "keyAvailable": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        },
        "allowedAssetTypes": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "address",
        "code"
      ]
    },
    "dateTimeWindow": {
      "description": "Date/time of relevant events.",
      "properties": {
        "opening": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Includes time zone indicator."
        },
        "closing": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Includes time zone indicator."
        }
      }
    },
    "dateTimeWindowWithEarlyPossible": {
      "description": "Date/time of relevant events.",
      "properties": {
        "opening": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Includes time zone indicator."
        },
        "closing": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Includes time zone indicator."
        },
        "earlyPossible": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "If true, Jan de Rijk can pick-up the cargo outside the time window."
        }
      }
    },
    "milestones": {
      "description": "Actual date/time of relevant events. null if the event did not yet happen.",
      "properties": {
        "start": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Includes time zone indicator."
        },
        "end": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Includes time zone indicator."
        }
      }
    },
    "metadata": {
      "properties": {
        "source": {
          "type": [
            "string",
            "null"
          ],
          "description": "Source system or customer code."
        },
        "messageId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Unique id for the message."
        },
        "messageReference": {
          "type": [
            "string",
            "null"
          ],
          "description": "Customer reference for the message."
        },
        "messageType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Type name of the message."
        },
        "messageRootId": {
          "type": [
            "string",
            "null"
          ],
          "description": "Message id of the first message in a chain of messages."
        },
        "timeStamp": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Date and time the message was generated. If time zone information is omitted, is UTC."
        }
      }
    }
  },
  "type": "object",
  "properties": {
    "metadata": {
      "type": [
        "object",
        "null"
      ],
      "$ref": "#/definitions/metadata"
    },
    "invoices": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "number": {
            "type": "string",
            "maxLength": 12,
            "description": "Jan de Rijk reference for this invoice."
          },
          "purchaseOrderNumber": {
            "type": [
              "string",
              "null"
            ],
            "description": "Customer reference of the purchase order for this invoice."
          },
          "downloadUrl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Url that can be used to download the image of the invoice. Access only given after specific customer request."
          },
          "isCreditNoteForInvoiceNumber": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12,
            "description": "The invoice number of the invoice for which this is a credit note."
          },
          "customer": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "maxLength": 40
              },
              "number": {
                "type": "string",
                "description": "Jan de Rijk code for the customer.",
                "maxLength": 20
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eanNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "chamberOfCommerceNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dunsNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "blocked": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "enabled": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "types": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                }
              },
              "isInterCompany": {
                "type": "boolean",
                "description": "Boolean to figure out if the order belong to an intercompany."
              },
              "address": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "locationCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5,
                    "description": "Only to be used if the location is an airport, in whcih case it should be the IATA code."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "name2": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "name3": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "line1": {
                    "type": [
                      "string"
                    ],
                    "maxLength": 35,
                    "description": "Street name and number."
                  },
                  "line2": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "line3": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "poBox": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2,
                    "pattern": "^[A-Z]{2}$",
                    "description": "ISO Alpha-2 (https://www.nationsonline.org/oneworld/country_code_list.htm) country code."
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "postalCode",
                  "line1"
                ]
              },
              "financial": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "preferredCurrency": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "iban": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bic": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "paymentDays": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                }
              },
              "tax": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "sector": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "holdingParty": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sector": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "number": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              },
              "charter": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "permits": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "trackingProviderCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "trackingId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "contact": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "emailDetails": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "normal",
                            null
                          ]
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "E-mail address."
                        }
                      }
                    }
                  },
                  "telephoneDetails": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "normal",
                            null
                          ]
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Phone number."
                        }
                      }
                    }
                  },
                  "faxNumber": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            },
            "required": [
              "code",
              "number",
              "isInterCompany"
            ]
          },
          "specificationReportType": {
            "type": "string",
            "enum": [
              "general",
              "airCargo"
            ],
            "maxLength": 20,
            "description": "Relevant report for showing invoice specifications in the Jan de Rijk customer portal."
          },
          "currencyCode": {
            "type": "string",
            "maxLength": 3,
            "description": "Currency code for the invoice as per https://en.wikipedia.org/wiki/ISO_4217."
          },
          "paymentTerm": {
            "type": "integer",
            "description": "Number of days until payment should be done."
          },
          "invoiceDate": {
            "type": "string",
            "format": "date-time",
            "description": "Includes time zone indicator."
          },
          "exchangeDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Includes time zone indicator."
          },
          "legalEntity": {
            "type": "object",
            "properties": {
              "code": {
                "type": [
                  "string"
                ],
                "pattern": "^[0-9]{3}$",
                "maxLength": 3,
                "description": "The code of the Jan de Rijk legal entity handling the order."
              },
              "relationCode": {
                "type": [
                  "string",
                  "null"
                ],
                "maxLength": 40
              },
              "number": {
                "type": "string",
                "description": "Jan de Rijk code for the customer.",
                "maxLength": 20
              },
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "eanNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "chamberOfCommerceNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "dunsNumber": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "website": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "blocked": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "enabled": {
                "type": [
                  "boolean",
                  "null"
                ]
              },
              "types": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "type": "string"
                }
              },
              "isInterCompany": {
                "type": "boolean",
                "description": "Boolean to figure out if the order belong to an intercompany."
              },
              "address": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "locationCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 5,
                    "description": "Only to be used if the location is an airport, in whcih case it should be the IATA code."
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "name2": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "name3": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "line1": {
                    "type": [
                      "string"
                    ],
                    "maxLength": 35,
                    "description": "Street name and number."
                  },
                  "line2": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "line3": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "city": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 35
                  },
                  "postalCode": {
                    "type": "string",
                    "maxLength": 10
                  },
                  "poBox": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "maxLength": 2,
                    "pattern": "^[A-Z]{2}$",
                    "description": "ISO Alpha-2 (https://www.nationsonline.org/oneworld/country_code_list.htm) country code."
                  },
                  "longitude": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "latitude": {
                    "type": [
                      "number",
                      "null"
                    ]
                  }
                },
                "required": [
                  "postalCode",
                  "line1"
                ]
              },
              "financial": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "preferredCurrency": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "iban": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "bic": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "paymentDays": {
                    "type": [
                      "integer",
                      "null"
                    ]
                  }
                }
              },
              "tax": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "code": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "countryCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "sector": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "holdingParty": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "number": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "sector": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "properties": {
                      "number": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "name": {
                        "type": [
                          "string",
                          "null"
                        ]
                      }
                    }
                  }
                }
              },
              "charter": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "permits": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "trackingProviderCode": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "trackingId": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              },
              "contact": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "emailDetails": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "normal"
                          ]
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "E-mail address."
                        }
                      }
                    }
                  },
                  "telephoneDetails": {
                    "type": [
                      "array",
                      "null"
                    ],
                    "items": {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "enum": [
                            "normal"
                          ]
                        },
                        "value": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "Phone number."
                        }
                      }
                    }
                  },
                  "faxNumber": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                }
              }
            },
            "required": [
              "code",
              "number",
              "isInterCompany"
            ]
          },
          "exchangeRateFromEUR": {
            "type": "number",
            "description": "The exchange rate of the invoice in relation to Euros. Multiply this with an invoice currency amount to get Euros."
          },
          "lines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "The id of the invoice line. Unique within the invoice."
                },
                "chargeCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Jan de Rijk code of the type of charges."
                },
                "chargeCategory": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    null,
                    "transport",
                    "secondDriver",
                    "extraStop",
                    "waitingTime",
                    "timeWindow",
                    "tollFerry",
                    "handling",
                    "customs",
                    "cool",
                    "adr",
                    "fuel",
                    "noShow"
                  ]
                },
                "sellingDate": {
                  "type": "string",
                  "format": "date-time",
                  "description": "Includes time zone indicator."
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "additionalDescriptions": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": [
                      "string"
                    ]
                  }
                },
                "amountLocalCurrency": {
                  "type": "number",
                  "description": "The amount in Euros."
                },
                "amountForeignCurrency": {
                  "type": "number",
                  "description": "The amount in the currency of the invoice."
                },
                "quantity": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "The relevant quantity used to determine the amount."
                },
                "shipmentNumber": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^(([0-9]{12})|([0-9]{15}))$",
                  "description": "The relevant Jan de Rijk shipment number. This refers to $.invoices.orders.shipments.number. Only filled in for shipment level charges."
                },
                "orderNumber": {
                  "type": "string",
                  "pattern": "^(([0-9]{12})|([0-9]{15}))$",
                  "description": "The relevant Jan de Rijk order number. This refers to $.invoices.orders.number."
                }
              },
              "required": [
                "id",
                "sellingDate",
                "amountLocalCurrency",
                "amountForeignCurrency",
                "orderNumber"
              ]
            }
          },
          "taxLines": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique within the invoice."
                },
                "taxAmountLocalCurrency": {
                  "type": "number",
                  "description": "Tax amount in Euros."
                },
                "taxAmountForeignCurrency": {
                  "type": "number"
                },
                "baseAmountLocalCurrency": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "description": "Tax amount in Euros."
                },
                "baseAmountForeignCurrency": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "invoiceLineIds": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "type": "string"
                  }
                },
                "rate": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "vat": {
                  "description": "VAT information",
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "free",
                        "low",
                        "high",
                        "deffered",
                        "unknown"
                      ]
                    },
                    "typeCode": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "calculationMethodCode": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "required": [
                "id",
                "taxAmountLocalCurrency",
                "taxAmountForeignCurrency"
              ]
            }
          },
          "booked": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "True if the invoice is to be booked in the Jan de Rijk financial system."
          },
          "printed": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "manualTrigger": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "orders": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "string",
                  "pattern": "^(([0-9]{12})|([0-9]{15}))$",
                  "description": "Internal Jan de Rijk number for the original order of the customer."
                },
                "reference": {
                  "type": "string",
                  "maxLength": 30,
                  "description": "Customer's reference for the order. This is the reference that would be used to refer to the order in any communication between the customer and Jan de Rijk. Comes from transportorder-main: $.orders."
                },
                "source": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "maxLength": 30,
                  "description": "Source of the order data.",
                  "enum": [
                    "edi",
                    "rpa",
                    "portal",
                    "manual",
                    "automatic",
                    null
                  ]
                },
                "internal": {
                  "type": "boolean",
                  "description": "Specifies if it concerns an internal order."
                },
                "ediReference": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Customer unique id for the order."
                },
                "invoiceReference": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Used as purchase order reference for invoicing and accounting."
                },
                "cancelled": {
                  "type": "boolean",
                  "description": "Specifies if the order is cancelled."
                },
                "type": {
                  "type": "string",
                  "description": "The type of the order.",
                  "enum": [
                    "manifest",
                    "simple"
                  ]
                },
                "customerData": {
                  "type": [
                    "null",
                    "object"
                  ]
                },
                "departmentCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^[0-9]{3}$",
                  "maxLength": 3,
                  "description": "The code of the Jan de Rijk department that should handle the order. Usually a fixed value that can be provided at the start of the integration project.",
                  "enum": [
                    "100",
                    "102",
                    "104",
                    "105",
                    "130",
                    "140",
                    "150",
                    "151",
                    "155",
                    "160",
                    "166",
                    "176",
                    "177",
                    "178",
                    "180",
                    "181",
                    "185",
                    "189",
                    "190",
                    "192",
                    "200",
                    "210",
                    "220",
                    "287",
                    "289",
                    "400",
                    "411",
                    "412",
                    "500",
                    "514",
                    "515",
                    "533",
                    "550",
                    "600",
                    "602",
                    "610",
                    "615",
                    "620",
                    "630",
                    "640",
                    "650",
                    "700",
                    "705",
                    "710",
                    "715",
                    "720",
                    "725",
                    "830",
                    "850",
                    "870",
                    "909",
                    "910",
                    "950",
                    "961",
                    "983",
                    "985",
                    "987",
                    "990",
                    "991",
                    "994",
                    "996",
                    "997",
                    "998",
                    null
                  ]
                },
                "product": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    "generalCargo",
                    "importContainers",
                    "exportContainers",
                    null
                  ],
                  "description": "The Jan de Rijk product relevant for the order. Usually a fixed value that can be provided at the start of the integration project."
                },
                "customer": {
                  "type": "object",
                  "properties": {
                    "number": {
                      "type": "string",
                      "maxLength": 40
                    },
                    "code": {
                      "type": "string",
                      "description": "Jan de Rijk code for the customer.",
                      "maxLength": 20
                    },
                    "name": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "isInterCompany": {
                      "type": "boolean",
                      "description": "Boolean to figure out if the order belong to an intercompany.",
                      "maxLength": 20
                    },
                    "eanNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "EAN number of the customer."
                    },
                    "address": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "$ref": "#/definitions/address"
                    },
                    "remarks": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "number",
                    "code",
                    "isInterCompany"
                  ]
                },
                "originalLoading": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "party": {
                      "type": "object",
                      "$ref": "#/definitions/party"
                    },
                    "dateTimes": {
                      "type": "object",
                      "$ref": "#/definitions/dateTimeWindow"
                    },
                    "milestones": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "$ref": "#/definitions/milestones"
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "dateTimes",
                    "party"
                  ]
                },
                "finalUnloading": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "party": {
                      "type": "object",
                      "$ref": "#/definitions/party"
                    },
                    "dateTimes": {
                      "type": "object",
                      "$ref": "#/definitions/dateTimeWindowWithEarlyPossible"
                    },
                    "milestones": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "$ref": "#/definitions/milestones"
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "dateTimes",
                    "party"
                  ]
                },
                "containerPickUp": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "party": {
                      "type": "object",
                      "$ref": "#/definitions/party"
                    },
                    "dateTimes": {
                      "type": "object",
                      "$ref": "#/definitions/dateTimeWindow"
                    },
                    "milestones": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "$ref": "#/definitions/milestones"
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "dateTimes",
                    "party"
                  ]
                },
                "containerDropOff": {
                  "type": [
                    "object",
                    "null"
                  ],
                  "properties": {
                    "party": {
                      "type": "object",
                      "$ref": "#/definitions/party"
                    },
                    "dateTimes": {
                      "type": "object",
                      "$ref": "#/definitions/dateTimeWindowWithEarlyPossible"
                    },
                    "milestones": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "$ref": "#/definitions/milestones"
                    },
                    "reference": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "dateTimes",
                    "party"
                  ]
                },
                "measurement": {
                  "type": "object",
                  "$ref": "#/definitions/measurement"
                },
                "packageType": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    null,
                    "uld16Feet",
                    "uld20Feet",
                    "container20Feet",
                    "container20FeetReefer",
                    "container40Feet",
                    "container45Feet",
                    "container45FeetHighCube",
                    "aap",
                    "ake",
                    "bag",
                    "pallet",
                    "box",
                    "containerCcTag5",
                    "containerCc",
                    "chepEuroPallet",
                    "colli",
                    "chepPallet",
                    "crate",
                    "carton",
                    "containerDc",
                    "deciMeterLoadIndex",
                    "airplaneEngine",
                    "euroPallet",
                    "oneWayPallet",
                    "extention",
                    "flowPallet",
                    "container40FeetHighCube",
                    "helicopter",
                    "halfPlanePlate",
                    "container40FeetReefer",
                    "horizontalStack",
                    "ibc",
                    "industrialPallet",
                    "kilograms",
                    "load",
                    "meterLoadIndex",
                    "cubicMeter",
                    "shipment",
                    "batch",
                    "hour",
                    "week",
                    "shelveLocation",
                    "otherPalletType",
                    "piece",
                    "planePlateLoose",
                    "planePlate",
                    "rollContainer217LoadIndex",
                    "rollContainer240LoadIndex",
                    "rollContainer278LoadIndex",
                    "rollContainer233LoadIndex",
                    "reefer",
                    "roadTrain",
                    "shelves",
                    "skid",
                    "stack",
                    "truck",
                    "trailer",
                    "uld",
                    "wingPlate",
                    "multiple"
                  ]
                },
                "tariffType": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "enum": [
                    null,
                    "normal",
                    "adHoc",
                    "loadIndex",
                    "fullTruckLoad",
                    "trailer",
                    "extra",
                    "timeFrame2",
                    "timeFrame3",
                    "fast",
                    "timeFrame1",
                    "pallets",
                    "route1",
                    "grossWeight",
                    "lineHaul",
                    "route2",
                    "roundTrip",
                    "motorcar"
                  ]
                },
                "tariffTypeName": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "breakCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "An additional invoice code in case the customer wants to split the invoices by those codes. Meaning to be discussed with Jan de Rijk finance department."
                },
                "shipments": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "minItems": 1,
                    "properties": {
                      "number": {
                        "type": "string",
                        "pattern": "^(([0-9]{12})|([0-9]{15}))$",
                        "description": "Internal Jan de Rijk number for the original shipment of the customer."
                      },
                      "reference": {
                        "type": "string",
                        "maxLength": 30,
                        "description": "Customer's reference for the shipment. This is the reference that would be used to refer to the order in any communication between the customer and Jan de Rijk. This reference also appears on invoices and status messages, and is searchable in JConnect."
                      },
                      "handled": {
                        "type": "boolean",
                        "description": "Specifies if the shipment is handled."
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "maxLength": 30,
                        "description": "Source of the shipment data.",
                        "enum": [
                          "edi",
                          "rpa",
                          "portal",
                          "manual",
                          "automatic",
                          null
                        ]
                      },
                      "internal": {
                        "type": "boolean",
                        "description": "Specifies if it concerns an internal shipment."
                      },
                      "forecast": {
                        "type": [
                          "null",
                          "boolean"
                        ]
                      },
                      "requestedModalities": {
                        "type": [
                          "null",
                          "array"
                        ],
                        "items": {
                          "type": "string"
                        }
                      },
                      "ecmr": {
                        "type": [
                          "null",
                          "object"
                        ],
                        "properties": {
                          "required": {
                            "type": [
                              "null",
                              "boolean"
                            ]
                          },
                          "id": {
                            "type": [
                              "null",
                              "string"
                            ]
                          },
                          "provider": {
                            "type": [
                              "null",
                              "string"
                            ]
                          }
                        }
                      },
                      "lineService": {
                        "type": "boolean",
                        "description": "Specifies if the shipment is a line service shipment."
                      },
                      "ediReference": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Customer unique id for the shipment."
                      },
                      "invoiceReference": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Used as purchase shipment reference for invoicing and accounting."
                      },
                      "cancelled": {
                        "type": "boolean",
                        "description": "Specifies if the shipment is cancelled."
                      },
                      "transportInstructions": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "documents": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "sequenceNumber": {
                              "type": [
                                "integer",
                                "null"
                              ]
                            },
                            "number": {
                              "type": [
                                "string",
                                "null"
                              ]
                            }
                          }
                        }
                      },
                      "knownCargo": {
                        "type": [
                          "boolean",
                          "null"
                        ]
                      },
                      "route": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "distance": {
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        }
                      },
                      "planning": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "characteristicCode": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "characteristicName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        }
                      },
                      "requirements": {
                        "type": "object",
                        "description": "Special requirements relating to the shipment.",
                        "properties": {
                          "description": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "code": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "freightUnitType": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              null,
                              "flatBox",
                              "box",
                              "isolation",
                              "tautliner",
                              "unspecified"
                            ]
                          },
                          "mega": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "roadTrain": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "This means LZV (longer truck). It can only be selected when it is agreed in the SOP for a certain line."
                          },
                          "dangerousCargo": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "adrPoints": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "urgent": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "heater": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "cooler": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "exclusive": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "If true, Jan de Rijk won't have the possibility to co-load the cargo with other customers' cargo. Co-loading regulations are taken into account regardless."
                          },
                          "maximumTemperature": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "minimumTemperature": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "palletSwap": {
                            "type": [
                              "boolean",
                              "null"
                            ]
                          },
                          "pharmaceuticals": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "It concerns pharmaceutical cargo, and all  requirements for that apply."
                          },
                          "secondDriver": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "The truck should be double manned."
                          },
                          "standBy": {
                            "type": [
                              "boolean",
                              "null"
                            ],
                            "description": "Reserve capacity for last minute order updates."
                          }
                        }
                      },
                      "security": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "description": "Can be used to specify security above the standard security level of TSR 01. The actual security level is explained in the SOP and arranged by the Jan de Rijk planning team.",
                        "properties": {
                          "secured": {
                            "type": "boolean"
                          },
                          "level": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "enum": [
                              null,
                              "TAPA1",
                              "TAPA2"
                            ]
                          }
                        },
                        "required": [
                          "secured"
                        ]
                      },
                      "airFreightExport": {
                        "type": [
                          "boolean",
                          "null"
                        ],
                        "description": "Specifies if the cargo will be transferred to a plane (to be flown to a further destination) on unloading."
                      },
                      "customerData": {
                        "type": [
                          "null",
                          "object"
                        ]
                      },
                      "originalLoading": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "dateTimes": {
                            "type": "object",
                            "$ref": "#/definitions/dateTimeWindow"
                          },
                          "milestones": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "$ref": "#/definitions/milestones"
                          }
                        },
                        "required": [
                          "dateTimes",
                          "party"
                        ]
                      },
                      "finalUnloading": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          },
                          "dateTimes": {
                            "type": "object",
                            "$ref": "#/definitions/dateTimeWindowWithEarlyPossible"
                          },
                          "milestones": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "$ref": "#/definitions/milestones"
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "dateTimes",
                          "party"
                        ]
                      },
                      "containerPickUp": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "dateTimes": {
                            "type": "object",
                            "$ref": "#/definitions/dateTimeWindow"
                          },
                          "milestones": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "$ref": "#/definitions/milestones"
                          }
                        },
                        "required": [
                          "dateTimes",
                          "party"
                        ]
                      },
                      "containerDropOff": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          },
                          "dateTimes": {
                            "type": "object",
                            "$ref": "#/definitions/dateTimeWindowWithEarlyPossible"
                          },
                          "milestones": {
                            "type": [
                              "object",
                              "null"
                            ],
                            "$ref": "#/definitions/milestones"
                          },
                          "reference": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "dateTimes",
                          "party"
                        ]
                      },
                      "neutralLoading": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          }
                        },
                        "required": [
                          "party"
                        ]
                      },
                      "neutralUnloading": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          }
                        },
                        "required": [
                          "party"
                        ]
                      },
                      "clearingIn": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          }
                        },
                        "required": [
                          "party"
                        ]
                      },
                      "clearingOut": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "party": {
                            "type": "object",
                            "$ref": "#/definitions/party"
                          }
                        },
                        "required": [
                          "party"
                        ]
                      },
                      "packageType": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "enum": [
                          null,
                          "pallet",
                          "colli",
                          "euroPallet",
                          "trailer",
                          "uld",
                          "container16Feet",
                          "container20Feet",
                          "container20FeetReefer",
                          "container40Feet",
                          "container45Feet",
                          "container45FeetHighCube",
                          "ake",
                          "containerCc",
                          "chepPallet",
                          "deciMeterLoadIndex",
                          "airplaneEngine",
                          "flowPallet",
                          "container40FeetHighCube",
                          "helicopter",
                          "halfPlanePlate",
                          "container40FeetReefer",
                          "ibc",
                          "kilograms",
                          "meterLoadIndex",
                          "otherPalletType",
                          "planePlate",
                          "rollContainer217LoadIndex",
                          "rollContainer240LoadIndex",
                          "rollContainer278LoadIndex",
                          "rollContainer373LoadIndex",
                          "rollContainer233LoadIndex",
                          "roadTrain",
                          "xx"
                        ]
                      },
                      "tariffType": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "Used when there are price agreements. Should be omitted (or null) unless a value was specifically agreed upon with the Jan de Rijk sales department.",
                        "enum": [
                          null,
                          "normal",
                          "adHoc",
                          "loadIndex",
                          "fullTruckLoad",
                          "trailer",
                          "extra",
                          "timeFrame2",
                          "timeFrame3",
                          "fast",
                          "timeFrame1",
                          "pallets",
                          "route1",
                          "grossWeight",
                          "lineHaul",
                          "route2",
                          "roundTrip",
                          "motorcar"
                        ]
                      },
                      "tariffTypeName": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "vehicle": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "licensePlate": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Refers to the license plate of the truck."
                          }
                        }
                      },
                      "pulledUnit": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "properties": {
                          "licensePlate": {
                            "type": [
                              "string",
                              "null"
                            ],
                            "description": "Refers to the license plate of the trailer."
                          }
                        }
                      },
                      "measurement": {
                        "type": "object",
                        "$ref": "#/definitions/measurement"
                      },
                      "additionalCustomerReferences": {
                        "type": [
                          "array",
                          "null"
                        ],
                        "items": {
                          "type": [
                            "string"
                          ]
                        }
                      },
                      "goodsLines": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "$ref": "#/definitions/goodsLine"
                        }
                      },
                      "breakCode": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "An additional invoice code in case the customer wants to split the invoices by those codes. Meaning to be discussed with Jan de Rijk finance department."
                      }
                    },
                    "required": [
                      "number",
                      "reference",
                      "goodsLines",
                      "measurement",
                      "handled",
                      "internal",
                      "cancelled",
                      "lineService",
                      "requirements"
                    ],
                    "oneOf": [
                      {
                        "description": "Standard shipment",
                        "required": [
                          "originalLoading",
                          "finalUnloading"
                        ]
                      },
                      {
                        "description": "Container export",
                        "required": [
                          "containerPickUp",
                          "originalLoading",
                          "containerDropOff"
                        ]
                      },
                      {
                        "description": "Container import",
                        "required": [
                          "containerPickUp",
                          "finalUnloading",
                          "containerDropOff"
                        ]
                      }
                    ]
                  }
                }
              },
              "required": [
                "number",
                "reference",
                "customer",
                "shipments",
                "measurement",
                "type",
                "internal",
                "cancelled"
              ],
              "oneOf": [
                {
                  "description": "Standard shipment with department",
                  "required": [
                    "departmentCode",
                    "originalLoading",
                    "finalUnloading"
                  ]
                },
                {
                  "description": "Container export with department",
                  "required": [
                    "departmentCode",
                    "containerPickUp",
                    "originalLoading",
                    "containerDropOff"
                  ]
                },
                {
                  "description": "Container import with department",
                  "required": [
                    "departmentCode",
                    "containerPickUp",
                    "finalUnloading",
                    "containerDropOff"
                  ]
                },
                {
                  "description": "Standard shipment with product",
                  "required": [
                    "product",
                    "originalLoading",
                    "finalUnloading"
                  ]
                },
                {
                  "description": "Container export with product",
                  "required": [
                    "product",
                    "containerPickUp",
                    "originalLoading",
                    "containerDropOff"
                  ]
                },
                {
                  "description": "Container import with product",
                  "required": [
                    "product",
                    "containerPickUp",
                    "finalUnloading",
                    "containerDropOff"
                  ]
                }
              ]
            }
          }
        },
        "required": [
          "number",
          "customer",
          "specificationReportType",
          "currencyCode",
          "paymentTerm",
          "invoiceDate",
          "legalEntity",
          "lines",
          "exchangeRateFromEUR",
          "taxLines"
        ]
      }
    },
    "$schema": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri",
      "description": "Url to the schema used for validation. This can be filled in to let certain editors validate the contents based on the schema. The integration setup will ignore it. Possible values are the schema links a the top of the documentation page."
    }
  },
  "required": [
    "invoices"
  ]
}