> For the complete documentation index, see [llms.txt](https://developer.firmhouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.firmhouse.com/graphql-api/api-reference/mutations/destroy-ordered-product.md).

# destroyOrderedProduct

Deletes an ordered product

Deleting the last ordered product can leave the subscription without an active product and may break downstream subscription behavior. For replacement flows, prefer updateOrderedProduct for an in-place product swap; if delete-and-create is required, create or verify the replacement first, then destroy the old line.

### Arguments

| Argument                                                                                                   | Description                          |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| input ([DestroyOrderedProductInput](/graphql-api/api-reference/objects/destroy-ordered-product-input.md)!) | Parameters for DestroyOrderedProduct |

### DestroyOrderedProductInput Arguments

| Argument                                                          | Description                                                                                                                                                                                                                                                                                                                                                                                                  |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id ([ID](/graphql-api/api-reference/objects/id.md))               | ID of the ordered product to delete. Be careful when this is the subscription's last ordered product: deleting it can leave the subscription without an active product and may break downstream subscription behavior. For replacement flows, prefer updateOrderedProduct for an in-place product swap; if delete-and-create is required, create or verify the replacement first, then destroy the old line. |
| shopifyVariantId ([ID](/graphql-api/api-reference/objects/id.md)) | The Shopify variant ID to find the ordered product by                                                                                                                                                                                                                                                                                                                                                        |
| shopifyProductId ([ID](/graphql-api/api-reference/objects/id.md)) | The Shopify product ID to find the ordered product by                                                                                                                                                                                                                                                                                                                                                        |
| subscriptionId ([ID](/graphql-api/api-reference/objects/id.md))   | Required when using shopify\_variant\_id or shopify\_product\_id                                                                                                                                                                                                                                                                                                                                             |

### Return fields

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error.md)!]!)

#### orderedProduct ([OrderedProduct](/graphql-api/api-reference/objects/ordered-product.md))

#### subscription ([Subscription](/graphql-api/api-reference/objects/subscription.md))
