Manually added 10 products with pictures via admin panel to test out Web API calls.
Using Postman, https://domain/odata/product returns 200 OK and data was listed.
However, https://domain/odata/picture returns 404 Not Found
Calling other API like https://domain/odata/vendor returns 200 OK, with empty data set.
The images display correctly on the web portal.
What could have gone wrong?
Web API Picture return 404
Monday, November 25, 2024 10:39:29 PM
In addition, I attempted to update the price of a product via API https://domain/odata/product('5fac8241b75dfa1e7a886597') using PATCH with body { "Price": 1.25 } and content-type set to application/json at header.
The response was 200 OK, however the price of the product was not update when view at the portal.
How can I trace what could have gone wrong?
The response was 200 OK, however the price of the product was not update when view at the portal.
How can I trace what could have gone wrong?
0
Hello,
In the case of pictures, it expected behavior. There are too many dependencies, pictures can also be related to manufacturer, vendor, category, slider, not only to product picture. So we've decided to don't implement it.
In the case of the problem with the PATCH request, it looks like it's a bug. We will investigate and fix it. Thanks for reporting.
In the case of pictures, it expected behavior. There are too many dependencies, pictures can also be related to manufacturer, vendor, category, slider, not only to product picture. So we've decided to don't implement it.
In the case of the problem with the PATCH request, it looks like it's a bug. We will investigate and fix it. Thanks for reporting.
0
Hi,
Understood. In that case, could the API https://domain/odata/picture return a list of all picture ID instead.
In this way, maintenance of pictures could be run by going thru vendor/manufacturer/etc picture ID list and finalizing a list of orphaned/unlinked picture ID for explicit deletion. Thus, the size of picture database could be kept at bay and daily database backup time could be estimated.
May I know how can I get the bug fixed version of GrandNode with the PATCH API on product issue rectified?
Understood. In that case, could the API https://domain/odata/picture return a list of all picture ID instead.
In this way, maintenance of pictures could be run by going thru vendor/manufacturer/etc picture ID list and finalizing a list of orphaned/unlinked picture ID for explicit deletion. Thus, the size of picture database could be kept at bay and daily database backup time could be estimated.
May I know how can I get the bug fixed version of GrandNode with the PATCH API on product issue rectified?
0
Clarence,
The bug has been fixed today, you can check it here. And implement the simple fix in your copy of GrandNode.
In the case of GET request for All pictures, we don't have plans to implement it for now.
The bug has been fixed today, you can check it here. And implement the simple fix in your copy of GrandNode.
In the case of GET request for All pictures, we don't have plans to implement it for now.
Best regards,
Patryk
GrandNode Team
Patryk
GrandNode Team
0
Hi Patryk,
GrandApi.dll was compiled according to suggested patch.
Using Postman, updating the price of a product via API https://domain/odata/product('5fac8241b75dfa1e7a886597') using PATCH with body { "Price": 1.25 } and content-type set to application/json at header returns error 500 Internal Server Error
The body is : Value cannot be null (Parameter 'patchDoc')
Any suggestion to where to specify the 'patchDoc' ?
Regards,
Clarence
GrandApi.dll was compiled according to suggested patch.
Using Postman, updating the price of a product via API https://domain/odata/product('5fac8241b75dfa1e7a886597') using PATCH with body { "Price": 1.25 } and content-type set to application/json at header returns error 500 Internal Server Error
The body is : Value cannot be null (Parameter 'patchDoc')
Any suggestion to where to specify the 'patchDoc' ?
Regards,
Clarence
0
Hi Clarence,
Please apologize, I've forgot to mention that the body of the request should be different.
According to the good practices of .NET Core, we've modified the PATCH request, and it should looks like this:
[
{
"path": "Name", / Name of the field
"op": "replace",
"value": "string" / Value of the field
}
]
Please apologize, I've forgot to mention that the body of the request should be different.
According to the good practices of .NET Core, we've modified the PATCH request, and it should looks like this:
[
{
"path": "Name", / Name of the field
"op": "replace",
"value": "string" / Value of the field
}
]
Best regards,
Patryk
GrandNode Team
Patryk
GrandNode Team
0