example-data.com

invoices / #233

fromUserId
64
toUserId
105
invoiceNumber
INV-2025-0233
status
viewed
issuedAt
dueAt
paidAt
subtotal
6213.18
tax
1242.64
total
7455.82
currency
GBP
lineItems
[
  {
    "description": "Maintenance contract",
    "quantity": 3,
    "unitPrice": 107.26,
    "lineTotal": 321.78
  },
  {
    "description": "Legal review",
    "quantity": 18,
    "unitPrice": 327.3,
    "lineTotal": 5891.4
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/233"
)
invoice = res.json()
{
  "id": 233,
  "fromUserId": 64,
  "toUserId": 105,
  "invoiceNumber": "INV-2025-0233",
  "status": "viewed",
  "issuedAt": "2025-03-22T17:42:41.018Z",
  "dueAt": "2025-04-18T17:42:41.018Z",
  "paidAt": null,
  "subtotal": 6213.18,
  "tax": 1242.64,
  "total": 7455.82,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Maintenance contract",
      "quantity": 3,
      "unitPrice": 107.26,
      "lineTotal": 321.78
    },
    {
      "description": "Legal review",
      "quantity": 18,
      "unitPrice": 327.3,
      "lineTotal": 5891.4
    }
  ],
  "createdAt": "2025-03-21T18:37:27.138Z"
}
Draftbit