DELETE · Safety ChecksDelete API
Delete records securely. With built-in safety checks to prevent accidental deletion of dependent data.
DELETE /xpanel/xoport/Delete/JSON/{entity}/{id}
Attention—Starting with version 2.70.0, the method is enforced: The endpoints at Delete/JSON/ accept only the HTTP method DELETE. The interface answers any other method with 405 METHOD_NOT_ALLOWED and the header field Allow: DELETE—before anything else happens. Please check your integration: Previously, the method was not checked here; a call using GET deleted as well. If your program uses GET or POST, please switch it to DELETE.
| Endpoint | Description | Scope | Safety Checks |
|---|
DELETE /Delete/JSON/product/{id} | Delete Product | products:delete | - |
DELETE /Delete/JSON/categories/{id} | Delete Category | categories:delete | Subcategories, Products |
DELETE /Delete/JSON/customer/{id} | Delete customer | customers:delete | Orders |
DELETE /Delete/JSON/manufacturer/{id} | Delete manufacturer | manufacturers:delete | Products |
DELETE /Delete/JSON/supplier/{id} | Delete supplier | suppliers:delete | Products |
DELETE /Delete/JSON/customer_group/{id} | Delete customer group | customer_groups:delete | Group 0 protected (403 PROTECTED_GROUP), assigned customers (409 HAS_CUSTOMERS) |
DELETE /Delete/JSON/newsdesk/{id} | Delete News Article | news:delete | - |
DELETE /Delete/JSON/newsdeskcat/{id} | Delete a news category | newscategories:delete | Subcategories, Articles |
DELETE /Delete/JSON/faq/{id} | Delete FAQ | faq:delete | - |
DELETE /Delete/JSON/faqcat/{id} | Delete FAQ Category | faqcategories:delete | Subcategories, FAQ Entries |
DELETE /Delete/JSON/cms/{id} | Delete CMS Page | cms:delete | System pages with IDs 1 through 999 (409 PROTECTED_SYSTEM_PAGE), locked pages (409 CONTENT_LOCKED) |
DELETE /Delete/JSON/seohistory/{id} | Delete SEO History | seohistory:delete | Bulk Delete, Filter, Expired |
DELETE /Delete/JSON/newsletter_subscriber/{id} | Delete Newsletter Subscriber | newsletter:delete | GDPR Cascade, Provider Sync, Bulk Delete |
DELETE /Delete/JSON/newsletter/{id} | Delete newsletter campaign | newsletters:delete | Locked Check, Sent Check (409) |
DELETE /Delete/JSON/contract/{id} | Delete Contract | contracts:delete | Batch via JSON body {"data": [{"contracts_id": …}]}; ⚠️ no lock for linked or open invoices (see Safety Checks) |
DELETE /Delete/JSON/ticket/{id} | Delete Ticket NEW | tickets:delete | Cascade: History, Admins, Followers, Appointments, Files |
DELETE /Delete/JSON/media/{id} | Delete Image NEW v2.16.0 | media:delete | Batch via ?entity_id= (all images of a product) or JSON body {"ids": […]}; if it was the main image, the product’s image field is cleared |
DELETE /Delete/JSON/slider/{id} | Delete Slider NEW v2.22.0 | slider:delete | - |
DELETE /Delete/JSON/project/{id} | Delete xoCRM Project NEW v2.35.0 | projects:delete | Cascade: Tasks, Descriptions, Managers, Customers, Categories, Status History; Orders/Tickets are only decoupled |
DELETE /Delete/JSON/project_task/{id} | Delete Project Task NEW v2.35.0 | project_tasks:delete | Cascade: Descriptions, Assignees, Customers, Categories, Status History (project remains) |
DELETE /Delete/JSON/appointment/{id} | Delete Appointment (Soft Delete) NEW v2.44.0 | appointments:delete | Sets deleted_at (CalDAV tombstone); descriptions and links are preserved |
DELETE /Delete/JSON/order_status_history/{id} | Delete an order history entry NEW v2.95.0 | orders:write | Order status is updated; oldest entry is protected (409) |
DELETE /Delete/JSON/ticket_status_history/{id} | Delete a ticket history entry NEW v2.95.0 | tickets:delete | Ticket status is updated |
DELETE /Delete/JSON/ticket_attachment/{tshid}?filename=… | Remove a ticket attachment NEW v2.97.0 | tickets:delete | File only if no other entry refers to it |
DELETE /Delete/JSON/ticket_department/{id} | Delete ticket department NEW v2.103.0 | tickets:delete | In use: 409 – ?reassign_to={id} or ?force=1 |
The ID goes in the path (/{entity}/{id}). Without it, for example with ?products_id=42, the shop responds with HTTP 400 MISSING_ID and deletes nothing; it silently ignores unknown query parameters in this case. Without an ID in the path, only media, SEO History, newsletter subscribers and contracts are deleted, via filters or a JSON body. Without either, the response is HTTP 400 (NO_TARGETS, MISSING_FILTER, or MISSING_DATA).
Send the ID as an integer without extra characters, decimal places or a sign. The strict validation of the path segment that the export has had since v2.122.12 (see Export API) does not apply to delete.
Categories
HAS_SUBCATEGORIES: Has subcategoriesHAS_PRODUCTS: Contains products
News Categories
HAS_SUBCATEGORIES: Has subcategoriesHAS_NEWS: Contains news articles
Contracts without a lock: DELETE /Delete/JSON/contract/{id} and the batch via JSON body delete a contract even if invoices are linked to it or still open, just like deleting in the backend. The orders themselves remain; only the link to the contract is removed. A direct debit via SEPA mandate then no longer reaches these invoices. Check the invoices before deleting: the linked ones are in
orders[] of
GET /Export/JSON/contract/{id}, each with its order status
orders_status. Whether a status counts as paid is shown by
is_paid in
GET /Export/JSON/order_statuses (
Orders, section “Order Status Master Data”); the order itself is returned by
GET /Export/JSON/order/{orders_id}.
| Endpoint | Parameter and rule |
|---|
| Every Delete endpoint | language a single value (list rule only; no Delete endpoint reads the language) |
DELETE /media(s) | entity_id integer |
DELETE /seohistory(s) | type c, s, m, p, n or o · base_id integer · expired switch 0/1 · seo_string Since v2.122.11 not applied: HTTP 400, nothing deleted |
DELETE /ticket_attachment/{id} | filename file name without path; if it is missing, HTTP 400 MISSING_FILENAME, with a path HTTP 400 INVALID_FILENAME |
DELETE /ticket_department/{id} | reassign_to integer from 0 (the department the tickets move to) · force 1/true/yes or 0/false/no, case-insensitive |
- An empty value or whitespace only means “not set”. Leading or trailing whitespace has not counted since v2.122.12: deletion uses the validated value. In shops before 4.9.173, send values without leading or trailing whitespace and omit empty parameters. Valid values without leading or trailing whitespace work as before.
- The Delete endpoint silently ignores unknown parameter names, unlike the export.
- Since v2.122.11 The address filter
seo_string only takes effect on GET. You find the entries for an old address with GET /Export/JSON/seohistorys?seo_string=… and delete them via their sh_id: DELETE /Delete/JSON/seohistory/{sh_id} or with the body {"type": "seohistory", "data": [{"sh_id": …}]}. Up to v2.122.10, the name was ignored and deletion was based on type and base_id alone, so ?type=p deleted every product entry.
DELETE /Delete/JSON/seohistorys?type=p&base_id=abc
HTTP 400
{
"success": false,
"api_version": "2.122.12",
"error": {
"code": "INVALID_FILTER_VALUE",
"message": "One or more query parameter values could not be used. Nothing was deleted — see \"details\"."
},
"details": [
{ "param": "base_id", "message": "Value \"abc\" is not an integer." }
]
}
Changed in v2.122.10: Up to v2.122.9, each Delete endpoint read its parameters itself, and an unusable value silently affected what was deleted: DELETE /seohistorys?type=p&base_id[]=42 (as well as base_id=abc) deleted all entries of type p, ?type=p&expired=yes deleted all of them instead of the expired ones; DELETE /ticket_department/{id}?reassign_to[]=5 moved the tickets to department 1, ?reassign_to=5abc to department 5. Now HTTP 400, and nothing is deleted.
Changed in v2.122.12: Up to v2.122.11, the shop validated the values without leading or trailing whitespace, but the delete endpoint then read the untrimmed value. Now it deletes based on the validated value. ⚠️ It never deletes more than the validated values say, but it does delete more than before: requests that were rejected up to v2.122.11 for lack of an effective condition now delete (rows with ⚠️).
| Request | up to v2.122.11 | from v2.122.12 |
|---|
DELETE /seohistorys?type=p&base_id=42%00 | deleted every entry of type p | only the entries of product 42 |
DELETE /seohistorys?type=%20p&base_id=42 | deleted the entries of every type for ID 42 | only those of type p for ID 42 |
DELETE /seohistorys?type=p&expired=1%00 | the condition was dropped: deleted every entry of type p | only the expired ones of type p |
⚠️ DELETE /seohistorys?type=%20p without a further filter | HTTP 400 MISSING_FILTER, nothing deleted | deletes all entries of type p |
⚠️ DELETE /seohistorys?base_id=42%00 or ?expired=1%00 alone | HTTP 400 MISSING_FILTER, nothing deleted | deletes all entries of ID 42 or all expired ones |
⚠️ DELETE /medias?entity_id=7%00 | HTTP 400 NO_TARGETS or only the IDs from the body | additionally all images of product 7: entity_id selects targets, it does not restrict |
⚠️ DELETE /ticket_department/{id}?reassign_to=%005 | HTTP 409 DEPARTMENT_IN_USE, no reassignment | tickets moved to department 5, department deleted |
DELETE /ticket_department/{id}?force=%20true | as without force | force applies |
Before the update, check whether your integration sends values with leading or trailing spaces, line breaks, or %00, e.g. from an imported file: such values now count as they read without these characters.
Deletion Successful
{
"success": true,
"api_version": "2.122.12",
"type": "newsdesk",
"deleted_id": 23,
"details": {
"newsdesk_id": 23,
"newsdesk_article_name": "Gelöschter Artikel"
},
"timestamp": "2026-10-18 14:00:00"
}
Deletion blocked
{
"success": false,
"api_version": "2.122.12",
"error": {
"code": "HAS_SUBCATEGORIES",
"message": "Cannot delete newsdesk category \"Shopnews\" (ID: 1): Has 3 sub-categories. Delete them first."
}
}
Be careful when deleting!
Delete operations are irreversible. First, create an export as a backup.
Create an export