example-data.com

invoices / #191

fromUserId
125
toUserId
1
invoiceNumber
INV-2024-0191
status
sent
issuedAt
dueAt
paidAt
subtotal
27364.88
tax
2736.49
total
30101.37
currency
CAD
lineItems
[
  {
    "description": "Data analysis",
    "quantity": 34,
    "unitPrice": 411.13,
    "lineTotal": 13978.42
  },
  {
    "description": "Project management",
    "quantity": 33,
    "unitPrice": 393.16,
    "lineTotal": 12974.28
  },
  {
    "description": "Data analysis",
    "quantity": 37,
    "unitPrice": 11.14,
    "lineTotal": 412.18
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/191"
)
invoice = res.json()
{
  "id": 191,
  "fromUserId": 125,
  "toUserId": 1,
  "invoiceNumber": "INV-2024-0191",
  "status": "sent",
  "issuedAt": "2024-07-07T05:33:24.103Z",
  "dueAt": "2024-07-24T05:33:24.103Z",
  "paidAt": null,
  "subtotal": 27364.88,
  "tax": 2736.49,
  "total": 30101.37,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 34,
      "unitPrice": 411.13,
      "lineTotal": 13978.42
    },
    {
      "description": "Project management",
      "quantity": 33,
      "unitPrice": 393.16,
      "lineTotal": 12974.28
    },
    {
      "description": "Data analysis",
      "quantity": 37,
      "unitPrice": 11.14,
      "lineTotal": 412.18
    }
  ],
  "createdAt": "2024-07-06T23:25:11.020Z"
}
Draftbit