Delete Orders
delete_ordersPermanently deletes one or more orders of the current company. This cannot be undone, and the assigned driver is notified. Before calling it, tell the user exactly which orders (order number and orderId) will be deleted and get their confirmation. Never delete orders the user did not clearly ask for. Find the orderId with get_current_active_orders, get_current_scheduled_orders or get_order_by_id. Orders that are delivered or completed, picked up, or out for delivery, and orders assigned to a third party, cannot be deleted. A call can partly succeed. The result has three lists: deletedOrders (deleted), notFoundOrders (no such order in this company) and notDeletedOrders (the order exists but may not be deleted). Report each list to the user, and do not retry orders in notDeletedOrders. At most 50 orders per call. If the call says it could not confirm whether the orders were deleted, check the current orders to see which still exist before trying again.Always take confirmation from the user before deleting.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"orderIds": "<orderIds>"
},
"name": "delete_orders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderIds | Yes | The orderId of each order to delete | |
| deleteRemarks | No | Optional reason for the deletion, saved with the deleted order |