invoices / #234
- fromUserId
- 111
- toUserId
- 136
- invoiceNumber
- INV-2024-0234
- status
- viewed
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 25181.65
- tax
- 1259.08
- total
- 26440.73
- currency
- GBP
- lineItems
-
[ { "description": "Training session", "quantity": 24, "unitPrice": 306.79, "lineTotal": 7362.96 }, { "description": "Accounting services", "quantity": 33, "unitPrice": 19.4, "lineTotal": 640.2 }, { "description": "License fee", "quantity": 30, "unitPrice": 365.03, "lineTotal": 10950.9 }, { "description": "System integration", "quantity": 31, "unitPrice": 200.89, "lineTotal": 6227.59 } ] - createdAt
Component variants
Medium
#234
#234
Small
invoices/234 curl -sS \
"https://example-data.com/api/v1/invoices/234" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/234"
);
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/234"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/234"
)
invoice = res.json() {
"id": 234,
"fromUserId": 111,
"toUserId": 136,
"invoiceNumber": "INV-2024-0234",
"status": "viewed",
"issuedAt": "2024-11-16T00:39:42.325Z",
"dueAt": "2024-12-19T00:39:42.325Z",
"paidAt": null,
"subtotal": 25181.65,
"tax": 1259.08,
"total": 26440.73,
"currency": "GBP",
"lineItems": [
{
"description": "Training session",
"quantity": 24,
"unitPrice": 306.79,
"lineTotal": 7362.96
},
{
"description": "Accounting services",
"quantity": 33,
"unitPrice": 19.4,
"lineTotal": 640.2
},
{
"description": "License fee",
"quantity": 30,
"unitPrice": 365.03,
"lineTotal": 10950.9
},
{
"description": "System integration",
"quantity": 31,
"unitPrice": 200.89,
"lineTotal": 6227.59
}
],
"createdAt": "2024-11-15T05:22:34.815Z"
}