example-data.com

invoices / #146

fromUserId
132
toUserId
20
invoiceNumber
INV-2025-0146
status
paid
issuedAt
dueAt
paidAt
subtotal
3804.04
tax
380.4
total
4184.44
currency
CAD
lineItems
[
  {
    "description": "Data analysis",
    "quantity": 29,
    "unitPrice": 114.62,
    "lineTotal": 3323.98
  },
  {
    "description": "Data analysis",
    "quantity": 2,
    "unitPrice": 240.03,
    "lineTotal": 480.06
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/146"
)
invoice = res.json()
{
  "id": 146,
  "fromUserId": 132,
  "toUserId": 20,
  "invoiceNumber": "INV-2025-0146",
  "status": "paid",
  "issuedAt": "2025-01-16T07:14:17.035Z",
  "dueAt": "2025-02-25T07:14:17.035Z",
  "paidAt": "2025-01-18T08:59:35.187Z",
  "subtotal": 3804.04,
  "tax": 380.4,
  "total": 4184.44,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 29,
      "unitPrice": 114.62,
      "lineTotal": 3323.98
    },
    {
      "description": "Data analysis",
      "quantity": 2,
      "unitPrice": 240.03,
      "lineTotal": 480.06
    }
  ],
  "createdAt": "2025-01-16T03:13:47.072Z"
}
Draftbit