example-data.com

invoices / #169

fromUserId
11
toUserId
144
invoiceNumber
INV-2024-0169
status
sent
issuedAt
dueAt
paidAt
subtotal
16784.66
tax
1342.77
total
18127.43
currency
EUR
lineItems
[
  {
    "description": "Project management",
    "quantity": 7,
    "unitPrice": 423.26,
    "lineTotal": 2962.82
  },
  {
    "description": "System integration",
    "quantity": 28,
    "unitPrice": 98.53,
    "lineTotal": 2758.84
  },
  {
    "description": "Training session",
    "quantity": 4,
    "unitPrice": 387.29,
    "lineTotal": 1549.16
  },
  {
    "description": "Design work",
    "quantity": 28,
    "unitPrice": 339.78,
    "lineTotal": 9513.84
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/169"
)
invoice = res.json()
{
  "id": 169,
  "fromUserId": 11,
  "toUserId": 144,
  "invoiceNumber": "INV-2024-0169",
  "status": "sent",
  "issuedAt": "2024-07-22T07:16:43.687Z",
  "dueAt": "2024-08-29T07:16:43.687Z",
  "paidAt": null,
  "subtotal": 16784.66,
  "tax": 1342.77,
  "total": 18127.43,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Project management",
      "quantity": 7,
      "unitPrice": 423.26,
      "lineTotal": 2962.82
    },
    {
      "description": "System integration",
      "quantity": 28,
      "unitPrice": 98.53,
      "lineTotal": 2758.84
    },
    {
      "description": "Training session",
      "quantity": 4,
      "unitPrice": 387.29,
      "lineTotal": 1549.16
    },
    {
      "description": "Design work",
      "quantity": 28,
      "unitPrice": 339.78,
      "lineTotal": 9513.84
    }
  ],
  "createdAt": "2024-07-21T20:28:04.186Z"
}
Draftbit