example-data.com

invoices / #106

fromUserId
50
toUserId
248
invoiceNumber
INV-2024-0106
status
draft
issuedAt
dueAt
paidAt
subtotal
21222.94
tax
3183.44
total
24406.38
currency
AUD
lineItems
[
  {
    "description": "Implementation services",
    "quantity": 16,
    "unitPrice": 402.28,
    "lineTotal": 6436.48
  },
  {
    "description": "Research services",
    "quantity": 39,
    "unitPrice": 379.14,
    "lineTotal": 14786.46
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/106"
)
invoice = res.json()
{
  "id": 106,
  "fromUserId": 50,
  "toUserId": 248,
  "invoiceNumber": "INV-2024-0106",
  "status": "draft",
  "issuedAt": "2024-10-25T18:19:59.588Z",
  "dueAt": "2024-12-16T18:19:59.588Z",
  "paidAt": null,
  "subtotal": 21222.94,
  "tax": 3183.44,
  "total": 24406.38,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Implementation services",
      "quantity": 16,
      "unitPrice": 402.28,
      "lineTotal": 6436.48
    },
    {
      "description": "Research services",
      "quantity": 39,
      "unitPrice": 379.14,
      "lineTotal": 14786.46
    }
  ],
  "createdAt": "2024-10-25T16:11:56.651Z"
}
Draftbit