My Products
Help
adrianm
PARTNER

Inventory GetAll only returns active

by adrianm

I might have missed some news but when I call `controller/api/v1/inventory` without any parameters today I only get inventories with status "active".

 

This seems to have changed recently because some weeks ago I would get all products.

 

Also noticed there is a new parameter "status" in 10.31.01.1004 which wasn't in 10.31.01.1003 last week.

 

Is this change intentional?

To get all non-inactive inventories I now need to make one call for each status?

 

 

10 REPLIES 10
adrianm
PARTNER

by adrianm

Thank you for the quick response.

by Suzdar Ibrahim

Hi Adrian,

 

As a workaround you can do requests calling for specific statuses. So basically if you want inactive items then change the parameter from active to inactive when sending the request.

 

BR,

Suzdar

by Oskar Jansson

Hi Adrian, a solution for the issue where the Status parameter defaults to Active is on its way. 

MvcMartin
CONTRIBUTOR *

by MvcMartin

Hi, we started noticing this behavior last Wednesday (15/1).

 

From what I gather, the endpoint now returns all status == Active, where it previously returned all status != Inactive (?). (when no status-parameter is specified).

 

Did you mean a solution for status != Inactive is on the way? We need all but Inactive and MarkedForDeletion.

by Oskar Jansson

Hi, you need to do separate GET request for each status needed. With the current implementation, only one status can be specified per GET request.


If this is a functionality you need, we recommend that you create a post in the Ideas section of the forum.

andreasaulin
CHAMPION **

This can't be true. Why is this changed and why havent we been told about this? Now we need to change a couple of integrations

adrianm
PARTNER

by adrianm

@Oskar Jansson wrote:

Hi, you need to do separate GET request for each status needed. With the current implementation, only one status can be specified per GET request.

I don't understand. Does this mean this not documented breaking change in the endpoint is permanent?

 

What happened to


a solution for the issue where the Status parameter defaults to Active is on its way.
Accepted solution
Oskar Jansson
VISMA

by Oskar Jansson

Hi @adrianm and @andreasaulin, I think this was a mix-up of two discussions in the same thread:

Question 1. /controller/api/v1/inventory will return all items by default if no status parameter is entered. However, there was a bug where the default setting did not display inactive items. This was fixed in release 10.32.0, where all items are now fetched if no status parameter is entered.


Having the ability to filter by status is an added functionality, so it is not considered a breaking change.

Question 2. I think you interpreted my answer as a response to a different question. This is the discussion between me and MvcMartins. Here is what I was replying to:


- Question: “We need all but Inactive and MarkedForDeletion“ - MvcMartin


- Answer: “You need to do separate GET request for each status needed. With the current implementation, only one status can be specified per GET request.” - Oskar

andreasaulin
CHAMPION **

Q1: When will 10.32.0, be out? It was still an issue at 12:30 today. "NoSales" was only returned when specifying type=NoSales

It was released today at 13:30