> 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

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))


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.firmhouse.com/graphql-api/api-reference/mutations/destroy-ordered-product.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
