example-data.com

invoices / #65

fromUserId
49
toUserId
84
invoiceNumber
INV-2024-0065
status
paid
issuedAt
dueAt
paidAt
subtotal
42031.68
tax
8406.34
total
50438.02
currency
USD
lineItems
[
  {
    "description": "System integration",
    "quantity": 2,
    "unitPrice": 319.23,
    "lineTotal": 638.46
  },
  {
    "description": "Photography services",
    "quantity": 23,
    "unitPrice": 132.18,
    "lineTotal": 3040.14
  },
  {
    "description": "Marketing services",
    "quantity": 40,
    "unitPrice": 413.52,
    "lineTotal": 16540.8
  },
  {
    "description": "Implementation services",
    "quantity": 21,
    "unitPrice": 457.55,
    "lineTotal": 9608.55
  },
  {
    "description": "Project management",
    "quantity": 27,
    "unitPrice": 451.99,
    "lineTotal": 12203.73
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/65"
)
invoice = res.json()
{
  "id": 65,
  "fromUserId": 49,
  "toUserId": 84,
  "invoiceNumber": "INV-2024-0065",
  "status": "paid",
  "issuedAt": "2024-08-21T04:14:13.446Z",
  "dueAt": "2024-10-04T04:14:13.446Z",
  "paidAt": "2024-09-16T22:43:23.903Z",
  "subtotal": 42031.68,
  "tax": 8406.34,
  "total": 50438.02,
  "currency": "USD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 2,
      "unitPrice": 319.23,
      "lineTotal": 638.46
    },
    {
      "description": "Photography services",
      "quantity": 23,
      "unitPrice": 132.18,
      "lineTotal": 3040.14
    },
    {
      "description": "Marketing services",
      "quantity": 40,
      "unitPrice": 413.52,
      "lineTotal": 16540.8
    },
    {
      "description": "Implementation services",
      "quantity": 21,
      "unitPrice": 457.55,
      "lineTotal": 9608.55
    },
    {
      "description": "Project management",
      "quantity": 27,
      "unitPrice": 451.99,
      "lineTotal": 12203.73
    }
  ],
  "createdAt": "2024-08-20T15:32:47.599Z"
}
Draftbit