invoices / #42
- fromUserId
- 224
- toUserId
- 52
- invoiceNumber
- INV-2024-0042
- status
- draft
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 34626.98
- tax
- 6925.4
- total
- 41552.38
- currency
- AUD
- lineItems
-
[ { "description": "Software development", "quantity": 5, "unitPrice": 298.74, "lineTotal": 1493.7 }, { "description": "License fee", "quantity": 28, "unitPrice": 414.76, "lineTotal": 11613.28 }, { "description": "Hardware supply", "quantity": 28, "unitPrice": 476.8, "lineTotal": 13350.4 }, { "description": "Design work", "quantity": 32, "unitPrice": 255.3, "lineTotal": 8169.6 } ] - createdAt
Component variants
Medium
#42
#42
Small
invoices/42 curl -sS \
"https://example-data.com/api/v1/invoices/42" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/42"
);
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/42"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/42"
)
invoice = res.json() {
"id": 42,
"fromUserId": 224,
"toUserId": 52,
"invoiceNumber": "INV-2024-0042",
"status": "draft",
"issuedAt": "2024-06-10T16:59:30.785Z",
"dueAt": "2024-06-19T16:59:30.785Z",
"paidAt": null,
"subtotal": 34626.98,
"tax": 6925.4,
"total": 41552.38,
"currency": "AUD",
"lineItems": [
{
"description": "Software development",
"quantity": 5,
"unitPrice": 298.74,
"lineTotal": 1493.7
},
{
"description": "License fee",
"quantity": 28,
"unitPrice": 414.76,
"lineTotal": 11613.28
},
{
"description": "Hardware supply",
"quantity": 28,
"unitPrice": 476.8,
"lineTotal": 13350.4
},
{
"description": "Design work",
"quantity": 32,
"unitPrice": 255.3,
"lineTotal": 8169.6
}
],
"createdAt": "2024-06-10T13:48:25.277Z"
}