I have a Google Apps Script integration that automates our monthly stocktakes. To do this, my script needs to fetch the closing inventory quantities by location for a specific past date.
The old workflow: Previously, I used the /api2/ endpoints for this:
POST the target date to /inventory-quantity-by-location-form (This still works and returns a 201 with the Report Key).
GET the data using /inventory-quantity-by-location-view/{key}.
The current issue: Recently, step 2 stopped working.
If I use an API Key, the -view endpoint returns a 401 Unauthorized.
Because I need closing balances for a specific date, I cannot just pull from raw endpoints like /inventory-items or /inventory-on-hand, as those only provide live, current-second data.
What is the officially supported way to fetch historical, date-specific inventory balances via the API? Is there a way to force the -view endpoint to return lightweight JSON, or is there a new endpoint I should be using instead?
I am very new to API integrations, but it is amazing that we are both testing the exact same issue the same day, and having the same issue, I was just about to ask and found this:
I can do this:
POST /inventory-quantity-by-location-form
STATUS: 201
REPORT KEY CREATED: 01…6a
But then it fails at
GET /inventory-quantity-by-location-view/01…6a
STATUS: 401
BODY: {“error”:“Unauthorized”}
which I understand as
Create report form: Works
Open report view through API key: Broken / unauthorized
The reason I am doing this, it it helps, is because I am creating an integration that let me see in real time how many items do I have by location, to authorize the lab to build it or to grab it from stock.
We have been running it for several months, it’s part of our daily stocktake. For the last 3 days it isn’t working. I assume they are changing something, but not sure what.
It’s the pro and con with manager.io. A lot of stuff changing but sometimes without any notice or any clue if it’s a bug or intentional.