invoices / #230
- fromUserId
- 227
- toUserId
- 216
- invoiceNumber
- INV-2024-0230
- status
- viewed
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 2231.63
- tax
- 0
- total
- 2231.63
- currency
- GBP
- lineItems
-
[ { "description": "Documentation", "quantity": 1, "unitPrice": 25.93, "lineTotal": 25.93 }, { "description": "Accounting services", "quantity": 7, "unitPrice": 315.1, "lineTotal": 2205.7 } ] - createdAt
Component variants
Medium
#230
#230
Small
invoices/230 curl -sS \
"https://example-data.com/api/v1/invoices/230" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/230"
);
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/230"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/230"
)
invoice = res.json() {
"id": 230,
"fromUserId": 227,
"toUserId": 216,
"invoiceNumber": "INV-2024-0230",
"status": "viewed",
"issuedAt": "2024-07-13T15:15:54.614Z",
"dueAt": "2024-08-15T15:15:54.614Z",
"paidAt": null,
"subtotal": 2231.63,
"tax": 0,
"total": 2231.63,
"currency": "GBP",
"lineItems": [
{
"description": "Documentation",
"quantity": 1,
"unitPrice": 25.93,
"lineTotal": 25.93
},
{
"description": "Accounting services",
"quantity": 7,
"unitPrice": 315.1,
"lineTotal": 2205.7
}
],
"createdAt": "2024-07-12T17:55:47.966Z"
}