invoices / #153
- fromUserId
- 90
- toUserId
- 150
- invoiceNumber
- INV-2024-0153
- status
- viewed
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 21873.46
- tax
- 0
- total
- 21873.46
- currency
- GBP
- lineItems
-
[ { "description": "Content writing", "quantity": 21, "unitPrice": 365.81, "lineTotal": 7682.01 }, { "description": "Hardware supply", "quantity": 35, "unitPrice": 121.37, "lineTotal": 4247.95 }, { "description": "Accounting services", "quantity": 27, "unitPrice": 157.13, "lineTotal": 4242.51 }, { "description": "Accounting services", "quantity": 13, "unitPrice": 391.75, "lineTotal": 5092.75 }, { "description": "Photography services", "quantity": 2, "unitPrice": 304.12, "lineTotal": 608.24 } ] - createdAt
Component variants
Medium
#153
#153
Small
invoices/153 curl -sS \
"https://example-data.com/api/v1/invoices/153" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/153"
);
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/153"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/153"
)
invoice = res.json() {
"id": 153,
"fromUserId": 90,
"toUserId": 150,
"invoiceNumber": "INV-2024-0153",
"status": "viewed",
"issuedAt": "2024-08-03T20:16:14.796Z",
"dueAt": "2024-09-08T20:16:14.796Z",
"paidAt": null,
"subtotal": 21873.46,
"tax": 0,
"total": 21873.46,
"currency": "GBP",
"lineItems": [
{
"description": "Content writing",
"quantity": 21,
"unitPrice": 365.81,
"lineTotal": 7682.01
},
{
"description": "Hardware supply",
"quantity": 35,
"unitPrice": 121.37,
"lineTotal": 4247.95
},
{
"description": "Accounting services",
"quantity": 27,
"unitPrice": 157.13,
"lineTotal": 4242.51
},
{
"description": "Accounting services",
"quantity": 13,
"unitPrice": 391.75,
"lineTotal": 5092.75
},
{
"description": "Photography services",
"quantity": 2,
"unitPrice": 304.12,
"lineTotal": 608.24
}
],
"createdAt": "2024-08-03T06:30:24.990Z"
}