My Products
Help
adrianm
PARTNER

25% of call to journaltransaction endpoint returns 400

by adrianm

(third try, 2 earlier posts has been marked as spam)

 

I have made several hundred calls to the journal transaction endpoint yesterday and today. 25% of them fails with code 400. Exactly the same request works on second (or third) try.


What can I do?


(this is a new integration so I don't have any history)


Tenant id is 192de558-8750-11ed-9891-0693d8a7c3dd

 

Visma.Net: POST: https://integration.visma.net/API/controller/api/v2/journaltransaction
Headers: {
    Accept: application/json
    Authorization: <hidden>
    Accept-Encoding: gzip    Accept-Encoding: deflate
    Request-Context: appId=cid-v1:72b1579a-9e83-44d4-b964-8b83e2853ccd
    Request-Id: |0ff99bcdd38f07fd14dc396339c307d5.084fcdecf5dc5bd5.
    traceparent: 00-0ff99bcdd38f07fd14dc396339c307d5-084fcdecf5dc5bd5-00
    Content-Type: application/json; charset=utf-8
    Content-Length: 662
}
{
	"transactionDate": {
		"value": "2023-01-05T00:00:00"
	},
	"ledger": {
		"value": "1"
	},
	"description": {
		"value": "11040"
	},
	"journalTransactionLines": [
		{
			"operation": "Insert",
			"accountNumber": {
				"value": "1943"
			},
			"subaccount": [
				{
					"segmentId": 1,
					"segmentValue": "000"
				},
				{
					"segmentId": 2,
					"segmentValue": "00000"
				},
				{
					"segmentId": 3,
					"segmentValue": "000"
				}
			],
			"debitAmountInCurrency": {
				"value": 100.0
			},
			"creditAmountInCurrency": {
				"value": 0.0
			}
		},
		{
			"operation": "Insert",
			"accountNumber": {
				"value": "3110"
			},
			"subaccount": [
				{
					"segmentId": 1,
					"segmentValue": "360"
				},
				{
					"segmentId": 2,
					"segmentValue": "36100"
				},
				{
					"segmentId": 3,
					"segmentValue": "000"
				}
			],
			"debitAmountInCurrency": {
				"value": 0.0
			},
			"creditAmountInCurrency": {
				"value": 100.0
			}
		}
	]
}
Response: 400 Bad Request
Headers: {
    Date: Mon, 30 Jan 2023 14:08:36 GMT
    Server: Apache/2.4.52    Server: (Debian)    Server: OpenSSL/1.1.1n
    Strict-Transport-Security: max-age=31536000; includeSubDomains    Strict-Transport-Security: max-age=31536000; includeSubDomains
    ipp-request-id: 29b050ef-21ad-4daa-9c54-d3571552cb75
    X-Content-Type-Options: application/json
    Pragma: no-cache
    X-Handled-By: Visma-PX.Export/AuthenticationManagerModule
    Referrer-Policy: origin-when-cross-origin
    VnfInstanceId: ERP_SE_REAL_0042
    Cache-Control: no-cache
    X-XSS-Protection: 1;mode=block
    Set-Cookie: <crumbs>;  path=/;  secure;  expires=Sun, 29-Jan-2023 14:08:35 GMT;  HttpOnly
    Connection: close
    Transfer-Encoding: chunked
    Content-Type: application/json; charset=utf-8
    Expires: -1
}
{
	"message": "VismaId: 29b050ef-21ad-4daa-9c54-d3571552cb75. Error creating journal transaction. Cannot insert the value NULL into column 'LedgerID', table 'ERP_SE_REAL_0042.dbo.GLTran'; column does not allow nulls. INSERT fails.\r\nThe statement has been terminated."
}

 

1 REPLY 1

by Magnus Johnsen

Hi,

If the company was created recently the error will most likely dissapear by itself, previous cases where we have seen this type of error they have affected new companies and the issue has generally been resolved within 24hrs.