{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.complyance.io/gets.schema.json",
  "title": "GETS payload: core",
  "description": "The core GETS fields every country starts from. Each country adds fields and changes requirements, so validate against your country's schema: https://docs.complyance.io/gets/ae.schema.json, https://docs.complyance.io/gets/sa.schema.json, https://docs.complyance.io/gets/om.schema.json, https://docs.complyance.io/gets/my.schema.json, https://docs.complyance.io/gets/be.schema.json, https://docs.complyance.io/gets/de.schema.json. Field reference: https://docs.complyance.io/api-reference/gets/fields/",
  "type": "object",
  "properties": {
    "header": {
      "type": "object",
      "properties": {
        "documentType": {
          "type": "object",
          "properties": {
            "base": {
              "type": [
                "string",
                "null"
              ],
              "title": "Document Base",
              "description": "The base document type, such as tax_invoice or credit_note. Each country’s values are listed under Enums on its fields page."
            },
            "variant": {
              "type": [
                "string",
                "null"
              ],
              "title": "Document Variant",
              "description": "A variant of the base document type, in the countries that have them. Leave it out for an ordinary document."
            },
            "modifiers": {
              "type": "array",
              "title": "Document Modifiers",
              "description": "Modifiers that apply to the document, such as export. Send [] when none apply. Each country’s values are listed under Enums on its fields page.",
              "items": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        },
        "documentNumber": {
          "type": [
            "string",
            "null"
          ],
          "title": "Document Number",
          "description": "Unique document number"
        },
        "documentId": {
          "type": [
            "string",
            "null"
          ],
          "title": "Document ID",
          "description": "Internal system document identifier (UUID or database ID)"
        },
        "issueDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "title": "Issue Date",
          "description": "Document issue date"
        },
        "issueTime": {
          "type": [
            "string",
            "null"
          ],
          "title": "Issue Time",
          "description": "Time the document was issued, as hh:mm:ss."
        },
        "currency": {
          "type": [
            "string",
            "null"
          ],
          "title": "Invoice Currency",
          "description": "Document currency"
        },
        "taxCurrency": {
          "type": [
            "string",
            "null"
          ],
          "title": "Tax Accounting Currency",
          "description": "Tax currency (often same as document currency)"
        },
        "exchangeRate": {
          "type": "object",
          "properties": {
            "rate": {
              "type": [
                "number",
                "null"
              ],
              "title": "Exchange Rate",
              "description": "Exchange rate when currency differs from tax currency"
            },
            "sourceCurrency": {
              "type": [
                "string",
                "null"
              ],
              "title": "Exchange Source Currency",
              "description": "Exchange rate source currency"
            },
            "targetCurrency": {
              "type": [
                "string",
                "null"
              ],
              "title": "Exchange Target Currency",
              "description": "Exchange rate target currency"
            },
            "date": {
              "type": [
                "string",
                "null"
              ],
              "format": "date",
              "title": "Exchange Rate Date",
              "description": "Exchange rate date"
            }
          }
        },
        "invoicePeriod": {
          "type": "object",
          "properties": {
            "startDate": {
              "type": [
                "string",
                "null"
              ],
              "format": "date",
              "title": "Invoice Period Start",
              "description": "Start date of the invoiced period"
            },
            "endDate": {
              "type": [
                "string",
                "null"
              ],
              "format": "date",
              "title": "Invoice Period End",
              "description": "End date of the invoiced period"
            },
            "frequency": {
              "type": [
                "string",
                "null"
              ],
              "title": "Invoice Period Frequency",
              "description": "Frequency of the billing period (monthly, weekly, etc.)"
            }
          }
        },
        "dueDate": {
          "type": [
            "string",
            "null"
          ],
          "format": "date",
          "title": "Due Date",
          "description": "Payment due date"
        },
        "referenceNumbers": {
          "type": "array",
          "title": "Reference Numbers",
          "description": "Reference to original invoice (notes)",
          "items": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "noteIssuanceReason": {
          "type": [
            "string",
            "null"
          ],
          "title": "Note Issuance Reason",
          "description": "Reason for credit/debit note"
        },
        "referenceId": {
          "type": [
            "string",
            "null"
          ],
          "title": "Reference ID",
          "description": "Original invoice reference ID"
        },
        "additionalNotes": {
          "type": [
            "string",
            "null"
          ],
          "title": "Additional Notes",
          "description": "A textual note that gives unstructured information that is relevant to the Invoice as a whole."
        }
      }
    },
    "parties": {
      "type": "object",
      "properties": {
        "seller": {
          "type": "object",
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ],
              "title": "Seller Name",
              "description": "Seller company name"
            },
            "address": {
              "type": "object",
              "properties": {
                "country": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Country",
                  "description": "Seller country code"
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller City",
                  "description": "The common name of the city, town or village, where the Seller address is located."
                },
                "addressLine1": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Address Line 1",
                  "description": "The main address line in an address."
                },
                "addressLine2": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Address Line 2",
                  "description": "An additional address line in an address that can be used to give further details supplementing the main line."
                },
                "addressLine3": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Address Line 3",
                  "description": "Seller address line 3"
                },
                "stateOrProvince": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller State/Province",
                  "description": "The subdivision of a country. Such as a region, a county, a state, a province etc.."
                },
                "postalCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Postal Code",
                  "description": "The identifier for an addressable group of properties according to the relevant postal service."
                },
                "additionalAddressData": {
                  "type": "object",
                  "properties": {
                    "buildingNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Building Number",
                      "description": "Seller building number"
                    },
                    "district": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller District",
                      "description": "Seller district"
                    },
                    "verificationDate": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Seller Verification Date",
                      "description": "seller verification date"
                    },
                    "verificationSource": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Verification Source",
                      "description": "seller verification source"
                    },
                    "verified": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Verified",
                      "description": "seller verified"
                    },
                    "validTo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Seller Valid To",
                      "description": "seller valid to"
                    },
                    "validFrom": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Seller Valid From",
                      "description": "seller valid from"
                    },
                    "addressUsage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Address Usage",
                      "description": "seller address usage"
                    },
                    "addressType": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Address Type",
                      "description": "seller address type"
                    },
                    "businessHours": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "array",
                          "title": "Seller Business Hours Days",
                          "description": "seller business hours days",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "close": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Seller Business Hours Close",
                          "description": "seller business hours close"
                        },
                        "open": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Seller Business Hours Open",
                          "description": "seller business hours open"
                        }
                      }
                    },
                    "accessCodes": {
                      "type": "object",
                      "properties": {
                        "intercom": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Seller Access Code Intercom",
                          "description": "seller access code intercom"
                        },
                        "building": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Seller Access Code Building",
                          "description": "seller access code building"
                        },
                        "gate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Seller Access Code Gate",
                          "description": "seller access code gate"
                        }
                      }
                    },
                    "deliveryInstructions": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Delivery Instructions",
                      "description": "seller delivery instructions"
                    },
                    "timeZone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Time Zone",
                      "description": "seller time zone"
                    },
                    "whatThreeWords": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller What Three Words",
                      "description": "seller what three words"
                    },
                    "plusCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Plus Code",
                      "description": "seller plus code"
                    },
                    "geoLocation": {
                      "type": "object",
                      "properties": {
                        "longitude": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "title": "Seller Geo Location Longitude",
                          "description": "seller geo location longitude"
                        },
                        "latitude": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "title": "Seller Geo Location Latitude",
                          "description": "seller geo location latitude"
                        }
                      }
                    },
                    "attentionTo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Attention To",
                      "description": "seller attention to"
                    },
                    "careOf": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Care Of",
                      "description": "seller care of"
                    },
                    "deliveryPoint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Delivery Point",
                      "description": "seller delivery point"
                    },
                    "postOffice": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Post Office",
                      "description": "seller post office"
                    },
                    "poBox": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller PO Box",
                      "description": "seller po box"
                    },
                    "landmark": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Landmark",
                      "description": "seller landmark"
                    },
                    "zone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Zone",
                      "description": "seller zone"
                    },
                    "ward": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Ward",
                      "description": "seller ward"
                    },
                    "subDistrict": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Sub District",
                      "description": "seller sub district"
                    },
                    "roomNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Room Number",
                      "description": "seller room number"
                    },
                    "apartment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Apartment",
                      "description": "seller apartment"
                    },
                    "buildingName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Building Name",
                      "description": "seller building name"
                    },
                    "streetNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Street Number",
                      "description": "seller street number"
                    },
                    "streetName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Street Name",
                      "description": "seller street name"
                    },
                    "floor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Seller Floor",
                      "description": "seller floor"
                    }
                  }
                }
              }
            },
            "taxIds": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Seller Tax ID Type",
                    "description": "The scheme of the TAX identifier."
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Seller Tax ID Value",
                    "description": "Seller tax ID value"
                  }
                }
              }
            },
            "partyId": {
              "type": [
                "string",
                "null"
              ],
              "title": "Seller Party ID",
              "description": "Seller internal party ID"
            },
            "tradeName": {
              "type": [
                "string",
                "null"
              ],
              "title": "Seller Trade Name",
              "description": "Seller trade name"
            },
            "industryClassification": {
              "type": "object",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Industry Classification Code",
                  "description": "Industry classification code"
                },
                "scheme": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Industry Classification Scheme",
                  "description": "Industry classification scheme"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Industry Classification Description",
                  "description": "Industry classification description"
                }
              }
            },
            "businessActivityDescription": {
              "type": [
                "string",
                "null"
              ],
              "title": "Seller Business Activity",
              "description": "Seller business activity"
            },
            "registrationNumbers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Seller Registration Type",
                    "description": "Seller registration type"
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Seller Registration Value",
                    "description": "An identifier issued by an official registrar that identifies the Seller as a legal entity or person."
                  }
                }
              }
            },
            "contact": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Contact Name",
                  "description": "A contact point for a legal entity or person."
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Contact Email",
                  "description": "An e-mail address for the contact point."
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Seller Contact Phone",
                  "description": "A phone number for the contact point."
                }
              }
            }
          }
        },
        "buyer": {
          "type": "object",
          "properties": {
            "name": {
              "type": [
                "string",
                "null"
              ],
              "title": "Buyer Name",
              "description": "Buyer company/name"
            },
            "address": {
              "type": "object",
              "properties": {
                "country": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Country",
                  "description": "Buyer country code"
                },
                "addressLine1": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Address Line 1",
                  "description": "The main address line in an address."
                },
                "addressLine2": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Address Line 2",
                  "description": "An additional address line in an address that can be used to give further details supplementing the main line."
                },
                "addressLine3": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Address Line 3",
                  "description": "Buyer address line 3"
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer City",
                  "description": "The common name of the city, town or village, where the Buyer’s address is located."
                },
                "stateOrProvince": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer State/Province",
                  "description": "The subdivision of a country. Such as a region, a county, a state, a province etc.."
                },
                "postalCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Postal Code",
                  "description": "The identifier for an addressable group of properties according to the relevant postal service."
                },
                "additionalAddressData": {
                  "type": "object",
                  "properties": {
                    "buildingNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Building Number",
                      "description": "Buyer building number"
                    },
                    "district": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer District",
                      "description": "Buyer district"
                    },
                    "verificationDate": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Buyer Verification Date",
                      "description": "buyer verification date"
                    },
                    "verificationSource": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Verification Source",
                      "description": "buyer verification source"
                    },
                    "verified": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Verified",
                      "description": "buyer verified"
                    },
                    "validTo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Buyer Valid To",
                      "description": "buyer valid to"
                    },
                    "validFrom": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Buyer Valid From",
                      "description": "buyer valid from"
                    },
                    "addressUsage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Address Usage",
                      "description": "buyer address usage"
                    },
                    "addressType": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Address Type",
                      "description": "buyer address type"
                    },
                    "businessHours": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "array",
                          "title": "Buyer Business Hours Days",
                          "description": "buyer business hours days",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "close": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Buyer Business Hours Close",
                          "description": "buyer business hours close"
                        },
                        "open": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Buyer Business Hours Open",
                          "description": "buyer business hours open"
                        }
                      }
                    },
                    "accessCodes": {
                      "type": "object",
                      "properties": {
                        "intercom": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Buyer Access Code Intercom",
                          "description": "buyer access code intercom"
                        },
                        "building": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Buyer Access Code Building",
                          "description": "buyer access code building"
                        },
                        "gate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Buyer Access Code Gate",
                          "description": "buyer access code gate"
                        }
                      }
                    },
                    "deliveryInstructions": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Delivery Instructions",
                      "description": "buyer delivery instructions"
                    },
                    "timeZone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Time Zone",
                      "description": "buyer time zone"
                    },
                    "whatThreeWords": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer What Three Words",
                      "description": "buyer what three words"
                    },
                    "plusCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Plus Code",
                      "description": "buyer plus code"
                    },
                    "geoLocation": {
                      "type": "object",
                      "properties": {
                        "longitude": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "title": "Buyer Geo Location Longitude",
                          "description": "buyer geo location longitude"
                        },
                        "latitude": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "title": "Buyer Geo Location Latitude",
                          "description": "buyer geo location latitude"
                        }
                      }
                    },
                    "attentionTo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Attention To",
                      "description": "buyer attention to"
                    },
                    "careOf": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Care Of",
                      "description": "buyer care of"
                    },
                    "deliveryPoint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Delivery Point",
                      "description": "buyer delivery point"
                    },
                    "postOffice": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Post Office",
                      "description": "buyer post office"
                    },
                    "poBox": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer PO Box",
                      "description": "buyer po box"
                    },
                    "landmark": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Landmark",
                      "description": "buyer landmark"
                    },
                    "zone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Zone",
                      "description": "buyer zone"
                    },
                    "ward": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Ward",
                      "description": "buyer ward"
                    },
                    "subDistrict": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Sub District",
                      "description": "buyer sub district"
                    },
                    "roomNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Room Number",
                      "description": "buyer room number"
                    },
                    "apartment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Apartment",
                      "description": "buyer apartment"
                    },
                    "buildingName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Building Name",
                      "description": "buyer building name"
                    },
                    "streetNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Street Number",
                      "description": "buyer street number"
                    },
                    "streetName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Street Name",
                      "description": "buyer street name"
                    },
                    "floor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Buyer Floor",
                      "description": "buyer floor"
                    }
                  }
                }
              }
            },
            "taxIds": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Buyer Tax ID Type",
                    "description": "The scheme of the TAX identifier."
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Buyer Tax ID Value",
                    "description": "The buyer’s tax identifier, such as a VAT number or TIN, of the type given in type."
                  }
                }
              }
            },
            "partyId": {
              "type": [
                "string",
                "null"
              ],
              "title": "Buyer Party ID",
              "description": "Buyer internal party ID"
            },
            "tradeName": {
              "type": [
                "string",
                "null"
              ],
              "title": "Buyer Trade Name",
              "description": "Buyer trade name"
            },
            "industryClassification": {
              "type": "object",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Industry Classification Code",
                  "description": "Buyer industry code"
                },
                "scheme": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Industry Classification Scheme",
                  "description": "Buyer industry scheme"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Industry Classification Description",
                  "description": "Buyer industry description"
                }
              }
            },
            "businessActivityDescription": {
              "type": [
                "string",
                "null"
              ],
              "title": "Buyer Business Activity",
              "description": "Buyer business activity"
            },
            "registrationNumbers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Buyer Registration Type",
                    "description": "Buyer registration type"
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Buyer Registration Value",
                    "description": "An identifier issued by an official registrar that identifies the Buyer as a legal entity or person."
                  }
                }
              }
            },
            "contact": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Contact Name",
                  "description": "A contact point for a legal entity or person."
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Contact Email",
                  "description": "An e-mail address for the contact point."
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Buyer Contact Phone",
                  "description": "A phone number for the contact point."
                }
              }
            }
          }
        },
        "delivery": {
          "type": "object",
          "properties": {
            "partyId": {
              "type": [
                "string",
                "null"
              ],
              "title": "Delivery Party ID",
              "description": "Identifier for delivery party"
            },
            "name": {
              "type": [
                "string",
                "null"
              ],
              "title": "Delivery Party Name",
              "description": "Delivery party name"
            },
            "peppolId": {
              "type": [
                "string",
                "null"
              ],
              "title": "Delivery Peppol ID",
              "description": "Delivery party's Peppol network identifier"
            },
            "tradeName": {
              "type": [
                "string",
                "null"
              ],
              "title": "Delivery Trade Name",
              "description": "Delivery party trade name"
            },
            "industryClassification": {
              "type": "object",
              "properties": {
                "code": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Industry Classification Code",
                  "description": "Delivery industry classification code"
                },
                "scheme": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Industry Classification Scheme",
                  "description": "Delivery industry classification scheme"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Industry Classification Description",
                  "description": "Delivery industry classification description"
                }
              }
            },
            "businessActivityDescription": {
              "type": [
                "string",
                "null"
              ],
              "title": "Delivery Business Activity",
              "description": "Delivery business activity"
            },
            "taxIds": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Delivery Tax ID Type",
                    "description": "Delivery tax ID type"
                  },
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Delivery Tax ID Value",
                    "description": "Delivery tax ID value"
                  }
                }
              }
            },
            "contact": {
              "type": "object",
              "properties": {
                "name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Contact Name",
                  "description": "Delivery contact name"
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Contact Email",
                  "description": "Delivery contact email"
                },
                "phone": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Contact Phone",
                  "description": "Delivery contact phone"
                }
              }
            },
            "registrationNumbers": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "value": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Deliver to Legal Registration",
                    "description": "Registration number for delivery party"
                  },
                  "type": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Deliver to Legal Registration Type",
                    "description": "Type of registration for delivery party"
                  }
                }
              }
            },
            "address": {
              "type": "object",
              "properties": {
                "addressLine1": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Address Line 1",
                  "description": "The main address line in an address."
                },
                "addressLine2": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Address Line 2",
                  "description": "Additional delivery address line"
                },
                "addressLine3": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Address Line 3",
                  "description": "Third delivery address line"
                },
                "city": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery City",
                  "description": "The common name of the city, town or village, where the deliver to address is located."
                },
                "postalCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Post Code",
                  "description": "Postal code for delivery address"
                },
                "stateOrProvince": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Country Subdivision",
                  "description": "State, emirate or province for delivery address"
                },
                "country": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Delivery Country",
                  "description": "A code that identifies the country."
                },
                "additionalAddressData": {
                  "type": "object",
                  "properties": {
                    "buildingNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Building Number",
                      "description": "delivery building number"
                    },
                    "district": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery District",
                      "description": "delivery district"
                    },
                    "verificationDate": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Delivery Verification Date",
                      "description": "delivery verification date"
                    },
                    "verificationSource": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Verification Source",
                      "description": "delivery verification source"
                    },
                    "verified": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Verified",
                      "description": "delivery verified"
                    },
                    "validTo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Delivery Valid To",
                      "description": "delivery valid to"
                    },
                    "validFrom": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "format": "date",
                      "title": "Delivery Valid From",
                      "description": "delivery valid from"
                    },
                    "addressUsage": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Address Usage",
                      "description": "delivery address usage"
                    },
                    "addressType": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Address Type",
                      "description": "delivery address type"
                    },
                    "businessHours": {
                      "type": "object",
                      "properties": {
                        "days": {
                          "type": "array",
                          "title": "Delivery Business Hours Days",
                          "description": "delivery business hours days",
                          "items": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "close": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Delivery Business Hours Close",
                          "description": "delivery business hours close"
                        },
                        "open": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Delivery Business Hours Open",
                          "description": "delivery business hours open"
                        }
                      }
                    },
                    "accessCodes": {
                      "type": "object",
                      "properties": {
                        "intercom": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Delivery Access Code Intercom",
                          "description": "delivery access code intercom"
                        },
                        "building": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Delivery Access Code Building",
                          "description": "delivery access code building"
                        },
                        "gate": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "title": "Delivery Access Code Gate",
                          "description": "delivery access code gate"
                        }
                      }
                    },
                    "deliveryInstructions": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Delivery Instructions",
                      "description": "delivery delivery instructions"
                    },
                    "timeZone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Time Zone",
                      "description": "delivery time zone"
                    },
                    "whatThreeWords": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery What Three Words",
                      "description": "delivery what three words"
                    },
                    "plusCode": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Plus Code",
                      "description": "delivery plus code"
                    },
                    "geoLocation": {
                      "type": "object",
                      "properties": {
                        "longitude": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "title": "Delivery Geo Location Longitude",
                          "description": "delivery geo location longitude"
                        },
                        "latitude": {
                          "type": [
                            "number",
                            "null"
                          ],
                          "title": "Delivery Geo Location Latitude",
                          "description": "delivery geo location latitude"
                        }
                      }
                    },
                    "attentionTo": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Attention To",
                      "description": "delivery attention to"
                    },
                    "careOf": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Care Of",
                      "description": "delivery care of"
                    },
                    "deliveryPoint": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Delivery Point",
                      "description": "delivery delivery point"
                    },
                    "postOffice": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Post Office",
                      "description": "delivery post office"
                    },
                    "poBox": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery PO Box",
                      "description": "delivery po box"
                    },
                    "landmark": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Landmark",
                      "description": "delivery landmark"
                    },
                    "zone": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Zone",
                      "description": "delivery zone"
                    },
                    "ward": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Ward",
                      "description": "delivery ward"
                    },
                    "subDistrict": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Sub District",
                      "description": "delivery sub district"
                    },
                    "roomNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Room Number",
                      "description": "delivery room number"
                    },
                    "apartment": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Apartment",
                      "description": "delivery apartment"
                    },
                    "buildingName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Building Name",
                      "description": "delivery building name"
                    },
                    "streetNumber": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Street Number",
                      "description": "delivery street number"
                    },
                    "streetName": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Street Name",
                      "description": "delivery street name"
                    },
                    "floor": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "title": "Delivery Floor",
                      "description": "delivery floor"
                    }
                  }
                }
              }
            },
            "deliveries": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "actualDeliveryDate": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "title": "Actual Delivery Date",
                    "description": "Actual delivery date"
                  },
                  "actualDeliveryTime": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Actual Delivery Time",
                    "description": "Actual delivery time"
                  }
                }
              }
            },
            "deliveryTerms": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "incoterms": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Incoterms",
                    "description": "Delivery terms (Incoterms)"
                  },
                  "originPort": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Origin Port",
                    "description": "Origin port"
                  },
                  "destinationPort": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Destination Port",
                    "description": "Destination port"
                  },
                  "exportDate": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "format": "date",
                    "title": "Export Date",
                    "description": "export date"
                  },
                  "freightDocument": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Freight Document",
                    "description": "freight document"
                  },
                  "freight": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Freight",
                    "description": "freight"
                  },
                  "transportMode": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Transport Mode",
                    "description": "transport mode"
                  },
                  "customsDeclarationNumber": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Customs Declaration Number",
                    "description": "customs declaration number"
                  },
                  "specialTerms": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Special Terms",
                    "description": "special terms"
                  }
                }
              }
            }
          }
        }
      }
    },
    "lineItems": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "title": "Line Item ID",
            "description": "Line item identifier"
          },
          "name": {
            "type": [
              "string",
              "null"
            ],
            "title": "Line Item Name",
            "description": "Line item name/description"
          },
          "quantity": {
            "type": [
              "number",
              "null"
            ],
            "title": "Line Item Quantity",
            "description": "The quantity of items (goods or services) that is charged in the Invoice line."
          },
          "unitCode": {
            "type": [
              "string",
              "null"
            ],
            "title": "Line Item Unit Code",
            "description": "Unit code (PCE, KGM, etc.)"
          },
          "lineTotal": {
            "type": [
              "number",
              "null"
            ],
            "title": "Line Item Total",
            "description": "Line item total"
          },
          "taxAmount": {
            "type": [
              "number",
              "null"
            ],
            "title": "Line Item Tax Amount",
            "description": "Tax amount for the line item, excluding the net line amount."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "title": "Line Item Description",
            "description": "A description for an item."
          },
          "lineTaxableValue": {
            "type": [
              "number",
              "null"
            ],
            "title": "Line Taxable Value",
            "description": "The total amount of the Invoice line (before tax)."
          },
          "taxCategory": {
            "type": [
              "string",
              "null"
            ],
            "title": "Line Tax Category",
            "description": "The VAT category code for the invoiced item."
          },
          "taxRate": {
            "type": [
              "number",
              "null"
            ],
            "title": "Line Tax Rate",
            "description": "The VAT rate, represented as percentage that applies to the invoiced item."
          },
          "buyerItemCode": {
            "type": [
              "string",
              "null"
            ],
            "title": "Buyer Item Code",
            "description": "Buyer item code"
          },
          "sellerItemCode": {
            "type": [
              "string",
              "null"
            ],
            "title": "Seller Item Code",
            "description": "Seller item code"
          },
          "standardItemCode": {
            "type": "object",
            "properties": {
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Standard Item Code ID",
                "description": "An item identifier based on a registered scheme."
              },
              "schemeId": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Standard Item Code Scheme",
                "description": "The identification scheme identifier of the Item standard identifier."
              }
            }
          },
          "commodityClassification": {
            "type": "object",
            "properties": {
              "code": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Commodity Classification Code",
                "description": "Commodity classification code"
              },
              "scheme": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Commodity Classification Scheme",
                "description": "The identification scheme shall be chosen from the entries in UNTDID 7143 [6]."
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Commodity Classification Description",
                "description": "Commodity classification description"
              }
            }
          },
          "commodityCode": {
            "type": [
              "string",
              "null"
            ],
            "title": "Commodity Code",
            "description": "Tariff/commodity code"
          },
          "price": {
            "type": "object",
            "properties": {
              "amount": {
                "type": [
                  "number",
                  "null"
                ],
                "title": "Item Net Price",
                "description": "Net unit price excluding VAT."
              },
              "grossPrice": {
                "type": [
                  "number",
                  "null"
                ],
                "title": "Item Gross Price",
                "description": "Unit price before a price-level discount, excluding VAT."
              },
              "baseQuantity": {
                "type": [
                  "number",
                  "null"
                ],
                "title": "Base Quantity",
                "description": "The number of item units to which the price applies."
              },
              "baseQuantityUnitCode": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Base Quantity Unit Code",
                "description": "Base quantity unit code"
              }
            }
          },
          "discountsOrCharges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Line Discount/Charge ID",
                  "description": "Discount/Charge ID"
                },
                "isCharge": {
                  "type": [
                    "boolean",
                    "null"
                  ],
                  "title": "Line Discount/Charge is Charge",
                  "description": "Is charge or discount"
                },
                "reason": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Line Discount/Charge Reason",
                  "description": "Discount/Charge reason"
                },
                "reasonCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Line Discount/Charge Reason Code",
                  "description": "Discount/Charge reason code"
                },
                "amount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "title": "Line Discount/Charge Amount",
                  "description": "Discount/Charge amount"
                },
                "baseAmount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "title": "Line Discount/Charge Base Amount",
                  "description": "Discount/Charge base amount"
                },
                "percent": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "title": "Line Discount/Charge Percentage",
                  "description": "Discount/Charge percentage"
                },
                "taxCategory": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Line Discount/Charge Tax Category",
                  "description": "Discount/Charge tax category"
                },
                "taxRate": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "title": "Line Discount/Charge Tax Rate",
                  "description": "Discount/Charge tax rate"
                },
                "taxAmount": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "title": "Line Discount/Charge Tax Amount",
                  "description": "Discount/Charge tax amount"
                }
              }
            }
          },
          "taxExemptionReason": {
            "type": [
              "string",
              "null"
            ],
            "title": "Tax Exemption Reason",
            "description": "A textual statement of the reason why the line amount is exempted from VAT or why no VAT is being charged."
          },
          "taxExemptionReasonCode": {
            "type": [
              "string",
              "null"
            ],
            "title": "Tax Exemption Reason Code",
            "description": "A coded statement of the reason for why the line amount is exempted from VAT."
          },
          "countryOfOrigin": {
            "type": [
              "string",
              "null"
            ],
            "title": "Country Of Origin",
            "description": "The code identifying the country from which the item originates."
          },
          "relatedDocuments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Line Related Document ID",
                  "description": "Related document ID"
                },
                "documentType": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Line Related Document Type",
                  "description": "Related document type"
                }
              }
            }
          },
          "lineType": {
            "type": [
              "string",
              "null"
            ],
            "title": "Line Type",
            "description": "Line type"
          }
        }
      }
    },
    "payment": {
      "type": "object",
      "properties": {
        "paymentMeans": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "paymentMeansCode": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Payment Means Code",
                "description": "How the payment is made, as a UNTDID 4461 payment means code, for example 30 for a credit transfer or 10 for cash."
              },
              "creditTransferInfo": {
                "type": "object",
                "properties": {
                  "payeeFinancialAccountId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Payee Account ID",
                    "description": "A unique identifier of the financial payment account, at a payment service provider, to which payment should be made."
                  },
                  "payeeFinancialAccountName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Payee Account Name",
                    "description": "The name of the payment account, at a payment service provider, to which payment should be made."
                  },
                  "payeeFinancialInstitutionBranch": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Payee Institution Branch",
                    "description": "An identifier for the payment service provider where a payment account is located."
                  }
                }
              },
              "paymentMeansText": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Payment Means Text",
                "description": "Payment method description"
              },
              "paymentId": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Payment ID",
                "description": "Payment identifier"
              },
              "cardPaymentInfo": {
                "type": "object",
                "properties": {
                  "primaryAccountNumber": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Card PAN",
                    "description": "Card primary account number"
                  },
                  "networkId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Card Network",
                    "description": "Card network ID"
                  },
                  "holderName": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Card Holder Name",
                    "description": "Card holder name"
                  }
                }
              },
              "directDebitInfo": {
                "type": "object",
                "properties": {
                  "mandateReferenceId": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Direct Debit Mandate Ref ID",
                    "description": "Direct debit mandate reference"
                  },
                  "payerFinancialAccount": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "title": "Payer Financial Account",
                    "description": "Payer financial account"
                  }
                }
              }
            }
          }
        },
        "paymentTerms": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "note": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Payment Terms Note",
                "description": "A textual description of the payment terms that apply to the amount due for payment (Including description of possible penalties)."
              },
              "penaltyAmount": {
                "type": [
                  "number",
                  "null"
                ],
                "title": "Penalty Amount",
                "description": "Penalty amount"
              },
              "penaltyPercent": {
                "type": [
                  "number",
                  "null"
                ],
                "title": "Penalty Percentage",
                "description": "Penalty percent"
              },
              "discountAmount": {
                "type": [
                  "number",
                  "null"
                ],
                "title": "Discount Amount",
                "description": "The payment amount that these terms apply to. When relevant, the amount includes tax."
              },
              "settlementDiscountPercent": {
                "type": [
                  "number",
                  "null"
                ],
                "title": "Settlement Discount Percentage",
                "description": "Settlement discount percent"
              },
              "discountDueDate": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date",
                "title": "Discount Due Date",
                "description": "Discount due date"
              }
            }
          }
        }
      }
    },
    "allowancesAndCharges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "isCharge": {
            "type": [
              "boolean",
              "null"
            ],
            "title": "Invoice-level Is Charge",
            "description": "Charge (true) or allowance (false)"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "title": "Invoice Discount/Charge Amount",
            "description": "Allowance/charge amount"
          },
          "id": {
            "type": [
              "string",
              "null"
            ],
            "title": "Invoice Discount/Charge Line ID",
            "description": "Allowance/Charge ID"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ],
            "title": "Invoice Discount/Charge Reason",
            "description": "Reason for allowance/charge"
          },
          "reasonCode": {
            "type": [
              "string",
              "null"
            ],
            "title": "Invoice Discount/Charge Reason Code",
            "description": "Reason code"
          },
          "baseAmount": {
            "type": [
              "number",
              "null"
            ],
            "title": "Invoice Discount/Charge Base Amount",
            "description": "Base amount"
          },
          "percent": {
            "type": [
              "number",
              "null"
            ],
            "title": "Invoice Discount/Charge Percentage",
            "description": "Percent applied"
          },
          "taxCategory": {
            "type": [
              "string",
              "null"
            ],
            "title": "Invoice Discount/Charge Tax Category",
            "description": "Tax category"
          },
          "taxRate": {
            "type": [
              "number",
              "null"
            ],
            "title": "Invoice Discount/Charge Tax Rate",
            "description": "Tax rate"
          },
          "taxAmount": {
            "type": [
              "number",
              "null"
            ],
            "title": "Invoice Discount/Charge Tax Amount",
            "description": "Tax amount"
          }
        }
      }
    },
    "supportingDocuments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "title": "Supporting Document ID",
            "description": "Supporting document identifier"
          },
          "documentType": {
            "type": [
              "string",
              "null"
            ],
            "title": "Supporting Document Type",
            "description": "Type of supporting document"
          },
          "documentDescription": {
            "type": [
              "string",
              "null"
            ],
            "title": "Supporting Document Description",
            "description": "Description of supporting document"
          },
          "issueDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "title": "Supporting Document Issue Date",
            "description": "Supporting document issue date"
          },
          "referenceUrl": {
            "type": [
              "string",
              "null"
            ],
            "title": "Supporting Document URL",
            "description": "Reference URL"
          },
          "attachments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "description": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Attachment Description",
                  "description": "Attachment description"
                },
                "filename": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Attachment Filename",
                  "description": "Attachment file name"
                },
                "mimeCode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Attachment Mime Code",
                  "description": "A code identifying the file type."
                },
                "size": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "title": "Attachment Size",
                  "description": "Attachment size"
                },
                "content": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Attachment Content",
                  "description": "Attachment base64 content"
                },
                "contentUrl": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Attachment Content URL",
                  "description": "Attachment content URL"
                },
                "checksum": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "title": "Attachment Checksum",
                  "description": "Attachment checksum"
                }
              }
            }
          }
        }
      }
    },
    "totals": {
      "type": "object",
      "properties": {
        "totalAmountExcludingTax": {
          "type": [
            "number",
            "null"
          ],
          "title": "Total Amount Excluding Tax",
          "description": "Total excluding tax"
        },
        "totalAmountIncludingTax": {
          "type": [
            "number",
            "null"
          ],
          "title": "Total Amount Including Tax",
          "description": "Total including tax"
        },
        "amountDue": {
          "type": [
            "number",
            "null"
          ],
          "title": "Amount Due",
          "description": "The outstanding amount that is requested to be paid."
        },
        "totalLineTaxableAmount": {
          "type": [
            "number",
            "null"
          ],
          "title": "Total Line Taxable Amount",
          "description": "Sum of line taxable values"
        },
        "totalTaxAmount": {
          "type": [
            "number",
            "null"
          ],
          "title": "Total Tax Amount",
          "description": "Total tax amount"
        },
        "totalAllowances": {
          "type": [
            "number",
            "null"
          ],
          "title": "Total Allowances",
          "description": "Sum of all allowances on document level in the Invoice."
        },
        "totalCharges": {
          "type": [
            "number",
            "null"
          ],
          "title": "Total Charges",
          "description": "Sum of all charges on document level in the Invoice."
        },
        "roundingAmount": {
          "type": [
            "number",
            "null"
          ],
          "title": "Rounding Amount",
          "description": "Rounding adjustment"
        },
        "prepaidAmount": {
          "type": [
            "number",
            "null"
          ],
          "title": "Prepaid Amount",
          "description": "The sum of amounts which have been paid in advance."
        }
      }
    },
    "meta": {
      "type": "object",
      "properties": {
        "operation": {
          "type": [
            "string",
            "null"
          ],
          "title": "Operation",
          "description": "Document operation type"
        },
        "mode": {
          "type": [
            "string",
            "null"
          ],
          "title": "Mode",
          "description": "Document processing mode"
        },
        "version": {
          "type": [
            "string",
            "null"
          ],
          "title": "Version",
          "description": "Document version"
        },
        "source": {
          "type": "object",
          "properties": {
            "type": {
              "type": [
                "string",
                "null"
              ],
              "title": "Source Type",
              "description": "Source type"
            },
            "id": {
              "type": [
                "string",
                "null"
              ],
              "title": "Source ID",
              "description": "Source identifier"
            },
            "name": {
              "type": [
                "string",
                "null"
              ],
              "title": "Source Name",
              "description": "Source name"
            },
            "version": {
              "type": [
                "string",
                "null"
              ],
              "title": "Source Version",
              "description": "Source version"
            }
          }
        },
        "config": {
          "type": "object",
          "properties": {
            "purpose": {
              "type": [
                "string",
                "null"
              ],
              "title": "Purpose",
              "description": "Document purpose (e.g., testbed, e-invoicing, mapping)"
            },
            "isB2B": {
              "type": [
                "boolean",
                "null"
              ],
              "title": "Is B2B",
              "description": "Business to Business flag"
            },
            "isTestbed": {
              "type": [
                "boolean",
                "null"
              ],
              "title": "Is Testbed",
              "description": "Testbed document flag"
            }
          }
        }
      }
    },
    "destinations": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": [
              "string",
              "null"
            ],
            "title": "Destination Type",
            "description": "Destination type for submission"
          },
          "details": {
            "type": "object",
            "properties": {
              "country": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Destination Country",
                "description": "Destination country"
              },
              "authority": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Destination Authority",
                "description": "Destination authority"
              },
              "documentType": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Destination Document Type",
                "description": "Destination document type"
              },
              "recipients": {
                "type": "array",
                "title": "Destination Recipients",
                "description": "Email recipients",
                "items": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              },
              "subject": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Destination Subject",
                "description": "Email subject"
              },
              "body": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Destination Body",
                "description": "Email body"
              },
              "participantId": {
                "type": [
                  "string",
                  "null"
                ],
                "title": "Destination Participant ID",
                "description": "Peppol participant ID"
              }
            }
          }
        }
      }
    }
  },
  "allOf": [
    {
      "required": [
        "header",
        "parties",
        "lineItems",
        "totals"
      ],
      "properties": {
        "header": {
          "required": [
            "documentType",
            "documentNumber",
            "issueDate",
            "currency"
          ],
          "properties": {
            "documentType": {
              "required": [
                "base"
              ],
              "properties": {
                "base": {}
              }
            },
            "documentNumber": {},
            "issueDate": {},
            "currency": {}
          }
        },
        "parties": {
          "required": [
            "seller",
            "buyer"
          ],
          "properties": {
            "seller": {
              "required": [
                "name",
                "address",
                "taxIds",
                "registrationNumbers"
              ],
              "properties": {
                "name": {},
                "address": {
                  "required": [
                    "country",
                    "city"
                  ],
                  "properties": {
                    "country": {},
                    "city": {}
                  }
                },
                "taxIds": {
                  "items": {
                    "required": [
                      "type",
                      "value"
                    ],
                    "properties": {
                      "type": {},
                      "value": {}
                    }
                  }
                },
                "registrationNumbers": {
                  "items": {
                    "required": [
                      "type",
                      "value"
                    ],
                    "properties": {
                      "type": {},
                      "value": {}
                    }
                  }
                }
              }
            },
            "buyer": {
              "required": [
                "name",
                "address"
              ],
              "properties": {
                "name": {},
                "address": {
                  "required": [
                    "country"
                  ],
                  "properties": {
                    "country": {}
                  }
                },
                "registrationNumbers": {
                  "items": {
                    "required": [
                      "type",
                      "value"
                    ],
                    "properties": {
                      "type": {},
                      "value": {}
                    }
                  }
                }
              }
            }
          }
        },
        "lineItems": {
          "items": {
            "required": [
              "id",
              "name",
              "quantity",
              "unitCode",
              "lineTotal",
              "taxAmount",
              "price"
            ],
            "properties": {
              "id": {},
              "name": {},
              "quantity": {},
              "unitCode": {},
              "lineTotal": {},
              "taxAmount": {},
              "price": {
                "required": [
                  "amount"
                ],
                "properties": {
                  "amount": {}
                }
              }
            }
          }
        },
        "totals": {
          "required": [
            "totalAmountExcludingTax",
            "totalAmountIncludingTax",
            "amountDue",
            "totalLineTaxableAmount",
            "totalTaxAmount"
          ],
          "properties": {
            "totalAmountExcludingTax": {},
            "totalAmountIncludingTax": {},
            "amountDue": {},
            "totalLineTaxableAmount": {},
            "totalTaxAmount": {}
          }
        }
      }
    }
  ],
  "x-country-schemas": {
    "AE": "https://docs.complyance.io/gets/ae.schema.json",
    "SA": "https://docs.complyance.io/gets/sa.schema.json",
    "OM": "https://docs.complyance.io/gets/om.schema.json",
    "MY": "https://docs.complyance.io/gets/my.schema.json",
    "BE": "https://docs.complyance.io/gets/be.schema.json",
    "DE": "https://docs.complyance.io/gets/de.schema.json"
  }
}