example-data.com

invoices / #73

fromUserId
207
toUserId
188
invoiceNumber
INV-2024-0073
status
cancelled
issuedAt
dueAt
paidAt
subtotal
14587.62
tax
1167.01
total
15754.63
currency
GBP
lineItems
[
  {
    "description": "Content writing",
    "quantity": 34,
    "unitPrice": 247.43,
    "lineTotal": 8412.62
  },
  {
    "description": "Content writing",
    "quantity": 38,
    "unitPrice": 162.5,
    "lineTotal": 6175
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/73"
)
invoice = res.json()
{
  "id": 73,
  "fromUserId": 207,
  "toUserId": 188,
  "invoiceNumber": "INV-2024-0073",
  "status": "cancelled",
  "issuedAt": "2024-11-10T23:16:21.171Z",
  "dueAt": "2024-12-23T23:16:21.171Z",
  "paidAt": null,
  "subtotal": 14587.62,
  "tax": 1167.01,
  "total": 15754.63,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Content writing",
      "quantity": 34,
      "unitPrice": 247.43,
      "lineTotal": 8412.62
    },
    {
      "description": "Content writing",
      "quantity": 38,
      "unitPrice": 162.5,
      "lineTotal": 6175
    }
  ],
  "createdAt": "2024-11-10T08:03:09.841Z"
}
Draftbit