example-data.com
Menu
Browse docs and collections

Overview

budgets / #18

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/budgets/18"
);
const budget = await res.json();

TypeScript example

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

const res = await fetch(
  "https://example-data.com/api/v1/budgets/18"
);
const budget = (await res.json()) as Budget;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/budgets/18"
)
budget = res.json()

Response

{
  "id": 18,
  "userId": 23,
  "name": "Electronics",
  "categoryId": 19,
  "amount": 4007.74,
  "period": "monthly",
  "spent": 3133.52,
  "currency": "USD",
  "startsAt": "2024-12-25",
  "endsAt": "2025-01-24",
  "createdAt": "2025-06-17T00:51:57.721Z"
}