invoices / #221
- fromUserId
- 34
- toUserId
- 128
- invoiceNumber
- INV-2024-0221
- status
- sent
- issuedAt
- dueAt
- paidAt
- —
- subtotal
- 18052.85
- tax
- 2707.93
- total
- 20760.78
- currency
- EUR
- lineItems
-
[ { "description": "License fee", "quantity": 35, "unitPrice": 150.73, "lineTotal": 5275.55 }, { "description": "Maintenance contract", "quantity": 37, "unitPrice": 142.98, "lineTotal": 5290.26 }, { "description": "Implementation services", "quantity": 33, "unitPrice": 226.88, "lineTotal": 7487.04 } ] - createdAt
Component variants
Medium
#221
#221
Small
invoices/221 curl -sS \
"https://example-data.com/api/v1/invoices/221" \
-H "Accept: application/json"const res = await fetch(
"https://example-data.com/api/v1/invoices/221"
);
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/221"
);
const invoice = (await res.json()) as Invoice;import requests
res = requests.get(
"https://example-data.com/api/v1/invoices/221"
)
invoice = res.json() {
"id": 221,
"fromUserId": 34,
"toUserId": 128,
"invoiceNumber": "INV-2024-0221",
"status": "sent",
"issuedAt": "2024-07-28T22:40:29.055Z",
"dueAt": "2024-08-11T22:40:29.055Z",
"paidAt": null,
"subtotal": 18052.85,
"tax": 2707.93,
"total": 20760.78,
"currency": "EUR",
"lineItems": [
{
"description": "License fee",
"quantity": 35,
"unitPrice": 150.73,
"lineTotal": 5275.55
},
{
"description": "Maintenance contract",
"quantity": 37,
"unitPrice": 142.98,
"lineTotal": 5290.26
},
{
"description": "Implementation services",
"quantity": 33,
"unitPrice": 226.88,
"lineTotal": 7487.04
}
],
"createdAt": "2024-07-28T14:54:32.218Z"
}