My Products

Incorrect metadata totalcount in JournalTransactionV2 since this morning

by gerrit_deglee

Hi, we use the following request to verify we have all expected records in our DWH. Since this morning the JournalTransactionV2 endpoint returns metadata.totalcount of 1 instead of the expected number, causing our validation to fail.


If I change the pagesize to 2, I get a totalcount of 2. If I change it to 3, I get two records, one with a totalcount of 113230, the other with totalcount of 1. One query should return the same totalcount in all cases I assume. The 113230 is the number I would expect.




by Magnus Johnsen (Updated ‎10-11-2020 12:51 by Magnus Johnsen VISMA )



We can confirm there is an issue and are currently looking in to it.


What we have found so far:



  • Batches= 6
  • Lines = 20
  • Metadata on each batch, all except last shows metaData count = 20
  • Last shows metaData = 3


  • Batches=1
  • Lines=1
  • Metadata count = 1
  • Returns correct amount of pages, but impossible to tell by metaDataCount.


  • Batches=1
  • Lines=2
  • Metadata count = 2



  • Batches = 2
  • Lines = 2
  • Metadata Count = 20 on first batch
  • Metadata = 1 on last batch


MetaData Count should only be included once in the response and should reflect total amount of lines in dataset.
It seems like the last returned batch gets a metaData count that is the amount of lines in that batch, so if 1 batch is included in the response, the metaData shows how many lines that batch includes in the result.
If there are several batches, the first batches all return the correct metaData count, but the last batch contains a metaData count that reflects the remaining lines.


We are reporting this to the development team and will get back to you when we have more information. 


Right now the workaround right now would be to get the next page until the result is an empty array.

The development team is currently working on solving the issue. 

Accepted solution
Magnus Johnsen


This issue was resolved in the patch deployed this night.

You can see the patch notes here: Scheduled minor maintenance for ERP / API (Nov 12, 22:30 CET - Nov 13, 00:30 CET)


Please let us know if you are still having issues.


Thank you. 

Jasper Heus

I might have another issue here:


I'm calling this url:


I'd expect the result to return 1000 journalTransactions but I only get 482. Where the metadata totalCount is 62168


When paging threw the Items getting to page 64, I'm not getting anymore results but I only recieved around 11.000 items. (none of the pages gives me 1000 items)




I'm aware that the pageSize is limited to 1000, I'd like to make sure I get as many as possible and not worry about the pageSize being upped later on.

What are you counting?

The endpoint is returning lines and not whole batches.

2021-01-15 09_54_39-Window.png

Jasper Heus

😞 Read.... read.... read.... I Was calculating the JournalTransactions not the lines... that makes sense!

No worries, it is a lot to read at first. 🙂