Content Removal (DELETE) v2
Permanently delete one or more objects from your Luigi's Box search index using the v2 Content Removal API endpoint.
This endpoint requires HMAC authentication. Refer to the Authentication documentation for details.
Overview
This is the v2 version of the Content Removal API endpoint. This endpoint allows you to permanently delete one or more objects from your Luigi's Box search index. You specify which items to remove by providing their type and identity in the request body.
v2 Enhancements:
- Improved batch processing: Better performance for large deletion batches
- Enhanced validation: More comprehensive validation of deletion requests
- Better error reporting: Detailed feedback on deletion success/failure
This is a permanent operation. Once an object is deleted, it will no longer appear in search results or autocomplete suggestions. This is the correct method for handling products that are sold out and will not be restocked.
https://live.luigisbox.com/v2/content
Request Parameters (v2)
The request body must be a JSON object containing a single root key, objects, which holds an array of simple objects identifying what to delete.
Top-level Request Structure
| Parameter | Type | Required | Description |
|---|---|---|---|
objects |
Array | ✓ | An array of objects to be deleted from the index. |
Object structure (v2)
Each object in the objects array requires only two keys to identify the content for removal.
| Parameter | Type | Required | Description |
|---|---|---|---|
identity |
String | ✓ | The unique identifier of the object you want to delete. |
type |
String | ✓ | The type of the object you want to delete (e.g., item, category, brand). Enhanced type validation in v2. |
Example: Request Body (JSON) v2
{
"objects": [
{
"type": "item",
"identity": "B6B7CD9466295DCFDB62676CAE374289-v2"
},
{
"type": "item",
"identity": "611526210E4585C7C8D5367F2CC42A57-v2"
},
{
"type": "category",
"identity": "legacy-category-123"
}
]
}
Error Handling (v2)
| HTTP Status | Description |
|---|---|
| 400 Bad Request | The request structure is invalid or the JSON is malformed. Enhanced validation messages in v2. |
| 429 Too Many Requests | The API rate limit has been exceeded. Check the Retry-After header and see Throttling docs. |
Example: Error Response v2
{
"ok_count": 2,
"errors_count": 1,
"errors": {
"legacy-category-123": {
"type": "not_found",
"reason": "Identity not in catalog",
"v2_details": {
"suggested_action": "Verify the identity and type are correct",
"last_seen": null
}
}
}
}
v2 Improvements
- Enhanced batch processing: Improved performance when deleting large numbers of objects
- Better validation: More comprehensive checks for object identity and type combinations
- Detailed error reporting: Enhanced error messages with suggested remediation actions
- Audit trail support: Better tracking of deletion operations for compliance purposes
Performance Guidelines (v2)
For optimal deletion performance in v2:
- Batch size: Recommended batch size up to 500 objects (increased from v1)
- Type consistency: Group deletions by type for better performance
- Error handling: Implement proper retry logic for failed deletions
Related Endpoints
- Content Update v2 - Create or replace objects
- Partial Content Update v2 - Update specific fields only
- Update by Query v2 - Bulk updates based on search criteria