Skip to content
Get started

Delete Products

products.delete_products(ProductDeleteProductsParams**kwargs) -> ProductDeleteProductsResponse
DELETE/api/v2/public/products

Deletes products from the catalogue. If any product number cannot be deleted the call returns 404 and nothing is deleted, so check the list before sending.

ParametersExpand Collapse
product_number: Optional[Sequence[str]]

The product numbers to target.

ReturnsExpand Collapse
class ProductDeleteProductsResponse: …

Standard success response returned by mutation endpoints.

success: bool

Indicates whether the operation completed successfully.

data: Optional[str]

Optional data payload returned by the operation.

message: Optional[str]

Human-readable message describing the result.

Delete Products

import os
from colleqtive_sdk import Colleqtive

client = Colleqtive(
    bearer_token=os.environ.get("COLLEQTIVE_BEARER_TOKEN"),  # This is the default and can be omitted
)
response = client.products.delete_products()
print(response.success)
{
  "success": true,
  "data": "data",
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}
Returns Examples
{
  "success": true,
  "data": "data",
  "message": "message"
}
{
  "code": 401,
  "status": "error",
  "message": "Authentication failed.",
  "error": "unauthorized",
  "error_description": "Authentication failed."
}
{
  "code": 500,
  "status": "fail",
  "message": "The request could not be processed.",
  "error": "internal_error",
  "error_description": "The request could not be processed."
}