1b.app
Link copied -

Update product if any

Have a request to create a product
/api/product/add/
We transfer the goods and if there is such a product, an error is generated
{"status":"error","errors":["Product with this Article exist!"]}
Is it possible to do the same as in api requests for the client? What if such a product already exists, then do not give an error, but simply update the data that came in the new request?
Original question is available on version: ru

Answers:

Yes, you can. Go to the new api https://app.swaggerhub.com/apis-docs/Bodya44/OneBoxOSapiv2/2.0#/product/products... , the productset method does what you need
08.06.2022, 11:24
Original comment available on version: ru

and how many hours to complete update in the old api? And do I still have hours on my balance sheet?
Just on the old api, all the integrations that we did work and I would not really like to redo everything because of 1 setting
09.06.2022, 11:15
Original comment available on version: ru

in the add method to make an update? No, you need to send a request to the update method if the add method gave an error. Those. you need to finish so that when you receive an error in add, send the same request to add, possibly with some changes
09.06.2022, 12:05
Original comment available on version: ru

In general, there is no way to modify it in add? With contacts, you can update, quite conveniently
13.06.2022, 17:02
Original comment available on version: ru

it makes no sense for us to develop the old api when there is a new one that works faster and which already has these functions.
13.06.2022, 18:55
Original comment available on version: ru

Please join the conversation. If you have something to say - please write a comment. You will need a mobile phone and an SMS code for identification to enter. Log in and comment