example-data.com
Menu
Browse docs and collections

Overview

invoices / #246

invoices #246

fromUserId
Lilla Koss @lilla.koss
toUserId
Ressie Howell-Hodkiewicz @ressie_howell-hodkiewicz35
invoiceNumber
INV-2025-0246
status
draft
issuedAt
dueAt
paidAt
subtotal
7501.74
tax
600.14
total
8101.88
currency
CAD
lineItems
              [
  {
    "description": "License fee",
    "quantity": 12,
    "unitPrice": 390.05,
    "lineTotal": 4680.6
  },
  {
    "description": "Maintenance contract",
    "quantity": 24,
    "unitPrice": 66.37,
    "lineTotal": 1592.88
  },
  {
    "description": "License fee",
    "quantity": 22,
    "unitPrice": 55.83,
    "lineTotal": 1228.26
  }
]
            
createdAt

Component variants

Related

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/invoices/246" \
  -H "Accept: application/json"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices/246"
);
const invoice = await res.json();

TypeScript example

// Download once: mkdir -p types && curl -o types/invoices.d.ts https://example-data.com/types/invoices.d.ts
import type { Invoice } from "./types/invoices";

const res = await fetch(
  "https://example-data.com/api/v1/invoices/246"
);
const invoice = (await res.json()) as Invoice;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/246"
)
invoice = res.json()

Response

{
  "id": 246,
  "fromUserId": 59,
  "toUserId": 214,
  "invoiceNumber": "INV-2025-0246",
  "status": "draft",
  "issuedAt": "2025-05-25T15:26:36.550Z",
  "dueAt": "2025-06-05T15:26:36.550Z",
  "paidAt": null,
  "subtotal": 7501.74,
  "tax": 600.14,
  "total": 8101.88,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "License fee",
      "quantity": 12,
      "unitPrice": 390.05,
      "lineTotal": 4680.6
    },
    {
      "description": "Maintenance contract",
      "quantity": 24,
      "unitPrice": 66.37,
      "lineTotal": 1592.88
    },
    {
      "description": "License fee",
      "quantity": 22,
      "unitPrice": 55.83,
      "lineTotal": 1228.26
    }
  ],
  "createdAt": "2025-05-24T16:06:39.593Z"
}