example-data.com

invoices / #127

fromUserId
24
toUserId
23
invoiceNumber
INV-2025-0127
status
paid
issuedAt
dueAt
paidAt
subtotal
15027
tax
1502.7
total
16529.7
currency
CAD
lineItems
[
  {
    "description": "License fee",
    "quantity": 10,
    "unitPrice": 126.75,
    "lineTotal": 1267.5
  },
  {
    "description": "Content writing",
    "quantity": 30,
    "unitPrice": 458.65,
    "lineTotal": 13759.5
  }
]
createdAt

Component variants

curl -sS \
  "https://example-data.com/api/v1/invoices/127" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/invoices/127"
);
const invoice = await res.json();
import type { Invoice } from "https://example-data.com/types/invoices.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/invoices/127"
);
const invoice = (await res.json()) as Invoice;
import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/127"
)
invoice = res.json()
{
  "id": 127,
  "fromUserId": 24,
  "toUserId": 23,
  "invoiceNumber": "INV-2025-0127",
  "status": "paid",
  "issuedAt": "2025-01-01T12:52:27.541Z",
  "dueAt": "2025-02-14T12:52:27.541Z",
  "paidAt": "2025-01-12T18:14:11.725Z",
  "subtotal": 15027,
  "tax": 1502.7,
  "total": 16529.7,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "License fee",
      "quantity": 10,
      "unitPrice": 126.75,
      "lineTotal": 1267.5
    },
    {
      "description": "Content writing",
      "quantity": 30,
      "unitPrice": 458.65,
      "lineTotal": 13759.5
    }
  ],
  "createdAt": "2024-12-31T17:28:46.985Z"
}
Draftbit