example-data.com
Menu
Browse docs and collections

Overview

invoices / #225

invoices #225

fromUserId
Fritz Skiles @fritz_skiles
toUserId
Cruz Okuneva @cruz.okuneva
invoiceNumber
INV-2025-0225
status
sent
issuedAt
dueAt
paidAt
subtotal
15944.35
tax
3188.87
total
19133.22
currency
EUR
lineItems
              [
  {
    "description": "System integration",
    "quantity": 16,
    "unitPrice": 380.96,
    "lineTotal": 6095.36
  },
  {
    "description": "Project management",
    "quantity": 22,
    "unitPrice": 267.91,
    "lineTotal": 5894.02
  },
  {
    "description": "Quality assurance",
    "quantity": 6,
    "unitPrice": 391.12,
    "lineTotal": 2346.72
  },
  {
    "description": "Design work",
    "quantity": 35,
    "unitPrice": 45.95,
    "lineTotal": 1608.25
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 225,
  "fromUserId": 144,
  "toUserId": 239,
  "invoiceNumber": "INV-2025-0225",
  "status": "sent",
  "issuedAt": "2025-12-19T22:04:03.447Z",
  "dueAt": "2026-02-11T22:04:03.447Z",
  "paidAt": null,
  "subtotal": 15944.35,
  "tax": 3188.87,
  "total": 19133.22,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 16,
      "unitPrice": 380.96,
      "lineTotal": 6095.36
    },
    {
      "description": "Project management",
      "quantity": 22,
      "unitPrice": 267.91,
      "lineTotal": 5894.02
    },
    {
      "description": "Quality assurance",
      "quantity": 6,
      "unitPrice": 391.12,
      "lineTotal": 2346.72
    },
    {
      "description": "Design work",
      "quantity": 35,
      "unitPrice": 45.95,
      "lineTotal": 1608.25
    }
  ],
  "createdAt": "2025-12-19T02:29:12.251Z"
}