example-data.com

invoices / #93

fromUserId
249
toUserId
91
invoiceNumber
INV-2024-0093
status
draft
issuedAt
dueAt
paidAt
subtotal
36242.24
tax
7248.45
total
43490.69
currency
CAD
lineItems
[
  {
    "description": "Software development",
    "quantity": 24,
    "unitPrice": 490.07,
    "lineTotal": 11761.68
  },
  {
    "description": "Project management",
    "quantity": 2,
    "unitPrice": 377.37,
    "lineTotal": 754.74
  },
  {
    "description": "License fee",
    "quantity": 31,
    "unitPrice": 475.54,
    "lineTotal": 14741.74
  },
  {
    "description": "Content writing",
    "quantity": 28,
    "unitPrice": 320.86,
    "lineTotal": 8984.08
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/93"
)
invoice = res.json()
{
  "id": 93,
  "fromUserId": 249,
  "toUserId": 91,
  "invoiceNumber": "INV-2024-0093",
  "status": "draft",
  "issuedAt": "2024-08-25T01:47:41.514Z",
  "dueAt": "2024-10-24T01:47:41.514Z",
  "paidAt": null,
  "subtotal": 36242.24,
  "tax": 7248.45,
  "total": 43490.69,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Software development",
      "quantity": 24,
      "unitPrice": 490.07,
      "lineTotal": 11761.68
    },
    {
      "description": "Project management",
      "quantity": 2,
      "unitPrice": 377.37,
      "lineTotal": 754.74
    },
    {
      "description": "License fee",
      "quantity": 31,
      "unitPrice": 475.54,
      "lineTotal": 14741.74
    },
    {
      "description": "Content writing",
      "quantity": 28,
      "unitPrice": 320.86,
      "lineTotal": 8984.08
    }
  ],
  "createdAt": "2024-08-24T05:08:39.757Z"
}
Draftbit