# VAT Entries

`GET` _(Table: VAT Entry)_

```
eOne/core/v1.0/vatEntries
```

"Read-only VAT ledger. One row per VAT amount Business Central posted, with its base, its groups and its rate, which is the transaction-level detail a VAT return is built from."

## Base and amount

`base` is the amount VAT was calculated on and `amount` is the VAT itself, both in the transaction currency. Their ratio is the effective rate, which is worth checking against [`vatPostingSetup`](https://eonesolutions.github.io/eone-bc-integration/core-vatPostingSetup.md) when a return does not foot.

## It is append-only, with one exception

An entry is written when a document posts and is not edited afterwards. `closed` and the unrealized fields *do* change when a VAT period is settled, which is why SmartConnect should watermark this feed on `lastModifiedDateTime` and not on `entryNumber`. An entry-number cursor reads every entry exactly once, while it is still open, and never sees it close.

## No dimensions here

VAT Entry carries no Dimension Set ID in Business Central, so this feed publishes none. To read VAT by dimension, join `transactionNumber` to [`generalLedgerEntries`](https://eonesolutions.github.io/eone-bc-integration/core-generalLedgerEntries.md), which does carry one.

## Unrealized VAT

On an unrealized VAT setup, `amount` is recognised only as payment arrives. `remainingUnrealizedAmount` is what has not yet been recognised. Reporting `amount` alone on such a setup overstates the liability.

## VAT Entries fields

_API column → BC field._

**Legend**

- _(req)_ required on create
- _(res)_ resolver
- _(cur)_ currency-translated
- _(ro)_ read-only
- _(ext)_ added to this endpoint by another extension (BC field name shown; its API column name is not known here)

| API | BC field | Notes |
| --- | --- | --- |
| `id` | SystemId | The Business Central record id. Unique on its own, and the key this feed is written against. _(ro)_ |
| `bcCompanyId` | bcCompanyId | The company this row belongs to - the same GUID that appears in the request URL. Present on every endpoint so a store pooling several companies can keep them apart without relying on which URL it called. _(ro)_ |
| `bcCompanyName` | bcCompanyName | The name of the company this row belongs to. _(ro)_ |
| `entryNumber` | Entry No. | Business Central's own entry number. Monotonic, so it also orders the ledger. _(ro)_ |
| `postingDate` | Posting Date | The date the entry posted, and the date a VAT return period is selected on. _(ro)_ |
| `documentDate` | Document Date | The date on the source document. _(ro)_ |
| `documentType` | Document Type | The kind of document that produced this entry. _(ro)_ |
| `documentNumber` | Document No. | The posted document this entry belongs to. _(ro)_ |
| `externalDocumentNumber` | External Document No. | The counterparty's document number, when one was recorded. _(ro)_ |
| `type` | Type | Whether this is purchase VAT, sales VAT, or a settlement entry. _(ro)_ |
| `base` | Base | The amount VAT was calculated on, in the transaction currency. _(ro)_ |
| `amount` | Amount | The VAT amount itself, in the transaction currency. _(ro)_ |
| `vatCalculationType` | VAT Calculation Type | How the VAT was calculated: normal, reverse charge, full VAT, or sales tax. _(ro)_ |
| `vatBusPostingGroup` | VAT Bus. Posting Group | The business side of the setup pair. Join it with vatProdPostingGroup to the vatPostingSetup endpoint for the rate. _(ro)_ |
| `vatProdPostingGroup` | VAT Prod. Posting Group | The product side of the setup pair. _(ro)_ |
| `genBusPostingGroup` | Gen. Bus. Posting Group | The general business posting group on the source line. _(ro)_ |
| `genProdPostingGroup` | Gen. Prod. Posting Group | The general product posting group on the source line. _(ro)_ |
| `billToPayToNumber` | Bill-to/Pay-to No. | The customer or vendor the entry is for. _(ro)_ |
| `countryRegionCode` | Country/Region Code | The counterparty's country, which drives EU and domestic reporting splits. _(ro)_ |
| `vatRegistrationNumber` | VAT Registration No. | The counterparty's VAT registration number, as recorded on the document. _(ro)_ |
| `euServiceFlag` | EU Service | Whether the entry is reported as an EU service. _(ro)_ |
| `unrealizedBase` | Unrealized Base | The base not yet realized, for unrealized VAT setups. _(ro)_ |
| `unrealizedAmount` | Unrealized Amount | The VAT not yet realized, for unrealized VAT setups. _(ro)_ |
| `remainingUnrealizedBase` | Remaining Unrealized Base | How much of the unrealized base is still outstanding. _(ro)_ |
| `remainingUnrealizedAmount` | Remaining Unrealized Amount | How much of the unrealized VAT is still outstanding. _(ro)_ |
| `closed` | Closed | Whether the entry has been included in a closed VAT settlement. _(ro)_ |
| `transactionNumber` | Transaction No. | Groups every entry posted by the same transaction, across ledgers. _(ro)_ |
| `sourceCode` | Source Code | What kind of posting produced the entry. _(ro)_ |
| `reversed` | Reversed | Whether this entry has been reversed. _(ro)_ |
| `euThreePartyTrade` | EU 3-Party Trade | Whether the entry is part of an EU three-party trade. _(ro)_ |
| `lastModifiedDateTime` | SystemModifiedAt | The last date and time the record was modified. Use it as the watermark for an incremental pull. _(ro)_ |
