example-data.com
Menu
Browse docs and collections

Overview

invoices / #243

invoices #243

fromUserId
Ismael Ward @ismael_ward
toUserId
Niko Wisozk @niko_wisozk
invoiceNumber
INV-2025-0243
status
paid
issuedAt
dueAt
paidAt
subtotal
15910.77
tax
0
total
15910.77
currency
EUR
lineItems
              [
  {
    "description": "Technical support",
    "quantity": 8,
    "unitPrice": 347.96,
    "lineTotal": 2783.68
  },
  {
    "description": "Project management",
    "quantity": 7,
    "unitPrice": 164.99,
    "lineTotal": 1154.93
  },
  {
    "description": "Training session",
    "quantity": 32,
    "unitPrice": 374.13,
    "lineTotal": 11972.16
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 243,
  "fromUserId": 178,
  "toUserId": 56,
  "invoiceNumber": "INV-2025-0243",
  "status": "paid",
  "issuedAt": "2025-08-05T07:59:25.890Z",
  "dueAt": "2025-09-29T07:59:25.890Z",
  "paidAt": "2025-09-21T23:26:39.359Z",
  "subtotal": 15910.77,
  "tax": 0,
  "total": 15910.77,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Technical support",
      "quantity": 8,
      "unitPrice": 347.96,
      "lineTotal": 2783.68
    },
    {
      "description": "Project management",
      "quantity": 7,
      "unitPrice": 164.99,
      "lineTotal": 1154.93
    },
    {
      "description": "Training session",
      "quantity": 32,
      "unitPrice": 374.13,
      "lineTotal": 11972.16
    }
  ],
  "createdAt": "2025-08-04T21:18:02.225Z"
}