Skip to content

Get Todo

Retrieves a single todo by its ID.

Endpoint

GET /todo-service/v1/todos/{id}

Path Parameters

Parameter Type Required Description
id string Yes Unique identifier of the todo

Request

curl --location '{base_url}/todo-service/v1/todos/td-9f3a1bc2-4e5d-4f6a-8b7c-123456789abc' \
  --header 'Authorization: Bearer JWT_TOKEN'

Response

Success Response

Code: 200 OK

{
  "id": "td-9f3a1bc2-4e5d-4f6a-8b7c-123456789abc",
  "todo_type": "POC_EXPIRY",
  "patient_id": 12345,
  "case_id": null,
  "clinic_id": 1001,
  "organisation_id": 2001,
  "todo_status": "ACTIVE",
  "priority": "HIGH",
  "due_date": "2025-02-15T10:00:00Z",
  "days_until_due": 14,
  "is_overdue": false,
  "threshold_count": null,
  "current_count": null,
  "remaining_count": null,
  "assigned_to_user_id": null,
  "assigned_to_role": "PROVIDER",
  "entity_id": "poc-abc-123",
  "entity_type": "PLAN_OF_CARE",
  "context_data": {
    "plan_of_care_id": "poc-abc-123"
  },
  "actions": [],
  "polling_url": "/todo-service/v1/todos/td-9f3a1bc2-4e5d-4f6a-8b7c-123456789abc/status",
  "created_at": "2025-01-31T08:00:00Z",
  "updated_at": "2025-01-31T08:00:00Z",
  "version": 1,
  "deleted": false,
  "deleted_at": null
}

Response Fields

Field Type Description
id string Unique identifier for the todo
todo_type string Type of todo
patient_id integer Associated patient ID
case_id string Associated case ID, or null
clinic_id integer Clinic ID
organisation_id integer Organisation ID
todo_status string Current status: ACTIVE, COMPLETED, or CANCELLED
priority string Priority: HIGH, MEDIUM, or LOW
due_date string Due date in RFC3339, or null
days_until_due integer Days until due date, or null
is_overdue boolean Whether the todo is past its due date
threshold_count integer Target count, or null
current_count integer Current count, or null
remaining_count integer Computed as threshold_count - current_count, or null
assigned_to_user_id string Assigned user ID, or null
assigned_to_role string Assigned role
entity_id string Associated entity ID, or null
entity_type string Associated entity type, or null
context_data object Arbitrary metadata
actions array Available actions
polling_url string Relative URL for status polling
created_at string Creation timestamp
updated_at string Last update timestamp
version integer Optimistic concurrency version
deleted boolean Whether soft-deleted
deleted_at string Deletion timestamp, or null

Error Response

Code: 404 Not Found

{
  "error": "Todo not found: td-9f3a1bc2-4e5d-4f6a-8b7c-123456789abc"
}