example-data.com
Menu
Browse docs and collections

Overview

invoices / #138

invoices #138

fromUserId
Samson Stroman @samson_stroman
toUserId
Lazaro Herzog @lazaro_herzog
invoiceNumber
INV-2026-0138
status
sent
issuedAt
dueAt
paidAt
subtotal
5706.14
tax
570.61
total
6276.75
currency
GBP
lineItems
              [
  {
    "description": "Design work",
    "quantity": 11,
    "unitPrice": 47.74,
    "lineTotal": 525.14
  },
  {
    "description": "Content writing",
    "quantity": 18,
    "unitPrice": 127.38,
    "lineTotal": 2292.84
  },
  {
    "description": "Training session",
    "quantity": 24,
    "unitPrice": 120.34,
    "lineTotal": 2888.16
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 138,
  "fromUserId": 52,
  "toUserId": 181,
  "invoiceNumber": "INV-2026-0138",
  "status": "sent",
  "issuedAt": "2026-04-29T08:26:08.531Z",
  "dueAt": "2026-05-21T08:26:08.531Z",
  "paidAt": null,
  "subtotal": 5706.14,
  "tax": 570.61,
  "total": 6276.75,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Design work",
      "quantity": 11,
      "unitPrice": 47.74,
      "lineTotal": 525.14
    },
    {
      "description": "Content writing",
      "quantity": 18,
      "unitPrice": 127.38,
      "lineTotal": 2292.84
    },
    {
      "description": "Training session",
      "quantity": 24,
      "unitPrice": 120.34,
      "lineTotal": 2888.16
    }
  ],
  "createdAt": "2026-04-28T12:15:48.738Z"
}