example-data.com
Menu
Browse docs and collections

Overview

invoices / #297

invoices #297

fromUserId
Maryam Kunze @maryam_kunze
toUserId
Whitney O'Reilly @whitney.oreilly
invoiceNumber
INV-2026-0297
status
paid
issuedAt
dueAt
paidAt
subtotal
19754.5
tax
987.73
total
20742.23
currency
USD
lineItems
              [
  {
    "description": "System integration",
    "quantity": 2,
    "unitPrice": 460.29,
    "lineTotal": 920.58
  },
  {
    "description": "System integration",
    "quantity": 40,
    "unitPrice": 218.19,
    "lineTotal": 8727.6
  },
  {
    "description": "Research services",
    "quantity": 15,
    "unitPrice": 129.47,
    "lineTotal": 1942.05
  },
  {
    "description": "Accounting services",
    "quantity": 20,
    "unitPrice": 67.1,
    "lineTotal": 1342
  },
  {
    "description": "Project management",
    "quantity": 39,
    "unitPrice": 174.93,
    "lineTotal": 6822.27
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 297,
  "fromUserId": 195,
  "toUserId": 99,
  "invoiceNumber": "INV-2026-0297",
  "status": "paid",
  "issuedAt": "2026-03-13T07:53:26.489Z",
  "dueAt": "2026-03-21T07:53:26.489Z",
  "paidAt": "2026-03-17T20:43:44.160Z",
  "subtotal": 19754.5,
  "tax": 987.73,
  "total": 20742.23,
  "currency": "USD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 2,
      "unitPrice": 460.29,
      "lineTotal": 920.58
    },
    {
      "description": "System integration",
      "quantity": 40,
      "unitPrice": 218.19,
      "lineTotal": 8727.6
    },
    {
      "description": "Research services",
      "quantity": 15,
      "unitPrice": 129.47,
      "lineTotal": 1942.05
    },
    {
      "description": "Accounting services",
      "quantity": 20,
      "unitPrice": 67.1,
      "lineTotal": 1342
    },
    {
      "description": "Project management",
      "quantity": 39,
      "unitPrice": 174.93,
      "lineTotal": 6822.27
    }
  ],
  "createdAt": "2026-03-12T14:47:01.501Z"
}