example-data.com

invoices / #118

fromUserId
21
toUserId
249
invoiceNumber
INV-2024-0118
status
cancelled
issuedAt
dueAt
paidAt
subtotal
43050.44
tax
8610.09
total
51660.53
currency
EUR
lineItems
[
  {
    "description": "Marketing services",
    "quantity": 1,
    "unitPrice": 232.94,
    "lineTotal": 232.94
  },
  {
    "description": "Content writing",
    "quantity": 24,
    "unitPrice": 445.99,
    "lineTotal": 10703.76
  },
  {
    "description": "Software development",
    "quantity": 34,
    "unitPrice": 405.77,
    "lineTotal": 13796.18
  },
  {
    "description": "Quality assurance",
    "quantity": 7,
    "unitPrice": 408.74,
    "lineTotal": 2861.18
  },
  {
    "description": "Training session",
    "quantity": 37,
    "unitPrice": 417.74,
    "lineTotal": 15456.38
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/118"
)
invoice = res.json()
{
  "id": 118,
  "fromUserId": 21,
  "toUserId": 249,
  "invoiceNumber": "INV-2024-0118",
  "status": "cancelled",
  "issuedAt": "2024-10-10T03:32:07.033Z",
  "dueAt": "2024-11-26T03:32:07.033Z",
  "paidAt": null,
  "subtotal": 43050.44,
  "tax": 8610.09,
  "total": 51660.53,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Marketing services",
      "quantity": 1,
      "unitPrice": 232.94,
      "lineTotal": 232.94
    },
    {
      "description": "Content writing",
      "quantity": 24,
      "unitPrice": 445.99,
      "lineTotal": 10703.76
    },
    {
      "description": "Software development",
      "quantity": 34,
      "unitPrice": 405.77,
      "lineTotal": 13796.18
    },
    {
      "description": "Quality assurance",
      "quantity": 7,
      "unitPrice": 408.74,
      "lineTotal": 2861.18
    },
    {
      "description": "Training session",
      "quantity": 37,
      "unitPrice": 417.74,
      "lineTotal": 15456.38
    }
  ],
  "createdAt": "2024-10-09T10:18:19.306Z"
}
Draftbit