invoices / #24
- fromUserId
- 63
- toUserId
- 75
- invoiceNumber
- INV-2024-0024
- status
- viewed
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 12190.51
- tax
- 1219.05
- total
- 13409.56
- currency
- AUD
- lineItems
-
[ { "description": "License fee", "quantity": 11, "unitPrice": 341.48, "lineTotal": 3756.28 }, { "description": "Content writing", "quantity": 21, "unitPrice": 401.63, "lineTotal": 8434.23 } ] - createdAt
Component variants
Medium
#24
#24
Small
invoices/24 curl -sS \
"https://example-data.com/api/v1/invoices/24" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/24"
);
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/24"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/24"
)
invoice = res.json() {
"id": 24,
"fromUserId": 63,
"toUserId": 75,
"invoiceNumber": "INV-2024-0024",
"status": "viewed",
"issuedAt": "2024-07-07T09:29:33.593Z",
"dueAt": "2024-07-20T09:29:33.593Z",
"paidAt": null,
"subtotal": 12190.51,
"tax": 1219.05,
"total": 13409.56,
"currency": "AUD",
"lineItems": [
{
"description": "License fee",
"quantity": 11,
"unitPrice": 341.48,
"lineTotal": 3756.28
},
{
"description": "Content writing",
"quantity": 21,
"unitPrice": 401.63,
"lineTotal": 8434.23
}
],
"createdAt": "2024-07-06T13:11:27.338Z"
}