# Insert invoice including invoice lines Endpoint: POST /enrichment/invoices Version: 2.51.0 Security: OAuth2 ## Request fields (application/json): - `externalId` (string, required) External id of the invoice that is globally unique across the provided invoice data Example: "SUPPLIER_INVOICE-3-1" - `externalClientId` (string) Identifier of the client entity in the source system which can be used to separate data Example: "EXTERNAL_CLIENT_ID" - `documentId` (string) Document id that was assigned during upload to Hypatos Example: "63cac12c37bb02accb396cae" - `documents` (array) - `documents.id` (string) Document id that was assigned during upload to Hypatos Example: "63cac12c37bb02accb396cae" - `documents.type` (string) Document type that was assigned during upload to Hypatos Example: "invoice" - `supplierInvoiceNumber` (string) Invoice number provided by the issuing supplier Example: "10000001" - `invoiceNumber` (string) Number of the invoice in the source system (not unique across clients) Example: "12345" - `externalCompanyId` (string) External unique id of the company in the source system Example: "DE01" - `externalSupplierId` (string) External unique id of the supplier in the source system Example: "0000100000" - `externalBankAccountId` (string) External unique id of the bank account that the invoice payment was transferred to Example: "12341234" - `fiscalYearLabel` (string) Label used in the source system for the fiscal year that the invoice was posted in Example: "2023" - `issuedDate` (string) Date when the invoice was issued by the supplier (printed on invoice document) Example: "2000-12-31" - `receivedDate` (string) Date when the invoice was recieved by the company Example: "2000-12-31" - `postingDate` (string) Date when the invoice was posted in the source system Example: "2000-12-31" - `isCanceled` (boolean) Indicator if the invoice is canceled - `isCreditNote` (boolean) Indicator if the document is a credit note - `externalCustomerId` (string) External unique id of the customer in the source system - `relatedInvoice` (string) externalInvoiceId of related invoice Example: "SUPPLIER_INVOICE-3-2" - `currency` (string,null) Three letter currency code as defined in ISO 4217 Enum: "AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BOV", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLF", "CLP", "CNY", "COP", "COU", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "INR", "IQD", "IRR", "ISK", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MXV", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLE", "SLL", "SOS", "SRD", "SSP", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TWD", "TZS", "UAH", "UGX", "USD", "USN", "UYI", "UYU", "UYW", "UZS", "VED", "VES", "VND", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "XSU", "XTS", "XUA", "XXX", "YER", "ZAR", "ZMW", "ZWL", null - `totalNetAmount` (number) Total net amount of invoice (sum of line item net amounts) Example: 81 - `totalFreightCharges` (number) Sum of all freight charges Example: 9 - `totalOtherCharges` (number) Sum of all charges other than freight charges Example: 10 - `totalTaxAmount` (number) Total tax amount of invoice (sum of all taxes) Example: 19 - `totalGrossAmount` (number) Total gross amount of invoice (total net amount + total freight charges + total other charges + total tax amount) Example: 119 - `paymentTerms` (object) - `paymentTerms.paymentTermKey` (string) Key of the payment term as defined in the source system Example: "T10" - `paymentTerms.descriptions` (array) Descriptions of the payment terms in different languages Example: [{"text":"Please pay us","language":"en"}] - `paymentTerms.descriptions.text` (string) Text content Example: "Fish & Chips" - `paymentTerms.descriptions.language` (string,null) Two letter language code as defined in ISO 639-1 Enum: "aa", "ab", "ae", "af", "ak", "am", "an", "ar", "as", "av", "ay", "az", "ba", "be", "bg", "bh", "bi", "bm", "bn", "bo", "br", "bs", "ca", "ce", "ch", "co", "cr", "cs", "cu", "cv", "cy", "da", "de", "dv", "dz", "ee", "el", "en", "eo", "es", "et", "eu", "fa", "ff", "fi", "fj", "fo", "fr", "fy", "ga", "gd", "gl", "gn", "gu", "gv", "ha", "he", "hi", "ho", "hr", "ht", "hu", "hy", "hz", "ia", "id", "ie", "ig", "ii", "ik", "io", "is", "it", "iu", "ja", "jv", "ka", "kg", "ki", "kj", "kk", "kl", "km", "kn", "ko", "kr", "ks", "ku", "kv", "kw", "ky", "la", "lb", "lg", "li", "ln", "lo", "lt", "lu", "lv", "mg", "mh", "mi", "mk", "ml", "mn", "mr", "ms", "mt", "my", "na", "nb", "nd", "ne", "ng", "nl", "nn", "no", "nr", "nv", "ny", "oc", "oj", "om", "or", "os", "pa", "pi", "pl", "ps", "pt", "qu", "rm", "rn", "ro", "ru", "rw", "sa", "sc", "sd", "se", "sg", "si", "sk", "sl", "sm", "sn", "so", "sq", "sr", "ss", "st", "su", "sv", "sw", "ta", "te", "tg", "th", "ti", "tk", "tl", "tn", "to", "tr", "ts", "tt", "tw", "ty", "ug", "uk", "ur", "uz", "ve", "vi", "vo", "wa", "wo", "xh", "yi", "yo", "za", "zh", "zu", null - `externalApproverId` (string) External unique id of the first approver of an invoice in the source system Example: "UserID#1234" - `customFields` (object) List of key value pairs containing custom fields from the source system - `customMetadata` (object) Any nested structure with metadata that source system needs to send Example: {"someTopLevelProperty":"value1","someNestedProperty":{"nestedProperty":"value2"},"someArrayProperty":["value3","value4"]} - `headerText` (string) Header Text describing the invoice Example: "doc header text" - `type` (string) type of the invoice as defined in th source system Example: "FI" - `invoiceLines` (array, required) - `invoiceLines.externalId` (string) External id of the invoice line that is globally unique across the provided invoice line data Example: "00000001" - `invoiceLines.externalCompanyId` (string) Company that the invoice line is assigned to Example: "DE01" - `invoiceLines.accountAssignments` (array) - `invoiceLines.accountAssignments.externalGlAccountId` (string) External unique id of the general ledger account in the source system Example: "0000100GL1" - `invoiceLines.accountAssignments.externalCostCenterId` (string) External unique id of the cost center in the source system Example: "0000100CO1" - `invoiceLines.accountAssignments.glAccountCode` (string) General ledger account code Example: "GL1" - `invoiceLines.accountAssignments.costCenterCode` (string) Cost center code Example: "CO1" - `invoiceLines.accountAssignments.quantity` (number) Quantity of the invoice line (split of the quantity in case of several accountAssignments) Example: 2 - `invoiceLines.accountAssignments.externalProjectId` (string) External id for project assignment Example: "EPI1" - `invoiceLines.accountAssignments.externalOrderId` (string) External id for order assignment Example: "EOI1" - `invoiceLines.accountAssignments.costElementCode` (string) Cost element code assignment Example: "CE1" - `invoiceLines.accountAssignments.externalProfitCenterId` (string) External unique id of the profit center in the source system Example: "EPCI1" - `invoiceLines.accountAssignments.profitCenterCode` (string) Profit center code Example: "PCC1" - `invoiceLines.type` (string) type of the invoice line as defined in the source system Example: "Service" - `invoiceLines.quantity` (number) Quantity of the invoice line (sum of all quantity splits in case of several accountAssignments) Example: 2 - `invoiceLines.netAmount` (number) Net amount of the invoice line Example: 1.23 - `invoiceLines.totalTaxAmount` (number) Total tax amount of the invoice line Example: 1.23 - `invoiceLines.grossAmount` (number) Gross amount of the invoice line Example: 100.01 - `invoiceLines.unitOfMeasure` (string) Unit of measure of the invoice line Example: "kg" - `invoiceLines.unitPrice` (number) Price for one unit of the invoice line Example: 19.0123 - `invoiceLines.taxCode` (object) - `invoiceLines.taxCode.code` (string) Unique code of the type of tax in the source system Example: "DEU_Standard" - `invoiceLines.taxCode.description` (string) Description of the type of tax in the source system Example: "DEU - Standard (19%)" - `invoiceLines.taxJurisdictionCode` (string) tax jurisdiction code assigned to the invoice Example: "PA0000000" - `invoiceLines.itemText` (string) Text describing the invoice line item Example: "Virtual Event ABC" - `invoiceLines.externalPurchaseOrderId` (string) Purchase order related to the invoice line item Example: "4500016221" - `invoiceLines.purchaseOrderLineNumber` (string) Reference to the purchase order line item assigned to the invoice line item Example: "00010" - `invoiceLines.centralBankIndicator` (string) State Central Bank Indicator for reporting foreign payment transactions according to the German Foreign Trade and Payments Ordinance (Außenwirtschaftsverordnung - AWV) Example: "123" - `withholdingTax` (array) - `withholdingTax.key` (string) Key that the source system uses to clearly identify the type of withholding tax that needs to be paid Example: "WHT-432" - `withholdingTax.baseAmount` (number) Base amount that the tax rate of the specific withholding tax type is applied to Example: 632.78 - `withholdingTax.amount` (number) Tax amount that was paid for the specific withholding tax type Example: 21.39 - `documentType` (string) document type as defined in the source system Example: "supplier invoice" ## Response 200 fields (application/json): - `id` (string, required) Example: "3a429dc8-56d4-42ef-a4cf-2ebc9ad1ef38" ## Response 422 fields (application/json): - `detail` (array) - `detail.loc` (array, required) - `detail.msg` (string, required) - `detail.type` (string, required) ## Response 429 fields