example-data.com
Menu
Browse docs and collections

Overview

todos / #2

Fix the client

todoListId
todo-lists/1
title
Fix the client
isDone
true
dueDate
2026-05-26
completedAt
createdAt
updatedAt

Component variants

Related

References

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/todos/2" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/todos/2"
);
const todo = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/todos.d.ts https://example-data.com/types/todos.d.ts
import type { Todo } from "./types/todos";

const res = await fetch(
  "https://example-data.com/api/v1/todos/2"
);
const todo = (await res.json()) as Todo;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/todos/2"
)
todo = res.json()

Response

{
  "id": 2,
  "todoListId": 1,
  "title": "Fix the client",
  "isDone": true,
  "dueDate": "2026-05-26",
  "completedAt": "2026-05-07T14:30:35.953Z",
  "createdAt": "2026-02-14T06:03:20.130Z",
  "updatedAt": "2026-03-04T07:22:38.310Z"
}