Pular para o conteúdo principal
Routal
API ReferenceTask

Delete a task

Removes a task from a stop.

DELETE
/v2/task/{task_id}

Removes a task from a stop. The stop itself stays. Avoid deleting completed tasks: their scanned barcode and comments are part of the proof of delivery and are needed for traceability.

private_key<token>

Pass your API key as the private_key query string parameter. Generate and rotate keys in Developer Settings of your Routal workspace.

Keys stay server-side. Never ship them to a browser or mobile app.

In: query

Path Parameters

task_id*string

Task ID

Match^[0-9a-f]{24}

Query Parameters

stop_id*string

Stop ID

Match^[0-9a-f]{24}

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/v2/task/string?stop_id=string"
{
  "id": "4f75d991ac359f8c4c79d762",
  "stop_id": "4f75d991ac359f8c4c79d762",
  "label": "Deliver refrigerated parcel 1/2",
  "comments": "Keep cold chain. Weight 12.4 kg.",
  "barcode": "8410076472158",
  "status": "completed",
  "custom_fields": {
    "sku": "SKU-4582",
    "quantity": 2,
    "lot_number": "L-2026-038"
  },
  "created_by": "4f75d991ac359f8c4c79d762",
  "created_at": "2026-09-09T07:20:39.190Z",
  "updated_at": "2026-09-09T07:20:39.190Z",
  "deleted_at": "2026-09-09T07:20:39.190Z"
}
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
Empty
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
{
  "message": "Domain not found",
  "message_id": "highway.domain.error.not_found"
}
Empty
Empty