Delete products from Connect

Use the deleteProducts mutation to delete one or more products from the product catalog in Connect.

🚧

Important

This operation is permanent and irreversible. All data associated with the products will be cleared.

Typical usage:

  • Remove discontinued products from your catalog
  • Clean up test or duplicate product entries

Running the mutation

If you haven't used our API before, see Using the Connect API for instructions. It explains how to authenticate your calls and suggests some tools for testing.

Basic mutation structure

mutation {
  deleteProducts(productIds: ["SAX-004", "TRP-019", "FLT-007"]) {
    deletedCount
  }
}
{
  "data": {
    "deleteProducts": {
      "deletedCount": 3
    }
  }
}

Mutation arguments

  • productIds (required): Array of strings - The IDs of products to delete

Mutation fields

  • deletedCount (required): Integer - The number of products deleted from the product catalog

Response structure

The mutation returns a JSON response with this structure:

  • data: Object - Root response object
    • deleteProducts: Object - Contains all fields from the mutation