example-data.com
Menu
Browse docs and collections

Overview

invoices / #198

invoices #198

fromUserId
Lazaro Rath @lazaro.rath42
toUserId
Lew O'Kon @lew.okon75
invoiceNumber
INV-2026-0198
status
viewed
issuedAt
dueAt
paidAt
subtotal
48160.11
tax
0
total
48160.11
currency
GBP
lineItems
              [
  {
    "description": "System integration",
    "quantity": 21,
    "unitPrice": 373.66,
    "lineTotal": 7846.86
  },
  {
    "description": "Software development",
    "quantity": 37,
    "unitPrice": 439.6,
    "lineTotal": 16265.2
  },
  {
    "description": "Maintenance contract",
    "quantity": 28,
    "unitPrice": 383.95,
    "lineTotal": 10750.6
  },
  {
    "description": "System integration",
    "quantity": 20,
    "unitPrice": 442.76,
    "lineTotal": 8855.2
  },
  {
    "description": "Documentation",
    "quantity": 15,
    "unitPrice": 296.15,
    "lineTotal": 4442.25
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices/198"
);
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/198"
);
const invoice = (await res.json()) as Invoice;

Python example

import requests

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

Response

{
  "id": 198,
  "fromUserId": 102,
  "toUserId": 131,
  "invoiceNumber": "INV-2026-0198",
  "status": "viewed",
  "issuedAt": "2026-04-15T00:30:29.873Z",
  "dueAt": "2026-05-25T00:30:29.873Z",
  "paidAt": null,
  "subtotal": 48160.11,
  "tax": 0,
  "total": 48160.11,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 21,
      "unitPrice": 373.66,
      "lineTotal": 7846.86
    },
    {
      "description": "Software development",
      "quantity": 37,
      "unitPrice": 439.6,
      "lineTotal": 16265.2
    },
    {
      "description": "Maintenance contract",
      "quantity": 28,
      "unitPrice": 383.95,
      "lineTotal": 10750.6
    },
    {
      "description": "System integration",
      "quantity": 20,
      "unitPrice": 442.76,
      "lineTotal": 8855.2
    },
    {
      "description": "Documentation",
      "quantity": 15,
      "unitPrice": 296.15,
      "lineTotal": 4442.25
    }
  ],
  "createdAt": "2026-04-14T17:58:10.975Z"
}