example-data.com
Menu
Browse docs and collections

Overview

invoices / #254

invoices #254

fromUserId
Lemuel Jast @lemuel.jast27
toUserId
Charity Crona @charity.crona12
invoiceNumber
INV-2025-0254
status
paid
issuedAt
dueAt
paidAt
subtotal
2534.45
tax
0
total
2534.45
currency
CAD
lineItems
              [
  {
    "description": "Content writing",
    "quantity": 19,
    "unitPrice": 82.19,
    "lineTotal": 1561.61
  },
  {
    "description": "Documentation",
    "quantity": 12,
    "unitPrice": 81.07,
    "lineTotal": 972.84
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices/254"
);
const invoice = await res.json();

TypeScript example

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

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

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/254"
)
invoice = res.json()

Response

{
  "id": 254,
  "fromUserId": 105,
  "toUserId": 100,
  "invoiceNumber": "INV-2025-0254",
  "status": "paid",
  "issuedAt": "2025-11-11T02:50:08.524Z",
  "dueAt": "2026-01-08T02:50:08.524Z",
  "paidAt": "2025-11-11T22:28:37.068Z",
  "subtotal": 2534.45,
  "tax": 0,
  "total": 2534.45,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Content writing",
      "quantity": 19,
      "unitPrice": 82.19,
      "lineTotal": 1561.61
    },
    {
      "description": "Documentation",
      "quantity": 12,
      "unitPrice": 81.07,
      "lineTotal": 972.84
    }
  ],
  "createdAt": "2025-11-10T12:19:54.717Z"
}