example-data.com

invoices / #3

fromUserId
138
toUserId
177
invoiceNumber
INV-2025-0003
status
paid
issuedAt
dueAt
paidAt
subtotal
10988.02
tax
2197.6
total
13185.62
currency
USD
lineItems
[
  {
    "description": "License fee",
    "quantity": 15,
    "unitPrice": 168.61,
    "lineTotal": 2529.15
  },
  {
    "description": "Research services",
    "quantity": 9,
    "unitPrice": 486.93,
    "lineTotal": 4382.37
  },
  {
    "description": "Data analysis",
    "quantity": 10,
    "unitPrice": 407.65,
    "lineTotal": 4076.5
  }
]
createdAt

Component variants

curl -sS \
  "https://example-data.com/api/v1/invoices/3" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/invoices/3"
);
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/3"
);
const invoice = (await res.json()) as Invoice;
import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/3"
)
invoice = res.json()
{
  "id": 3,
  "fromUserId": 138,
  "toUserId": 177,
  "invoiceNumber": "INV-2025-0003",
  "status": "paid",
  "issuedAt": "2025-08-30T00:50:01.989Z",
  "dueAt": "2025-10-02T00:50:01.989Z",
  "paidAt": "2025-09-19T23:55:30.464Z",
  "subtotal": 10988.02,
  "tax": 2197.6,
  "total": 13185.62,
  "currency": "USD",
  "lineItems": [
    {
      "description": "License fee",
      "quantity": 15,
      "unitPrice": 168.61,
      "lineTotal": 2529.15
    },
    {
      "description": "Research services",
      "quantity": 9,
      "unitPrice": 486.93,
      "lineTotal": 4382.37
    },
    {
      "description": "Data analysis",
      "quantity": 10,
      "unitPrice": 407.65,
      "lineTotal": 4076.5
    }
  ],
  "createdAt": "2025-08-29T21:12:21.572Z"
}
Draftbit