Delete API: Deleting Records Using DELETE

DELETE · Safety Checks

Delete 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. Any other method will result in the interface responding with ` 405 METHOD_NOT_ALLOWED ` and the header field ` Allow: DELETE `—before anything else happens. Please check your connection: Previously, the method was not checked here; a call using ` GET ` would also have deleted the data. If your program uses ` GET ` or ` POST`, please switch it to ` DELETE `.

Available Endpoints

EndpointDescriptionScopeSafety Checks
DELETE /Delete/JSON/product/{id}Delete Productproducts:delete-
DELETE /Delete/JSON/category/{id}Delete categorycategories:deleteSubcategories, Products
DELETE /Delete/JSON/customer/{id}Delete customercustomers:deleteOrders
DELETE /Delete/JSON/manufacturer/{id}Delete manufacturermanufacturers:deleteProducts
DELETE /Delete/JSON/newsdesk/{id}Delete News Articlenews:delete-
DELETE /Delete/JSON/newsdeskcat/{id}Delete a news categorynewscategories:deleteSubcategories, Articles
DELETE /Delete/JSON/faq/{id}Delete FAQfaq:delete-
DELETE /Delete/JSON/faqcategory/{id}Delete FAQ Categoryfaqcategories:deleteFAQ Entries
DELETE /Delete/JSON/seohistory/{id}Delete SEO Historyseohistory:deleteBulk Delete, Filter, Expired
DELETE /Delete/JSON/newsletter_subscriber/{id}Delete Newsletter Subscriber newsletter:deleteGDPR Cascade, Provider Sync, Bulk Delete
DELETE /Delete/JSON/newsletter/{id}Delete newsletter campaign newsletters:deleteLocked Check, Sent Check (409)
DELETE /Delete/JSON/ticket/{id}Delete Ticket NEWtickets:deleteCascade: History, Admins, Followers, Events, Files
Media NEW v2.16.0DELETE /Delete/JSON/media/{id}media:delete
Slider NEW v2.22.0 DELETE /Delete/JSON/slider/{id} slider:delete
DELETE /Delete/JSON/project/{id}Delete xoCRM Project NEW v2.35.0projects:deleteCascade: Tasks, Descriptions, Managers, Customers, Categories, Status History; Orders/Tickets are only decoupled
DELETE /Delete/JSON/project_task/{id}Delete Project Task NEW v2.35.0project_tasks:deleteCascade: Descriptions, Assignees, Clients, Categories, Status History (project remains)
DELETE /Delete/JSON/appointment/{id}Delete Appointment (Soft Delete) NEW v2.44.0appointments:deleteSets `deleted_at` (CalDAV tombstone); descriptions and links are preserved
DELETE /Delete/JSON/order_status_history/{id}Delete an order history entry NEW v2.95.0orders:writeOrder status is updated; oldest entry is protected (409)
DELETE /Delete/JSON/ticket_status_history/{id}Delete a ticket history entry NEW v2.95.0tickets:deleteTicket status is updated
DELETE /Delete/JSON/ticket_attachment/{tshid}?filename=…Remove a ticket attachment NEW v2.97.0tickets:deleteFile only if no other entry refers to it
DELETE /Delete/JSON/ticket_department/{id}Delete ticket department NEW v2.103.0tickets:deleteUsed: 409 – ?reassign_to={id} or ?force=1

Safety Checks

Certain resources cannot be deleted if dependent data exists:

Categories

  • HAS_SUBCATEGORIES: Has subcategories
  • HAS_PRODUCTS: Contains products

News Categories

  • HAS_SUBCATEGORIES: Has subcategories
  • HAS_ARTICLES: Contains news articles

Customers

  • HAS_ORDERS: Has orders

Response Formats

Deletion Successful

{
  "success": true,
  "deleted_id": 23,
  "details": {
    "newsdesk_id": 23,
    "newsdesk_article_name": "Gelöschter Artikel"
  }
}

Deletion blocked

{
  "success": false,
  "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

Data Import Using the xoPort API

The import endpoints enable efficient data import from external systems. Thanks to intelligent upsert logic, you don’t have to worry about distinguishing between new and existing records.

Best Practices

  • Use batch imports (max. 50 records) for better performance
  • Check the ` errors` array in the response for failed records
  • Implement retry logic for transient errors
  • Validate data on the client side before importing