My Products
Help
Anonymous
Not applicable

How to upload journal transaction attachment?

by Anonymous

I am trying to figure out how to upload a journal transaction attachment, but am unable to figure out how. As far as I know I should create the journal transaction by calling endpoint /controller/api/v2/journaltransaction (POST), and then upload the file by calling /controller/api/v2/journaltransaction/module/{module}/{journalTransactionNumber}/attachment (POST).

 

Problem is, the first endpoint does not return the journalTransactionNumber I need for the second one. Secondly, the Open API specification does not describe the expected request object. Am I missing something?

2 REPLIES 2
Anonymous
Not applicable

by Anonymous

Thank you, was able to upload the attachment now. 👌

Accepted solution
Magnus Johnsen
VISMA

by Magnus Johnsen

Hi,

The ID of the recently created document is returned in the location header on creation.

We have an example of how to implement reading the documentID in C# here:

How to read recently created object ID from Visma.Net API Response Headers in C# ?

 

The attachment itself you send as form-data , we have an example of how to do it in C# here:

How to POST an attachment via Visma.net API in C# ?