invoices / #122
- fromUserId
- 107
- toUserId
- 170
- invoiceNumber
- INV-2024-0122
- status
- viewed
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 22658.08
- tax
- 1812.65
- total
- 24470.73
- currency
- GBP
- lineItems
-
[ { "description": "Content writing", "quantity": 15, "unitPrice": 90.26, "lineTotal": 1353.9 }, { "description": "Legal review", "quantity": 35, "unitPrice": 251.28, "lineTotal": 8794.8 }, { "description": "Photography services", "quantity": 1, "unitPrice": 211.07, "lineTotal": 211.07 }, { "description": "Documentation", "quantity": 2, "unitPrice": 384.61, "lineTotal": 769.22 }, { "description": "Maintenance contract", "quantity": 23, "unitPrice": 354.49, "lineTotal": 8153.27 }, { "description": "Data analysis", "quantity": 14, "unitPrice": 241.13, "lineTotal": 3375.82 } ] - createdAt
Component variants
Medium
#122
#122
Small
invoices/122 curl -sS \
"https://example-data.com/api/v1/invoices/122" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/122"
);
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/122"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/122"
)
invoice = res.json() {
"id": 122,
"fromUserId": 107,
"toUserId": 170,
"invoiceNumber": "INV-2024-0122",
"status": "viewed",
"issuedAt": "2024-12-21T13:11:09.170Z",
"dueAt": "2025-01-04T13:11:09.170Z",
"paidAt": null,
"subtotal": 22658.08,
"tax": 1812.65,
"total": 24470.73,
"currency": "GBP",
"lineItems": [
{
"description": "Content writing",
"quantity": 15,
"unitPrice": 90.26,
"lineTotal": 1353.9
},
{
"description": "Legal review",
"quantity": 35,
"unitPrice": 251.28,
"lineTotal": 8794.8
},
{
"description": "Photography services",
"quantity": 1,
"unitPrice": 211.07,
"lineTotal": 211.07
},
{
"description": "Documentation",
"quantity": 2,
"unitPrice": 384.61,
"lineTotal": 769.22
},
{
"description": "Maintenance contract",
"quantity": 23,
"unitPrice": 354.49,
"lineTotal": 8153.27
},
{
"description": "Data analysis",
"quantity": 14,
"unitPrice": 241.13,
"lineTotal": 3375.82
}
],
"createdAt": "2024-12-21T04:01:01.685Z"
}