invoices / #158
- fromUserId
- 247
- toUserId
- 248
- invoiceNumber
- INV-2024-0158
- status
- paid
- issuedAt
- dueAt
- paidAt
- subtotal
- 28636.88
- tax
- 2290.95
- total
- 30927.83
- currency
- USD
- lineItems
-
[ { "description": "Maintenance contract", "quantity": 20, "unitPrice": 151.73, "lineTotal": 3034.6 }, { "description": "Hardware supply", "quantity": 31, "unitPrice": 399.59, "lineTotal": 12387.29 }, { "description": "Maintenance contract", "quantity": 39, "unitPrice": 135.01, "lineTotal": 5265.39 }, { "description": "Data analysis", "quantity": 20, "unitPrice": 397.48, "lineTotal": 7949.6 } ] - createdAt
Component variants
Medium
#158
#158
Small
invoices/158 curl -sS \
"https://example-data.com/api/v1/invoices/158" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/158"
);
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/158"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/158"
)
invoice = res.json() {
"id": 158,
"fromUserId": 247,
"toUserId": 248,
"invoiceNumber": "INV-2024-0158",
"status": "paid",
"issuedAt": "2024-11-04T10:19:35.614Z",
"dueAt": "2024-12-15T10:19:35.614Z",
"paidAt": "2024-11-21T11:02:22.082Z",
"subtotal": 28636.88,
"tax": 2290.95,
"total": 30927.83,
"currency": "USD",
"lineItems": [
{
"description": "Maintenance contract",
"quantity": 20,
"unitPrice": 151.73,
"lineTotal": 3034.6
},
{
"description": "Hardware supply",
"quantity": 31,
"unitPrice": 399.59,
"lineTotal": 12387.29
},
{
"description": "Maintenance contract",
"quantity": 39,
"unitPrice": 135.01,
"lineTotal": 5265.39
},
{
"description": "Data analysis",
"quantity": 20,
"unitPrice": 397.48,
"lineTotal": 7949.6
}
],
"createdAt": "2024-11-04T10:07:15.096Z"
}