example-data.com
Menu
Browse docs and collections

Overview

budgets / #10

Groceries

userId
Zachariah Herzog @zachariah_herzog42
name
Groceries
categoryId
amount
1049.39
period
quarterly
spent
670.25
currency
AUD
startsAt
2024-11-09
endsAt
2025-02-07
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/budgets/10"
);
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/10"
);
const budget = (await res.json()) as Budget;

Python example

import requests

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

Response

{
  "id": 10,
  "userId": 15,
  "name": "Groceries",
  "categoryId": null,
  "amount": 1049.39,
  "period": "quarterly",
  "spent": 670.25,
  "currency": "AUD",
  "startsAt": "2024-11-09",
  "endsAt": "2025-02-07",
  "createdAt": "2025-09-13T19:21:46.207Z"
}