Bug: API endpoint /objects/products returns error for barcode and userfields
See original GitHub issueHow to reproduce
- Open https://demo.grocy.info/api
- Select the endpoint (POST) /objects/{entity}
- Select “products” as an entity
- Keep the default request body
- Click on Execute
The following error will be shown:
{
"error_message": "SQLSTATE[HY000]: General error: 1 table products has no column named barcode"
}
A similar issue is observed with the userfields
parameter in the request.
The issue is present in both: actual and pre-release versions.
Update: The same issue is present in the PUT request
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Feature Request: Quantity conversion factors for barcodes
So I have one product, with several different barcodes and each barcode is ... grocy Bug: API endpoint /objects/products returns error for ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can’t be true for just like everything, since the web frontend uses the API for anything. So the most simple way to find out how things work is to use the UI, while also having a look at your favorite browsers developer tools and see what actually happens.
Use the “Generic entity interactions” endpoints and the entity
product_barcodes
to add/edit/delete product barcodes.@berrnd sure, I would be glad to fix the documentation, but there is a very concrete part that doesn’t work at the moment: It seems that there is no way how one can add/modify the barcodes of products via API.
As I was relying on the documentation, I thought there is a possibility to do it, but seems that it is just a bug in documentation, and it is not possible to do it via API, am I right? In this case, I will create a feature request instead and fix the documentation meanwhile.