My Products
Help
Snuffsis
CONTRIBUTOR ***

Inventory - specific inventory item now returns list

by Snuffsis

The endpoint for a specific inventoryitem is now returning a list of every single inventory item.

 

endpoint in postman:

GET: {{baseUrl}}/controller/api/v1/inventory/:inventoryNumber

curl:

curl --location --request GET 'https://integration.visma.net/API/controller/api/v1/inventory/<inventoryNumber>' \
--header 'Authorization: Bearer <token>'
3 REPLIES 3

by Magnus Johnsen

Hi,

We are not able to reproduce this:

2022-09-01 11_28_29-Postman.png

Snuffsis
CONTRIBUTOR ***

by Snuffsis

Okay,

 

So, I investigated it a bit more and tried a different inventoryItem.

 

The issue seems to be with this specific inventoryitem i am trying to get. It starts with a # in the inventorynumber.

If i try to get an inventory without # in the beginning, it works fine.

 

It seems like it ignores everything following # in the request?

 

example: 

Snuffsis_0-1662024838458.png

 

It should say 'inventory with number 2#200 could not be found' in this case.

 

The first error returned with inventorynumber being #200 (which is an inventoryitem that exists).

by Magnus Johnsen

Hi,

You'll need to encode the inventoryNumber in this case, have a look at this article and try it:

Method for getting resources with reserved characters - B64URL Encoding