@codat/lending 4.0.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +10 -1
  2. package/dist/sdk/models/shared/accountingaccounttransaction.d.ts +7 -0
  3. package/dist/sdk/models/shared/accountingattachment.d.ts +2 -1
  4. package/dist/sdk/models/shared/accountingattachment.js +2 -1
  5. package/dist/sdk/models/shared/accountingbill.d.ts +7 -0
  6. package/dist/sdk/models/shared/accountingbillcreditnote.d.ts +7 -0
  7. package/dist/sdk/models/shared/accountingbillpayment.d.ts +7 -0
  8. package/dist/sdk/models/shared/accountingcreditnote.d.ts +7 -0
  9. package/dist/sdk/models/shared/accountingdirectcost.d.ts +7 -0
  10. package/dist/sdk/models/shared/accountingdirectincome.d.ts +7 -0
  11. package/dist/sdk/models/shared/accountinginvoice.d.ts +7 -0
  12. package/dist/sdk/models/shared/accountingpayment.d.ts +7 -0
  13. package/dist/sdk/models/shared/accountingpaymentallocation.d.ts +7 -0
  14. package/dist/sdk/models/shared/billpaymentlinelink.d.ts +7 -0
  15. package/dist/sdk/models/shared/directcostprototype.d.ts +7 -0
  16. package/dist/sdk/models/shared/payment.d.ts +7 -0
  17. package/dist/sdk/models/shared/paymentallocationpayment.d.ts +7 -0
  18. package/dist/sdk/models/shared/paymentlinelink.d.ts +7 -0
  19. package/dist/sdk/sdk.js +3 -3
  20. package/docs/sdk/models/operations/downloadfilesrequest.md +1 -1
  21. package/docs/sdk/models/operations/getaccountingagedcreditorsreportrequest.md +1 -1
  22. package/docs/sdk/models/operations/getaccountingageddebtorsreportrequest.md +1 -1
  23. package/docs/sdk/models/operations/getaccountingbalancesheetrequest.md +1 -1
  24. package/docs/sdk/models/operations/getaccountingcashflowstatementrequest.md +1 -1
  25. package/docs/sdk/models/operations/getaccountingprofitandlossrequest.md +1 -1
  26. package/docs/sdk/models/shared/accountingaccount.md +2 -2
  27. package/docs/sdk/models/shared/accountingaccounttransaction.md +15 -15
  28. package/docs/sdk/models/shared/accountingagedcreditorreport.md +2 -2
  29. package/docs/sdk/models/shared/accountingageddebtorreport.md +2 -2
  30. package/docs/sdk/models/shared/accountingattachment.md +5 -4
  31. package/docs/sdk/models/shared/accountingbalancesheet.md +2 -2
  32. package/docs/sdk/models/shared/accountingbankaccount.md +2 -2
  33. package/docs/sdk/models/shared/accountingbanktransaction.md +3 -3
  34. package/docs/sdk/models/shared/accountingbill.md +23 -23
  35. package/docs/sdk/models/shared/accountingbillcreditnote.md +24 -24
  36. package/docs/sdk/models/shared/accountingbillpayment.md +17 -17
  37. package/docs/sdk/models/shared/accountingcashflowstatement.md +2 -2
  38. package/docs/sdk/models/shared/accountingcompanyinfo.md +3 -3
  39. package/docs/sdk/models/shared/accountingcreateaccountresponse.md +2 -2
  40. package/docs/sdk/models/shared/accountingcreatebankaccountresponse.md +2 -2
  41. package/docs/sdk/models/shared/accountingcreatebanktransactionsresponse.md +2 -2
  42. package/docs/sdk/models/shared/accountingcreatedirectcostresponse.md +2 -2
  43. package/docs/sdk/models/shared/accountingcreatepaymentresponse.md +2 -2
  44. package/docs/sdk/models/shared/accountingcreatesupplierresponse.md +2 -2
  45. package/docs/sdk/models/shared/accountingcreatetransferresponse.md +2 -2
  46. package/docs/sdk/models/shared/accountingcreditnote.md +26 -26
  47. package/docs/sdk/models/shared/accountingcustomer.md +2 -2
  48. package/docs/sdk/models/shared/accountingdirectcost.md +18 -18
  49. package/docs/sdk/models/shared/accountingdirectincome.md +18 -18
  50. package/docs/sdk/models/shared/accountinginvoice.md +28 -28
  51. package/docs/sdk/models/shared/accountingjournal.md +3 -3
  52. package/docs/sdk/models/shared/accountingjournalentry.md +5 -5
  53. package/docs/sdk/models/shared/accountingpayment.md +17 -17
  54. package/docs/sdk/models/shared/accountingprofitandlossreport.md +2 -2
  55. package/docs/sdk/models/shared/accountingsupplier.md +2 -2
  56. package/docs/sdk/models/shared/accountingtransfer.md +3 -3
  57. package/docs/sdk/models/shared/agedoutstandingamount.md +2 -2
  58. package/docs/sdk/models/shared/allocation.md +6 -6
  59. package/docs/sdk/models/shared/balancesheet.md +1 -1
  60. package/docs/sdk/models/shared/bankingaccount.md +2 -2
  61. package/docs/sdk/models/shared/bankingaccountbalance.md +3 -3
  62. package/docs/sdk/models/shared/bankingtransaction.md +4 -4
  63. package/docs/sdk/models/shared/bankingtransactioncategory.md +2 -2
  64. package/docs/sdk/models/shared/bankingtransactionref.md +1 -1
  65. package/docs/sdk/models/shared/billpaymentline.md +1 -1
  66. package/docs/sdk/models/shared/billpaymentlinelink.md +6 -6
  67. package/docs/sdk/models/shared/cashflowstatement.md +2 -2
  68. package/docs/sdk/models/shared/clientratelimitreachedwebhookdata.md +1 -1
  69. package/docs/sdk/models/shared/clientratelimitresetwebhookdata.md +1 -1
  70. package/docs/sdk/models/shared/commercecompanyinfo.md +3 -3
  71. package/docs/sdk/models/shared/commercecustomer.md +3 -3
  72. package/docs/sdk/models/shared/commercedispute.md +4 -4
  73. package/docs/sdk/models/shared/commercelocation.md +2 -2
  74. package/docs/sdk/models/shared/commerceorder.md +4 -4
  75. package/docs/sdk/models/shared/commercepayment.md +4 -4
  76. package/docs/sdk/models/shared/commercepaymentmethod.md +2 -2
  77. package/docs/sdk/models/shared/commerceproductcategory.md +2 -2
  78. package/docs/sdk/models/shared/commercetransaction.md +4 -4
  79. package/docs/sdk/models/shared/company.md +2 -2
  80. package/docs/sdk/models/shared/connection.md +2 -2
  81. package/docs/sdk/models/shared/contact.md +1 -1
  82. package/docs/sdk/models/shared/createbankaccounttransaction.md +1 -1
  83. package/docs/sdk/models/shared/dataconnectionerror.md +1 -1
  84. package/docs/sdk/models/shared/dataintegritydates.md +4 -4
  85. package/docs/sdk/models/shared/dataintegritydetail.md +1 -1
  86. package/docs/sdk/models/shared/dataintegritystatusinfo.md +1 -1
  87. package/docs/sdk/models/shared/datastatus.md +1 -1
  88. package/docs/sdk/models/shared/directcostprototype.md +14 -14
  89. package/docs/sdk/models/shared/enhancedcashflowtransaction.md +1 -1
  90. package/docs/sdk/models/shared/enhancedinvoicereportitem.md +5 -5
  91. package/docs/sdk/models/shared/enhancedreportinfo.md +1 -1
  92. package/docs/sdk/models/shared/excelstatus.md +1 -1
  93. package/docs/sdk/models/shared/file.md +1 -1
  94. package/docs/sdk/models/shared/loansummaryreportinfo.md +1 -1
  95. package/docs/sdk/models/shared/loansummaryreportitem.md +1 -1
  96. package/docs/sdk/models/shared/loantransactionsreportinfo.md +1 -1
  97. package/docs/sdk/models/shared/payment.md +9 -9
  98. package/docs/sdk/models/shared/paymentallocationpayment.md +10 -10
  99. package/docs/sdk/models/shared/paymentline.md +1 -1
  100. package/docs/sdk/models/shared/paymentlinelink.md +6 -6
  101. package/docs/sdk/models/shared/paymentref.md +4 -4
  102. package/docs/sdk/models/shared/productvariant.md +3 -3
  103. package/docs/sdk/models/shared/profitandlossreport.md +2 -2
  104. package/docs/sdk/models/shared/pulloperation.md +2 -2
  105. package/docs/sdk/models/shared/pushoperation.md +2 -2
  106. package/docs/sdk/models/shared/reportitem.md +1 -1
  107. package/docs/sdk/models/shared/reportitems.md +1 -1
  108. package/docs/sdks/balancesheet/README.md +1 -1
  109. package/docs/sdks/bankaccounts/README.md +2 -2
  110. package/docs/sdks/banktransactions/README.md +1 -1
  111. package/docs/sdks/cashflow/README.md +1 -1
  112. package/docs/sdks/codatlendingpayments/README.md +4 -4
  113. package/docs/sdks/codatlendingsuppliers/README.md +2 -2
  114. package/docs/sdks/directcosts/README.md +3 -3
  115. package/docs/sdks/fileupload/README.md +1 -1
  116. package/docs/sdks/profitandloss/README.md +1 -1
  117. package/docs/sdks/transfers/README.md +3 -3
  118. package/package.json +1 -1
@@ -33,31 +33,31 @@ In Codat, an invoice contains details of:
33
33
 
34
34
  ## Fields
35
35
 
36
- | Field | Type | Required | Description | Example |
37
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38
- | `additionalTaxAmount` | *number* | :heavy_minus_sign: | Additional tax amount applied to invoice. | |
39
- | `additionalTaxPercentage` | *number* | :heavy_minus_sign: | Percentage rate of any additional tax applied to the invoice. | |
40
- | `amountDue` | *number* | :heavy_check_mark: | Amount outstanding on the invoice. | |
41
- | `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.<br/><br/>## Unknown currencies<br/><br/>In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. <br/><br/>There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
42
- | `currencyRate` | *number* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.<br/><br/>Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. <br/><br/>It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.<br/><br/>Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). <br/><br/>For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.<br/><br/>## Examples with base currency of GBP<br/><br/>\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|<br/>\| :--------------- \| :------------- \| :------------ \| :------------------------- \|<br/>\| **USD** \| $20 \| 0.781 \| £15.62 \|<br/>\| **EUR** \| €20 \| 0.885 \| £17.70 \|<br/>\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|<br/><br/>## Examples with base currency of USD<br/><br/>\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|<br/>\| :--------------- \| :------------- \| :------------ \| :------------------------- \|<br/>\| **GBP** \| £20 \| 1.277 \| $25.54 \|<br/>\| **EUR** \| €20 \| 1.134 \| $22.68 \|<br/>\| **RUB** \| ₽20 \| 0.015 \| $0.30 \| | |
43
- | `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | |
44
- | `discountPercentage` | *number* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of discounts applied to the invoice. For example: A 5% discount will return a value of `5`, not `0.05`. | |
45
- | `dueDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:<br/><br/>```<br/>2020-10-08T22:40:50Z<br/>2021-01-01T00:00:00<br/>```<br/><br/><br/><br/>When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:<br/><br/>- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`<br/>- Unqualified local time: `2021-11-15T01:00:00`<br/>- UTC time offsets: `2021-11-15T01:00:00-05:00`<br/><br/>> Time zones<br/>> <br/>> Not all dates from Codat will contain information about time zones. <br/>> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
46
- | `id` | *string* | :heavy_minus_sign: | Identifier for the invoice, unique to the company in the accounting platform. | |
47
- | `invoiceNumber` | *string* | :heavy_minus_sign: | Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. | |
48
- | `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:<br/><br/>```<br/>2020-10-08T22:40:50Z<br/>2021-01-01T00:00:00<br/>```<br/><br/><br/><br/>When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:<br/><br/>- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`<br/>- Unqualified local time: `2021-11-15T01:00:00`<br/>- UTC time offsets: `2021-11-15T01:00:00-05:00`<br/><br/>> Time zones<br/>> <br/>> Not all dates from Codat will contain information about time zones. <br/>> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
49
- | `lineItems` | [shared.InvoiceLineItem](../../../sdk/models/shared/invoicelineitem.md)[] | :heavy_minus_sign: | An array of line items. | |
50
- | `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | |
51
- | `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
52
- | `note` | *string* | :heavy_minus_sign: | Any additional information about the invoice. Where possible, Codat links to a data field in the accounting platform that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting platform to the customer. | |
53
- | `paidOnDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:<br/><br/>```<br/>2020-10-08T22:40:50Z<br/>2021-01-01T00:00:00<br/>```<br/><br/><br/><br/>When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:<br/><br/>- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`<br/>- Unqualified local time: `2021-11-15T01:00:00`<br/>- UTC time offsets: `2021-11-15T01:00:00-05:00`<br/><br/>> Time zones<br/>> <br/>> Not all dates from Codat will contain information about time zones. <br/>> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23T00:00:00.000Z |
54
- | `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | |
55
- | `salesOrderRefs` | [shared.SalesOrderReference](../../../sdk/models/shared/salesorderreference.md)[] | :heavy_minus_sign: | List of references to related Sales orders. | |
56
- | `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23T00:00:00.000Z |
57
- | `status` | [shared.InvoiceStatus](../../../sdk/models/shared/invoicestatus.md) | :heavy_check_mark: | Current state of the invoice:<br/><br/>- `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email.<br/>- `Submitted` - Invoice is no longer a draft. It has been processed and, or, sent to the customer. In this state, it will impact the ledger. It also has no payments made against it (amountDue == totalAmount).<br/>- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount (0 < amountDue < totalAmount).<br/>- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid (amountDue == 0).<br/>- `Void` - An invoice can become Void when it's deleted, refunded, written off, or cancelled. A voided invoice may still be PartiallyPaid, and so all outstanding amounts on voided invoices are removed from the accounts receivable account. | |
58
- | `subTotal` | *number* | :heavy_minus_sign: | Total amount of the invoice excluding any taxes. | |
59
- | `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types. <br/><br/>It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
60
- | `totalAmount` | *number* | :heavy_check_mark: | Amount of the invoice, inclusive of tax. | |
61
- | `totalDiscount` | *number* | :heavy_minus_sign: | Numerical value of discounts applied to the invoice. | |
62
- | `totalTaxAmount` | *number* | :heavy_check_mark: | Amount of tax on the invoice. | |
63
- | `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | |
36
+ | Field | Type | Required | Description | Example |
37
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38
+ | `additionalTaxAmount` | *number* | :heavy_minus_sign: | Additional tax amount applied to invoice. | |
39
+ | `additionalTaxPercentage` | *number* | :heavy_minus_sign: | Percentage rate of any additional tax applied to the invoice. | |
40
+ | `amountDue` | *number* | :heavy_check_mark: | Amount outstanding on the invoice. | |
41
+ | `currency` | *string* | :heavy_minus_sign: | The currency data type in Codat is the [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code, e.g. _GBP_.<br/><br/>## Unknown currencies<br/><br/>In line with the ISO 4217 specification, the code _XXX_ is used when the data source does not return a currency for a transaction. <br/><br/>There are only a very small number of edge cases where this currency code is returned by the Codat system. | GBP |
42
+ | `currencyRate` | *number* | :heavy_minus_sign: | Rate to convert the total amount of the payment into the base currency for the company at the time of the payment.<br/><br/>Currency rates in Codat are implemented as the multiple of foreign currency units to each base currency unit. <br/><br/>It is not possible to perform the currency conversion with two or more non-base currencies participating in the transaction. For example, if a company's base currency is USD, and it has a bill issued in EUR, then the bill payment must happen in USD or EUR.<br/><br/>Where the currency rate is provided by the underlying accounting platform, it will be available from Codat with the same precision (up to a maximum of 9 decimal places). <br/><br/>For accounting platforms which do not provide an explicit currency rate, it is calculated as `baseCurrency / foreignCurrency` and will be returned to 9 decimal places.<br/><br/>## Examples with base currency of GBP<br/><br/>\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (GBP) \|<br/>\| :--------------- \| :------------- \| :------------ \| :------------------------- \|<br/>\| **USD** \| $20 \| 0.781 \| £15.62 \|<br/>\| **EUR** \| €20 \| 0.885 \| £17.70 \|<br/>\| **RUB** \| ₽20 \| 0.011 \| £0.22 \|<br/><br/>## Examples with base currency of USD<br/><br/>\| Foreign Currency \| Foreign Amount \| Currency Rate \| Base Currency Amount (USD) \|<br/>\| :--------------- \| :------------- \| :------------ \| :------------------------- \|<br/>\| **GBP** \| £20 \| 1.277 \| $25.54 \|<br/>\| **EUR** \| €20 \| 1.134 \| $22.68 \|<br/>\| **RUB** \| ₽20 \| 0.015 \| $0.30 \|<br/><br/><br/>### Integration-specific details<br/><br/>\| Integration \| Scenario \| System behavior \|<br/>\|-------------------\|-------------------------------------------------\|----------------------------------------------------------------------------------------------------------------------------------------------------------------------\|<br/>\| QuickBooks Online \| Transaction currency differs from base currency \| If currency rate value is left `null`, a rate of 1 will be used by QBO by default. To override this, include the required currency rate in the expense transaction. \| | |
43
+ | `customerRef` | [shared.AccountingCustomerRef](../../../sdk/models/shared/accountingcustomerref.md) | :heavy_minus_sign: | N/A | |
44
+ | `discountPercentage` | *number* | :heavy_minus_sign: | Percentage rate (from 0 to 100) of discounts applied to the invoice. For example: A 5% discount will return a value of `5`, not `0.05`. | |
45
+ | `dueDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:<br/><br/>```<br/>2020-10-08T22:40:50Z<br/>2021-01-01T00:00:00<br/>```<br/><br/><br/><br/>When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:<br/><br/>- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`<br/>- Unqualified local time: `2021-11-15T01:00:00`<br/>- UTC time offsets: `2021-11-15T01:00:00-05:00`<br/><br/>> Time zones<br/>> <br/>> Not all dates from Codat will contain information about time zones. <br/>> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
46
+ | `id` | *string* | :heavy_minus_sign: | Identifier for the invoice, unique to the company in the accounting platform. | |
47
+ | `invoiceNumber` | *string* | :heavy_minus_sign: | Friendly reference for the invoice. If available, this appears in the file name of invoice attachments. | |
48
+ | `issueDate` | *string* | :heavy_check_mark: | In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:<br/><br/>```<br/>2020-10-08T22:40:50Z<br/>2021-01-01T00:00:00<br/>```<br/><br/><br/><br/>When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:<br/><br/>- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`<br/>- Unqualified local time: `2021-11-15T01:00:00`<br/>- UTC time offsets: `2021-11-15T01:00:00-05:00`<br/><br/>> Time zones<br/>> <br/>> Not all dates from Codat will contain information about time zones. <br/>> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
49
+ | `lineItems` | [shared.InvoiceLineItem](../../../sdk/models/shared/invoicelineitem.md)[] | :heavy_minus_sign: | An array of line items. | |
50
+ | `metadata` | [shared.Metadata](../../../sdk/models/shared/metadata.md) | :heavy_minus_sign: | N/A | |
51
+ | `modifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC |
52
+ | `note` | *string* | :heavy_minus_sign: | Any additional information about the invoice. Where possible, Codat links to a data field in the accounting platform that is publicly available. This means that the contents of the note field are included when an invoice is emailed from the accounting platform to the customer. | |
53
+ | `paidOnDate` | *string* | :heavy_minus_sign: | In Codat's data model, dates and times are represented using the <a class="external" href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601 standard</a>. Date and time fields are formatted as strings; for example:<br/><br/>```<br/>2020-10-08T22:40:50Z<br/>2021-01-01T00:00:00<br/>```<br/><br/><br/><br/>When syncing data that contains `DateTime` fields from Codat, make sure you support the following cases when reading time information:<br/><br/>- Coordinated Universal Time (UTC): `2021-11-15T06:00:00Z`<br/>- Unqualified local time: `2021-11-15T01:00:00`<br/>- UTC time offsets: `2021-11-15T01:00:00-05:00`<br/><br/>> Time zones<br/>> <br/>> Not all dates from Codat will contain information about time zones. <br/>> Where it is not available from the underlying platform, Codat will return these as times local to the business whose data has been synced. | 2022-10-23 00:00:00 +0000 UTC |
54
+ | `paymentAllocations` | [shared.AccountingPaymentAllocation](../../../sdk/models/shared/accountingpaymentallocation.md)[] | :heavy_minus_sign: | An array of payment allocations. | |
55
+ | `salesOrderRefs` | [shared.SalesOrderReference](../../../sdk/models/shared/salesorderreference.md)[] | :heavy_minus_sign: | List of references to related Sales orders. | |
56
+ | `sourceModifiedDate` | *string* | :heavy_minus_sign: | N/A | 2022-10-23 00:00:00 +0000 UTC |
57
+ | `status` | [shared.InvoiceStatus](../../../sdk/models/shared/invoicestatus.md) | :heavy_check_mark: | Current state of the invoice:<br/><br/>- `Draft` - Invoice hasn't been submitted to the supplier. It may be in a pending state or is scheduled for future submission, for example by email.<br/>- `Submitted` - Invoice is no longer a draft. It has been processed and, or, sent to the customer. In this state, it will impact the ledger. It also has no payments made against it (amountDue == totalAmount).<br/>- `PartiallyPaid` - The balance paid against the invoice is positive, but less than the total invoice amount (0 < amountDue < totalAmount).<br/>- `Paid` - Invoice is paid in full. This includes if the invoice has been credited or overpaid (amountDue == 0).<br/>- `Void` - An invoice can become Void when it's deleted, refunded, written off, or cancelled. A voided invoice may still be PartiallyPaid, and so all outstanding amounts on voided invoices are removed from the accounts receivable account. | |
58
+ | `subTotal` | *number* | :heavy_minus_sign: | Total amount of the invoice excluding any taxes. | |
59
+ | `supplementalData` | [shared.SupplementalData](../../../sdk/models/shared/supplementaldata.md) | :heavy_minus_sign: | Supplemental data is additional data you can include in our standard data types. <br/><br/>It is referenced as a configured dynamic key value pair that is unique to the accounting platform. [Learn more](https://docs.codat.io/using-the-api/supplemental-data/overview) about supplemental data. | |
60
+ | `totalAmount` | *number* | :heavy_check_mark: | Amount of the invoice, inclusive of tax. | |
61
+ | `totalDiscount` | *number* | :heavy_minus_sign: | Numerical value of discounts applied to the invoice. | |
62
+ | `totalTaxAmount` | *number* | :heavy_check_mark: | Amount of tax on the invoice. | |
63
+ | `withholdingTax` | [shared.Items](../../../sdk/models/shared/items.md)[] | :heavy_minus_sign: | N/A | |