example-data.com

invoices / #165

fromUserId
47
toUserId
214
invoiceNumber
INV-2024-0165
status
draft
issuedAt
dueAt
paidAt
subtotal
12221.7
tax
1222.17
total
13443.87
currency
EUR
lineItems
[
  {
    "description": "Data analysis",
    "quantity": 13,
    "unitPrice": 49.11,
    "lineTotal": 638.43
  },
  {
    "description": "Design work",
    "quantity": 20,
    "unitPrice": 99.22,
    "lineTotal": 1984.4
  },
  {
    "description": "Marketing services",
    "quantity": 16,
    "unitPrice": 453.31,
    "lineTotal": 7252.96
  },
  {
    "description": "Software development",
    "quantity": 7,
    "unitPrice": 335.13,
    "lineTotal": 2345.91
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/165"
)
invoice = res.json()
{
  "id": 165,
  "fromUserId": 47,
  "toUserId": 214,
  "invoiceNumber": "INV-2024-0165",
  "status": "draft",
  "issuedAt": "2024-07-13T18:50:25.701Z",
  "dueAt": "2024-08-23T18:50:25.701Z",
  "paidAt": null,
  "subtotal": 12221.7,
  "tax": 1222.17,
  "total": 13443.87,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 13,
      "unitPrice": 49.11,
      "lineTotal": 638.43
    },
    {
      "description": "Design work",
      "quantity": 20,
      "unitPrice": 99.22,
      "lineTotal": 1984.4
    },
    {
      "description": "Marketing services",
      "quantity": 16,
      "unitPrice": 453.31,
      "lineTotal": 7252.96
    },
    {
      "description": "Software development",
      "quantity": 7,
      "unitPrice": 335.13,
      "lineTotal": 2345.91
    }
  ],
  "createdAt": "2024-07-12T19:02:08.650Z"
}
Draftbit