example-data.com

invoices / #22

fromUserId
105
toUserId
61
invoiceNumber
INV-2024-0022
status
paid
issuedAt
dueAt
paidAt
subtotal
15747.76
tax
1259.82
total
17007.58
currency
USD
lineItems
[
  {
    "description": "License fee",
    "quantity": 7,
    "unitPrice": 498.15,
    "lineTotal": 3487.05
  },
  {
    "description": "Technical support",
    "quantity": 1,
    "unitPrice": 211.89,
    "lineTotal": 211.89
  },
  {
    "description": "Photography services",
    "quantity": 39,
    "unitPrice": 68.78,
    "lineTotal": 2682.42
  },
  {
    "description": "Hardware supply",
    "quantity": 14,
    "unitPrice": 474.11,
    "lineTotal": 6637.54
  },
  {
    "description": "System integration",
    "quantity": 6,
    "unitPrice": 454.81,
    "lineTotal": 2728.86
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/22"
)
invoice = res.json()
{
  "id": 22,
  "fromUserId": 105,
  "toUserId": 61,
  "invoiceNumber": "INV-2024-0022",
  "status": "paid",
  "issuedAt": "2024-11-18T21:43:20.640Z",
  "dueAt": "2024-12-07T21:43:20.640Z",
  "paidAt": "2024-11-21T19:13:58.082Z",
  "subtotal": 15747.76,
  "tax": 1259.82,
  "total": 17007.58,
  "currency": "USD",
  "lineItems": [
    {
      "description": "License fee",
      "quantity": 7,
      "unitPrice": 498.15,
      "lineTotal": 3487.05
    },
    {
      "description": "Technical support",
      "quantity": 1,
      "unitPrice": 211.89,
      "lineTotal": 211.89
    },
    {
      "description": "Photography services",
      "quantity": 39,
      "unitPrice": 68.78,
      "lineTotal": 2682.42
    },
    {
      "description": "Hardware supply",
      "quantity": 14,
      "unitPrice": 474.11,
      "lineTotal": 6637.54
    },
    {
      "description": "System integration",
      "quantity": 6,
      "unitPrice": 454.81,
      "lineTotal": 2728.86
    }
  ],
  "createdAt": "2024-11-18T07:06:14.597Z"
}
Draftbit