example-data.com

invoices / #99

fromUserId
234
toUserId
71
invoiceNumber
INV-2024-0099
status
viewed
issuedAt
dueAt
paidAt
subtotal
34695.22
tax
1734.76
total
36429.98
currency
AUD
lineItems
[
  {
    "description": "Software development",
    "quantity": 23,
    "unitPrice": 345.67,
    "lineTotal": 7950.41
  },
  {
    "description": "Project management",
    "quantity": 37,
    "unitPrice": 480.18,
    "lineTotal": 17766.66
  },
  {
    "description": "Legal review",
    "quantity": 21,
    "unitPrice": 174.55,
    "lineTotal": 3665.55
  },
  {
    "description": "Software development",
    "quantity": 20,
    "unitPrice": 265.63,
    "lineTotal": 5312.6
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/99"
)
invoice = res.json()
{
  "id": 99,
  "fromUserId": 234,
  "toUserId": 71,
  "invoiceNumber": "INV-2024-0099",
  "status": "viewed",
  "issuedAt": "2024-11-07T14:28:21.702Z",
  "dueAt": "2024-12-22T14:28:21.702Z",
  "paidAt": null,
  "subtotal": 34695.22,
  "tax": 1734.76,
  "total": 36429.98,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Software development",
      "quantity": 23,
      "unitPrice": 345.67,
      "lineTotal": 7950.41
    },
    {
      "description": "Project management",
      "quantity": 37,
      "unitPrice": 480.18,
      "lineTotal": 17766.66
    },
    {
      "description": "Legal review",
      "quantity": 21,
      "unitPrice": 174.55,
      "lineTotal": 3665.55
    },
    {
      "description": "Software development",
      "quantity": 20,
      "unitPrice": 265.63,
      "lineTotal": 5312.6
    }
  ],
  "createdAt": "2024-11-07T03:22:11.206Z"
}
Draftbit