example-data.com

invoices / #217

fromUserId
226
toUserId
174
invoiceNumber
INV-2024-0217
status
paid
issuedAt
dueAt
paidAt
subtotal
6963.51
tax
1392.7
total
8356.21
currency
AUD
lineItems
[
  {
    "description": "Technical support",
    "quantity": 22,
    "unitPrice": 220.34,
    "lineTotal": 4847.48
  },
  {
    "description": "Technical support",
    "quantity": 37,
    "unitPrice": 57.19,
    "lineTotal": 2116.03
  }
]
createdAt

Component variants

curl -sS \
  "https://example-data.com/api/v1/invoices/217" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/invoices/217"
);
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/217"
);
const invoice = (await res.json()) as Invoice;
import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/217"
)
invoice = res.json()
{
  "id": 217,
  "fromUserId": 226,
  "toUserId": 174,
  "invoiceNumber": "INV-2024-0217",
  "status": "paid",
  "issuedAt": "2024-08-20T14:30:53.468Z",
  "dueAt": "2024-09-05T14:30:53.468Z",
  "paidAt": "2024-08-20T17:05:49.845Z",
  "subtotal": 6963.51,
  "tax": 1392.7,
  "total": 8356.21,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Technical support",
      "quantity": 22,
      "unitPrice": 220.34,
      "lineTotal": 4847.48
    },
    {
      "description": "Technical support",
      "quantity": 37,
      "unitPrice": 57.19,
      "lineTotal": 2116.03
    }
  ],
  "createdAt": "2024-08-20T07:14:18.052Z"
}
Draftbit