example-data.com

invoices / #78

fromUserId
119
toUserId
93
invoiceNumber
INV-2024-0078
status
paid
issuedAt
dueAt
paidAt
subtotal
42184.59
tax
2109.23
total
44293.82
currency
GBP
lineItems
[
  {
    "description": "Content writing",
    "quantity": 23,
    "unitPrice": 445.54,
    "lineTotal": 10247.42
  },
  {
    "description": "Accounting services",
    "quantity": 3,
    "unitPrice": 345.61,
    "lineTotal": 1036.83
  },
  {
    "description": "Project management",
    "quantity": 34,
    "unitPrice": 335.28,
    "lineTotal": 11399.52
  },
  {
    "description": "Photography services",
    "quantity": 32,
    "unitPrice": 376.65,
    "lineTotal": 12052.8
  },
  {
    "description": "Implementation services",
    "quantity": 2,
    "unitPrice": 194.21,
    "lineTotal": 388.42
  },
  {
    "description": "Hardware supply",
    "quantity": 30,
    "unitPrice": 235.32,
    "lineTotal": 7059.6
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/78"
)
invoice = res.json()
{
  "id": 78,
  "fromUserId": 119,
  "toUserId": 93,
  "invoiceNumber": "INV-2024-0078",
  "status": "paid",
  "issuedAt": "2024-05-29T12:05:03.091Z",
  "dueAt": "2024-07-14T12:05:03.091Z",
  "paidAt": "2024-06-19T23:53:15.207Z",
  "subtotal": 42184.59,
  "tax": 2109.23,
  "total": 44293.82,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Content writing",
      "quantity": 23,
      "unitPrice": 445.54,
      "lineTotal": 10247.42
    },
    {
      "description": "Accounting services",
      "quantity": 3,
      "unitPrice": 345.61,
      "lineTotal": 1036.83
    },
    {
      "description": "Project management",
      "quantity": 34,
      "unitPrice": 335.28,
      "lineTotal": 11399.52
    },
    {
      "description": "Photography services",
      "quantity": 32,
      "unitPrice": 376.65,
      "lineTotal": 12052.8
    },
    {
      "description": "Implementation services",
      "quantity": 2,
      "unitPrice": 194.21,
      "lineTotal": 388.42
    },
    {
      "description": "Hardware supply",
      "quantity": 30,
      "unitPrice": 235.32,
      "lineTotal": 7059.6
    }
  ],
  "createdAt": "2024-05-29T04:57:14.417Z"
}
Draftbit