example-data.com

invoices / #37

fromUserId
136
toUserId
143
invoiceNumber
INV-2025-0037
status
sent
issuedAt
dueAt
paidAt
subtotal
18159.36
tax
0
total
18159.36
currency
USD
lineItems
[
  {
    "description": "Software development",
    "quantity": 20,
    "unitPrice": 441.28,
    "lineTotal": 8825.6
  },
  {
    "description": "System integration",
    "quantity": 13,
    "unitPrice": 269.92,
    "lineTotal": 3508.96
  },
  {
    "description": "Design work",
    "quantity": 18,
    "unitPrice": 323.6,
    "lineTotal": 5824.8
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/37"
)
invoice = res.json()
{
  "id": 37,
  "fromUserId": 136,
  "toUserId": 143,
  "invoiceNumber": "INV-2025-0037",
  "status": "sent",
  "issuedAt": "2025-04-11T20:50:03.912Z",
  "dueAt": "2025-05-14T20:50:03.912Z",
  "paidAt": null,
  "subtotal": 18159.36,
  "tax": 0,
  "total": 18159.36,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Software development",
      "quantity": 20,
      "unitPrice": 441.28,
      "lineTotal": 8825.6
    },
    {
      "description": "System integration",
      "quantity": 13,
      "unitPrice": 269.92,
      "lineTotal": 3508.96
    },
    {
      "description": "Design work",
      "quantity": 18,
      "unitPrice": 323.6,
      "lineTotal": 5824.8
    }
  ],
  "createdAt": "2025-04-11T15:21:08.409Z"
}
Draftbit