My Products
Help
Jeroen Bijl
CONTRIBUTOR **

Fetch attachementId from Journal Transactions

by Jeroen Bijl

Hi,

I am attempting to fetch attachements based on Journal Transactions. 
Using the CustomerInvoice endpoint I can verify the attachements are there, and the endpoint returns expected values. 

JeroenBijl_1-1676907390101.png



However, when using: 

https://integration.visma.net/API/controller/api/v2/journaltransaction

 For the same period, the attachement data is not present. I have tried with expandAttachements=true and false, but there is no attachement data. 

JeroenBijl_2-1676907555599.png

 



Looking at the swagger documentation there should be attachement data on both the Journal Transaction level and Journal Transaction Line. 

JeroenBijl_0-1676907255290.png

Anyone using attachement info from journal transactions? or have an idea why I can't get the data?

 

1 REPLY 1
Jeroen Bijl
CONTRIBUTOR **

by Jeroen Bijl

Attachments aren't linked to the journal transaction, in my test data they are only connected to an invoice. So the above results make sense.

But I do have a follow-up issue. I am attempting to replicate the "View Source Document" functionality form the ui. Fetch the attachment linked to a journal transaction. Anyone have a good idea how to achieve that?

Journal Transaction has a referenceNumber, but this is not a param on CustomerInvoice/SupplierInvoice. I could fetch all for the given financial period and select the one with a matching ref number. Select Customer/Supplier based on the journal transaction module, but I hope there is a better way.

I could also check NumberSequence to attempt to figure out if a referenceNumber is a Bill or an Invoice, but seeing as the sequences can overlap this doesn't seem ideal either. 

Any tips are most welcome