invoices / #17
- fromUserId
- 61
- toUserId
- 176
- invoiceNumber
- INV-2024-0017
- status
- sent
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 7983.76
- tax
- 1197.56
- total
- 9181.32
- currency
- GBP
- lineItems
-
[ { "description": "Data analysis", "quantity": 16, "unitPrice": 46.69, "lineTotal": 747.04 }, { "description": "Marketing services", "quantity": 36, "unitPrice": 201.02, "lineTotal": 7236.72 } ] - createdAt
Component variants
Medium
#17
#17
Small
invoices/17 curl -sS \
"https://example-data.com/api/v1/invoices/17" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/17"
);
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/17"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/17"
)
invoice = res.json() {
"id": 17,
"fromUserId": 61,
"toUserId": 176,
"invoiceNumber": "INV-2024-0017",
"status": "sent",
"issuedAt": "2024-10-20T09:57:25.451Z",
"dueAt": "2024-10-31T09:57:25.451Z",
"paidAt": null,
"subtotal": 7983.76,
"tax": 1197.56,
"total": 9181.32,
"currency": "GBP",
"lineItems": [
{
"description": "Data analysis",
"quantity": 16,
"unitPrice": 46.69,
"lineTotal": 747.04
},
{
"description": "Marketing services",
"quantity": 36,
"unitPrice": 201.02,
"lineTotal": 7236.72
}
],
"createdAt": "2024-10-19T11:00:41.231Z"
}