example-data.com

invoices / #181

fromUserId
249
toUserId
189
invoiceNumber
INV-2025-0181
status
paid
issuedAt
dueAt
paidAt
subtotal
35490.96
tax
1774.55
total
37265.51
currency
EUR
lineItems
[
  {
    "description": "Photography services",
    "quantity": 33,
    "unitPrice": 261.37,
    "lineTotal": 8625.21
  },
  {
    "description": "Content writing",
    "quantity": 33,
    "unitPrice": 309.23,
    "lineTotal": 10204.59
  },
  {
    "description": "Design work",
    "quantity": 24,
    "unitPrice": 151.16,
    "lineTotal": 3627.84
  },
  {
    "description": "Design work",
    "quantity": 27,
    "unitPrice": 461.3,
    "lineTotal": 12455.1
  },
  {
    "description": "Content writing",
    "quantity": 2,
    "unitPrice": 289.11,
    "lineTotal": 578.22
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/181"
)
invoice = res.json()
{
  "id": 181,
  "fromUserId": 249,
  "toUserId": 189,
  "invoiceNumber": "INV-2025-0181",
  "status": "paid",
  "issuedAt": "2025-03-03T02:15:39.983Z",
  "dueAt": "2025-03-25T02:15:39.983Z",
  "paidAt": "2025-03-07T23:55:04.697Z",
  "subtotal": 35490.96,
  "tax": 1774.55,
  "total": 37265.51,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Photography services",
      "quantity": 33,
      "unitPrice": 261.37,
      "lineTotal": 8625.21
    },
    {
      "description": "Content writing",
      "quantity": 33,
      "unitPrice": 309.23,
      "lineTotal": 10204.59
    },
    {
      "description": "Design work",
      "quantity": 24,
      "unitPrice": 151.16,
      "lineTotal": 3627.84
    },
    {
      "description": "Design work",
      "quantity": 27,
      "unitPrice": 461.3,
      "lineTotal": 12455.1
    },
    {
      "description": "Content writing",
      "quantity": 2,
      "unitPrice": 289.11,
      "lineTotal": 578.22
    }
  ],
  "createdAt": "2025-03-02T19:16:51.726Z"
}
Draftbit