to get a personalized navigation.
to get a personalized navigation.
Getting customers or customerpayment methods with batch request returns OK for the first request from the list and 401 for all the others. Here is an example
Batch Requests
GET /api/v1/customer/10076 HTTP/1.1
Accept-Encoding: identity
Accept: application/json
Host: integration.visma.net/API/controller
GET /api/v1/customer/10075 HTTP/1.1
Accept-Encoding: identity
Accept: application/json
Host: integration.visma.net/API/controller
Batch response from API/controller/api/v1/$batch
--97866de2-527d-4db5-b754-5c6a0f7a43b2
Content-Type: application/http; msgtype=response
HTTP/1.1 200 OK
Content-Type: application/octet-stream, application/json; charset=utf-8
{"internalId":22156,"number":"10076","name":"...}
--97866de2-527d-4db5-b754-5c6a0f7a43b2
Content-Type: application/http; msgtype=response
HTTP/1.1 401 Unauthorized
--97866de2-527d-4db5-b754-5c6a0f7a43b2--
When the GET requests are swapped again only the first customer in that case 10075 is returned
--d23d7921-0e60-4db1-9f65-f873bec587a3
Content-Type: application/http; msgtype=response
HTTP/1.1 200 OK
Content-Type: application/octet-stream, application/json; charset=utf-8
{"internalId":22155,"number":"10075","name":"...}
--d23d7921-0e60-4db1-9f65-f873bec587a3
Content-Type: application/http; msgtype=response
HTTP/1.1 401 Unauthorized
--d23d7921-0e60-4db1-9f65-f873bec587a3--
Has there been change in the batch authorization, this has worked for the last year?
Solved! Go to Solution.
We confirm that, regardless of how many batch lines are included, only the first request is handled and the rest fails with 401 - Unauthorized. This has been reported to the team. We'll get back to you once it's consolidated.
This has been confirmed as a bug. $Batch Endpoint returns 401 for all requests except first operation sent in the payload.
1) Request Headers
2) RequestBody:
--batch_357647d1-a6b5-4e6a-aa73-edfc88d8866e
Content-type: application/http; msgtype=request
GET /api/v1/customer/10001 HTTP/1.1
Accept-Encoding: identity
Accept: application/json
Host: integration.visma.net/API/controller
--batch_357647d1-a6b5-4e6a-aa73-edfc88d8866e
Content-type: application/http; msgtype=request
GET /api/v1/customer/1001 HTTP/1.1
Accept-Encoding: identity
Accept: application/json
Host: integration.visma.net/API/controller
--batch_357647d1-a6b5-4e6a-aa73-edfc88d8866e
Content-type: application/http; msgtype=request
GET /api/v1/customer/295 HTTP/1.1
Accept-Encoding: identity
Accept: application/json
Host: integration.visma.net/API/controller
--batch_357647d1-a6b5-4e6a-aa73-edfc88d8866e--
3)Response
Currently, we're unable to share the exact date for when this can be fixed, please be advised that we do our best to deliver this fix within the upcoming release. Please subscribe to the Visma.net Financials API updates for version 8.29 (December 2020) We'll keep aforementioned thread updated. Thank you for bringing this issue to our attention.
I can verify that release 8.29 has fixed the error. All requests in a batch get correct response.
Hi,
Thank you for confirming this.
You can find the latest release notes here: [Release Notes] - Visma.Net API 8.29 - 1.12.2020
Copyright © 2022 Visma.com. All rights reserved.