On this weblog, We’re going to learn to replace particular fields of an object class.
To start with, we need to inform you that in Prestashop 1.7 while you replace any useful resource knowledge it is advisable ship all required fields within the API request utilizing the PUT methodology as a result of no PATCH methodology exists in 1.7.
In PrestaShop 8, the PreatShop staff launched a brand new Request methodology named PATCH. Utilizing this methodology you’ll be able to replace some particular fields (which implies not must ship all requested fields within the request knowledge).
Let’s perceive the method with a dwell sensible.
Earlier than, If we wished to replace any useful resource then we wanted to ship all required fields else we might get an error with standing code 400 (Unhealthy Request). Verify the beneath picture.
Prestashop Firm ? Learn Extra
In PrestaShop 8, You may make the identical request with the PATCH methodology, You’ll find yourself with a 200 Okay standing & issues will probably be up to date in DB as per your request.
That’s all about this weblog. Hope it’s going to enable you.
In case you are going through any points or have any doubts in regards to the above course of, please be happy to contact us by means of the remark part.
Additionally, you’ll be able to discover our PrestaShop Improvement Providers and a wide range of high quality PrestaShop Modules.
For any doubt contact us at [email protected]