If the Product Deleted from Shiphero And trying to create again same product getting error

Hi Tom,

We found very strange behavior from shiphero, like initially there was few items exist in Shiphero and then someone deleted those because some reason and if we are again trying to create those same Item in shiphero through Grapgh API, we are getting error messages from shiphero and the items are not creating.

Even I tried to create through postman but getting same error messages.

e.g:
{ “errors”: [ { “message”: “Unexpected Error”, “operation”: “product_create”, “field”: “product_create”, “request_id”: “5f51d1ae3e301d793300e72e”, “code”: 22 } ], “data”: { “product_create”: null }
}

Could you please confirm on this why this is happening

Thanks
Mangesh

Hi @Mangesh
Thanks for catching this.
We have an open ticket to fix this behavior, current workarounds for this is to re-create that product using the app, or if you delete the product use the Public API (product_delete Mutation) to be able to re-create it again correctly.
But for in the meantime if the product gets deleted from the app you will need to create it again using the app.
I will let you know once this is fixed.
Thanks in advance!
Tom

Hi Tom, when are you expecting for have this fix?

Hi @veraioele
I apologize I don’t have a better ETA for this, the engineer that is working on our Public API is working on another Public API task right now, but I will try to push for this or get a better timeline.
Thanks again for the patience
Tom

Hello, is it possible to restore all these deleted items?
We can’t use csv upload since API has to reference shiphero product ID.

Hi @veraioele
Once a product gets deleted it won’t be re-created with the same product_id, only the SKU will match.

For example:

  1. Created Product with SKU: TESTSKU123456
    ShipHero Product ID will be 11223344
  2. Deleted the product
  3. Created Product with SKU: TESTSKU123456
    ShipHero Product ID will be 11223345

Let me know if that doesn’t respond to the question
Thanks again!
Tom

ok, what should we do then to continue working with the API? We need to have the products to continue testing. Should we create a brand new Shiphero account for the client now to move forward?

Creating a new account will also bring up this kind of issues if you continue to delete products on the app and then try to re-create them using the Public API, so I don’t think that will help

For re-creating those deleted products you will have to use the app https://app.shiphero.com/dashboard/products --> Add a product while we fix this on the Public API

If you need to test creating products using the Public API you can create new products for SKUs that haven’t been deleted using the app.

On the other hand, if you need to test creating, deleting, and then re-creating products again, then try doing the three actions through the Public API and not the app