Skip to main content

removeProduct

Requires permission products:product:delete.

Deletes a product together with its variants and its discount scheme entries. A product with stock on hand is refused; adjust the stock to zero first. Requires permission to delete products.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation RemoveProduct($id: String!) {
removeProduct(id: $id) {
id
name
status
createdAt
basePrice
baseUOMId
baseUOM {
id
code
colorCode
name
pluralName
createdAt
}
}
}

Variables:

{
"id": "string"
}

Response:

{
"data": {
"removeProduct": {
"id": "id",
"name": "string",
"status": "ACTIVE",
"createdAt": "2025-01-15T00:00:00Z",
"basePrice": 0,
"baseUOMId": "id",
"baseUOM": {
"id": "id",
"code": "string",
"colorCode": "string",
"name": "string",
"pluralName": "string",
"createdAt": "2025-01-15T00:00:00Z"
}
}
}
}
removeProduct(
id: String!
): Product!

Arguments​

removeProduct.id ● String! non-null scalar​

The ID of the product.

Type​

Product object​

A product: the master record with its variants, categories, units of measure and stock.