example-data.com

invoices / #162

fromUserId
146
toUserId
147
invoiceNumber
INV-2024-0162
status
paid
issuedAt
dueAt
paidAt
subtotal
35823.62
tax
3582.36
total
39405.98
currency
USD
lineItems
[
  {
    "description": "Implementation services",
    "quantity": 28,
    "unitPrice": 61.22,
    "lineTotal": 1714.16
  },
  {
    "description": "Implementation services",
    "quantity": 7,
    "unitPrice": 84.64,
    "lineTotal": 592.48
  },
  {
    "description": "Accounting services",
    "quantity": 22,
    "unitPrice": 354.02,
    "lineTotal": 7788.44
  },
  {
    "description": "Technical support",
    "quantity": 12,
    "unitPrice": 71.56,
    "lineTotal": 858.72
  },
  {
    "description": "Marketing services",
    "quantity": 30,
    "unitPrice": 495.49,
    "lineTotal": 14864.7
  },
  {
    "description": "Technical support",
    "quantity": 32,
    "unitPrice": 312.66,
    "lineTotal": 10005.12
  }
]
createdAt

Component variants

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

res = requests.get(
    "https://example-data.com/api/v1/invoices/162"
)
invoice = res.json()
{
  "id": 162,
  "fromUserId": 146,
  "toUserId": 147,
  "invoiceNumber": "INV-2024-0162",
  "status": "paid",
  "issuedAt": "2024-11-19T16:52:45.527Z",
  "dueAt": "2025-01-02T16:52:45.527Z",
  "paidAt": "2024-11-21T06:32:44.745Z",
  "subtotal": 35823.62,
  "tax": 3582.36,
  "total": 39405.98,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Implementation services",
      "quantity": 28,
      "unitPrice": 61.22,
      "lineTotal": 1714.16
    },
    {
      "description": "Implementation services",
      "quantity": 7,
      "unitPrice": 84.64,
      "lineTotal": 592.48
    },
    {
      "description": "Accounting services",
      "quantity": 22,
      "unitPrice": 354.02,
      "lineTotal": 7788.44
    },
    {
      "description": "Technical support",
      "quantity": 12,
      "unitPrice": 71.56,
      "lineTotal": 858.72
    },
    {
      "description": "Marketing services",
      "quantity": 30,
      "unitPrice": 495.49,
      "lineTotal": 14864.7
    },
    {
      "description": "Technical support",
      "quantity": 32,
      "unitPrice": 312.66,
      "lineTotal": 10005.12
    }
  ],
  "createdAt": "2024-11-19T15:28:03.736Z"
}
Draftbit