example-data.com

invoices / #63

fromUserId
249
toUserId
196
invoiceNumber
INV-2024-0063
status
paid
issuedAt
dueAt
paidAt
subtotal
39055.98
tax
3124.48
total
42180.46
currency
GBP
lineItems
[
  {
    "description": "Content writing",
    "quantity": 30,
    "unitPrice": 445.51,
    "lineTotal": 13365.3
  },
  {
    "description": "Consulting services",
    "quantity": 33,
    "unitPrice": 492.89,
    "lineTotal": 16265.37
  },
  {
    "description": "Project management",
    "quantity": 31,
    "unitPrice": 223.7,
    "lineTotal": 6934.7
  },
  {
    "description": "Content writing",
    "quantity": 4,
    "unitPrice": 242.08,
    "lineTotal": 968.32
  },
  {
    "description": "Legal review",
    "quantity": 7,
    "unitPrice": 217.47,
    "lineTotal": 1522.29
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/63"
)
invoice = res.json()
{
  "id": 63,
  "fromUserId": 249,
  "toUserId": 196,
  "invoiceNumber": "INV-2024-0063",
  "status": "paid",
  "issuedAt": "2024-08-26T08:49:14.447Z",
  "dueAt": "2024-10-17T08:49:14.447Z",
  "paidAt": "2024-09-27T14:10:10.615Z",
  "subtotal": 39055.98,
  "tax": 3124.48,
  "total": 42180.46,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Content writing",
      "quantity": 30,
      "unitPrice": 445.51,
      "lineTotal": 13365.3
    },
    {
      "description": "Consulting services",
      "quantity": 33,
      "unitPrice": 492.89,
      "lineTotal": 16265.37
    },
    {
      "description": "Project management",
      "quantity": 31,
      "unitPrice": 223.7,
      "lineTotal": 6934.7
    },
    {
      "description": "Content writing",
      "quantity": 4,
      "unitPrice": 242.08,
      "lineTotal": 968.32
    },
    {
      "description": "Legal review",
      "quantity": 7,
      "unitPrice": 217.47,
      "lineTotal": 1522.29
    }
  ],
  "createdAt": "2024-08-26T05:42:36.446Z"
}
Draftbit