example-data.com

invoices / #46

fromUserId
94
toUserId
161
invoiceNumber
INV-2024-0046
status
overdue
issuedAt
dueAt
paidAt
subtotal
26486.32
tax
3972.95
total
30459.27
currency
EUR
lineItems
[
  {
    "description": "License fee",
    "quantity": 21,
    "unitPrice": 134.15,
    "lineTotal": 2817.15
  },
  {
    "description": "Marketing services",
    "quantity": 11,
    "unitPrice": 469.21,
    "lineTotal": 5161.31
  },
  {
    "description": "Implementation services",
    "quantity": 31,
    "unitPrice": 472.16,
    "lineTotal": 14636.96
  },
  {
    "description": "Maintenance contract",
    "quantity": 18,
    "unitPrice": 215.05,
    "lineTotal": 3870.9
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/46"
)
invoice = res.json()
{
  "id": 46,
  "fromUserId": 94,
  "toUserId": 161,
  "invoiceNumber": "INV-2024-0046",
  "status": "overdue",
  "issuedAt": "2024-07-29T00:14:48.171Z",
  "dueAt": "2024-08-29T00:14:48.171Z",
  "paidAt": null,
  "subtotal": 26486.32,
  "tax": 3972.95,
  "total": 30459.27,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "License fee",
      "quantity": 21,
      "unitPrice": 134.15,
      "lineTotal": 2817.15
    },
    {
      "description": "Marketing services",
      "quantity": 11,
      "unitPrice": 469.21,
      "lineTotal": 5161.31
    },
    {
      "description": "Implementation services",
      "quantity": 31,
      "unitPrice": 472.16,
      "lineTotal": 14636.96
    },
    {
      "description": "Maintenance contract",
      "quantity": 18,
      "unitPrice": 215.05,
      "lineTotal": 3870.9
    }
  ],
  "createdAt": "2024-07-28T14:43:06.772Z"
}
Draftbit