# Issue deleting product

**URL:** <https://community.shiphero.com/t/issue-deleting-product/214>\
**Category:** GraphQL API\
**Created:** [November 4, 2019, 9:57am UTC](https://community.shiphero.com/t/issue-deleting-product/214 "2019-11-04T09:57:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpspw](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@mpspw](https://community.shiphero.com/u/mpspw)\
**Post date:** [November 4, 2019, 9:57am UTC](https://community.shiphero.com/t/issue-deleting-product/214/1 "2019-11-04T09:57:33Z")

</div>

Greetings,  
I was doing some testings and executed a create product mutation through a GraphQL client. Then i wanted to delete said product but for some reason my delete mutations don’t work. I figured that maybe i should delete the warehouse\_product before deleting the product itself but i get an error when trying to delete warehouse\_product too.  
If you could point out if I’m doing something wrong I’d be grateful.

Command:

> ```
> mutation {
> product_delete(
> data: {
> sku: "TESTPRODUCT"
> }
> ) {
> request_id
> complexity
> }
> }
> 
> ```

Result:

> ```
> {
> "errors": [
> {
> "message": "Unexpected Error",
> "operation": "product_delete",
> "field": "product_delete",
> "request_id": "5dbff4e5f6499cc7647bf5e6",
> "code": 22
> }
> ],
> "data": {
> "product_delete": null
> }
> }
> 
> ```

Command:\>

> ```
> mutation {
> warehouse_product_delete(
> data: {
> sku: "TESTPRODUCT",
> warehouse_id: "V2FyZWhvdXNlOjUyMzA="
> }
> ) {
> request_id
> complexity
> }
> }
> 
> ```

Result:

> ```
> {
> "errors": [
> {
> "message": "Unexpected Error",
> "operation": "warehouse_product_delete",
> "field": "warehouse_product_delete",
> "request_id": "5dbff2eb6366730c04c1ddbe",
> "code": 22
> }
> ],
> "data": {
> "warehouse_product_delete": null
> }
> }
> 
> ```

And the product DOES exist because if i try running the mutation i used to create i get a msg that a product with that sku already exists.  
Command:

> ```
> mutation {
> product_create(
> data: {
> name: "TESTPRODUCT"
> sku: "TESTPRODUCT"
> price: "23.00"
> warehouse_products: {
> warehouse_id: "V2FyZWhvdXNlOjUyMzA="
> on_hand: 130
> inventory_bin: "Bin A1"
> reserve_inventory: 0
> replenishment_level: 1
> reorder_level: 1
> reorder_amount: 20
> custom: false
> }
> value: "15.00"
> barcode: "2233443355chair"
> country_of_manufacture: "US"
> dimensions: { weight: "12", height: "25", width: "10", length: "25" }
> value_currency: "USD"
> kit: false
> kit_build: false
> no_air: false
> final_sale: false
> customs_value: "1.00"
> not_owned: true
> dropship: false
> }
> ) {
> request_id
> complexity
> product {
> id
> legacy_id
> account_id
> name
> sku
> price
> value
> barcode
> country_of_manufacture
> dimensions {
> weight
> height
> width
> length
> }
> tariff_code
> value_currency
> kit
> kit_build
> no_air
> final_sale
> customs_value
> customs_description
> not_owned
> dropship
> created_at
> }
> }
> }
> 
> ```

---

<div class="post-metadata">

**Author:** ![seba](https://avatars.discourse-cdn.com/v4/letter/s/50afbb/32.png) [@seba](https://community.shiphero.com/u/seba)\
**Post date:** [November 5, 2019, 1:43pm UTC](https://community.shiphero.com/t/issue-deleting-product/214/2 "2019-11-05T13:43:43Z")

</div>

> [@mpspw](#):
>
> 5dbff2eb6366730c04c1ddbe

@mpspw This should be fixed now, you should be able to delete those products

---

<div class="post-metadata">

**Author:** ![mpspw](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@mpspw](https://community.shiphero.com/u/mpspw)\
**Post date:** [November 6, 2019, 10:11am UTC](https://community.shiphero.com/t/issue-deleting-product/214/3 "2019-11-06T10:11:53Z")

</div>

I managed to delete the products now. Thanks for the fast fix and have a nice day 🙂

---

<div class="post-metadata">

**Author:** ![mpspw](https://avatars.discourse-cdn.com/v4/letter/m/49beb7/32.png) [@mpspw](https://community.shiphero.com/u/mpspw)\
**Post date:** [November 7, 2019, 1:54pm UTC](https://community.shiphero.com/t/issue-deleting-product/214/4 "2019-11-07T13:54:54Z")

</div>

@seba Now i got to the part where i want to update a product but the update command isn’t working. Getting unexpected error just as i was getting with the delete command.

Mutation:

> mutation {  
> product\_update(  
> data: {  
> sku: “TESTPRODUCT”  
> name: “TESTPRODUCT”  
> price: “1.00”  
> value: “3.00”  
> country\_of\_manufacture: “UK”  
> value\_currency: “GBP”  
> }  
> ) {  
> request\_id  
> complexity  
> }  
> }

Error:

> {  
> “errors”: [  
> {  
> “message”: “Unexpected Error”,  
> “operation”: “product\_update”,  
> “field”: “product\_update”,  
> “request\_id”: “5dc4313801089376446f16cc”,  
> “code”: 22  
> }  
> ],  
> “data”: {  
> “product\_update”: null  
> }
