My Products
Help
omelhus
PARTNER

POST to JournalTransactionV2 does not care about lineNumber in dto

by omelhus

Hey,

 

I'm creating new journal transaction entries with set lineNumbers, but Visma.net does not care about the numbers I send in. Is there any logic I'm missing  here?

 

This is the dto I'm sending, and the lineNumbers returned are 2 and 4.

 

{
"transactionDate": {
"Value": "2021-12-01T00:00:00.000Z"
},
"currencyId": {
"Value": "NOK"
},
"postPeriod": {
"Value": "082021"
},
"description": {
"Value": "[abc123] TESTING"
},
"journalTransactionLines": [
{
"accountNumber": {
"Value": "5000"
},
"transactionDescription": {
"Value": "TESTING"
},
"creditAmountInCurrency": {
"Value": 500.0
},
"lineNumber": {
"Value": 1
},
"debitAmountInCurrency": {
"Value": 0.0
},
"operation": "Insert"
},
{
"accountNumber": {
"Value": "1920"
},
"transactionDescription": {
"Value": "TESTING"
},
"debitAmountInCurrency": {
"Value": 500.0
},
"lineNumber": {
"Value": 2
},
"operation": "Insert"
}
]
}

 

3 REPLIES 3

by Yıldırım (Updated ‎01-12-2021 16:58 by Yıldırım VISMA )

Hello Ole, 

 

When Posting, entered "lineNbr" is not taken into consideration, and it is auto incremental. "lineNbr" field is used in PUT & DELETE operations wherever it's supported. 

However, we confirm the issue with the 

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

 there appears to be an error with the flow since it increases the "LineNbr" by two when the JT created via the API. 

JT.jpg

 

This has been reported. We'll keep the thread updated on progress.

 

omelhus
PARTNER

by omelhus

Thank you for clarifying.

 

Can I trust the order of the lines? Will it be the same as I’ve posted?

by Yıldırım (Updated ‎01-12-2021 17:14 by Yıldırım VISMA )

After the fix, this will be working as described, auto-increment sequential numbers. (1-2-3 instead of 2-4-6)

"lineNumber" doesn't have any effect in the POST operations, and it'll be automatically increased by as many lines as included in the transaction.