invoices / #172
- fromUserId
- 177
- toUserId
- 59
- invoiceNumber
- INV-2024-0172
- status
- sent
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 6343.98
- tax
- 317.2
- total
- 6661.18
- currency
- GBP
- lineItems
-
[ { "description": "Hardware supply", "quantity": 21, "unitPrice": 163.08, "lineTotal": 3424.68 }, { "description": "Training session", "quantity": 15, "unitPrice": 194.62, "lineTotal": 2919.3 } ] - createdAt
Component variants
Medium
#172
#172
Small
invoices/172 curl -sS \
"https://example-data.com/api/v1/invoices/172" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/172"
);
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/172"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/172"
)
invoice = res.json() {
"id": 172,
"fromUserId": 177,
"toUserId": 59,
"invoiceNumber": "INV-2024-0172",
"status": "sent",
"issuedAt": "2024-07-21T13:14:41.948Z",
"dueAt": "2024-09-02T13:14:41.948Z",
"paidAt": null,
"subtotal": 6343.98,
"tax": 317.2,
"total": 6661.18,
"currency": "GBP",
"lineItems": [
{
"description": "Hardware supply",
"quantity": 21,
"unitPrice": 163.08,
"lineTotal": 3424.68
},
{
"description": "Training session",
"quantity": 15,
"unitPrice": 194.62,
"lineTotal": 2919.3
}
],
"createdAt": "2024-07-20T15:47:03.972Z"
}