example-data.com
Menu
Browse docs and collections

Overview

invoices / #216

invoices #216

fromUserId
Chyna Kozey @chyna_kozey80
toUserId
Judy Hackett @judy_hackett49
invoiceNumber
INV-2026-0216
status
paid
issuedAt
dueAt
paidAt
subtotal
23973.21
tax
4794.64
total
28767.85
currency
USD
lineItems
              [
  {
    "description": "Photography services",
    "quantity": 20,
    "unitPrice": 98.21,
    "lineTotal": 1964.2
  },
  {
    "description": "Maintenance contract",
    "quantity": 11,
    "unitPrice": 499.71,
    "lineTotal": 5496.81
  },
  {
    "description": "Software development",
    "quantity": 14,
    "unitPrice": 475.7,
    "lineTotal": 6659.8
  },
  {
    "description": "Consulting services",
    "quantity": 26,
    "unitPrice": 339.83,
    "lineTotal": 8835.58
  },
  {
    "description": "Hardware supply",
    "quantity": 7,
    "unitPrice": 145.26,
    "lineTotal": 1016.82
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 216,
  "fromUserId": 140,
  "toUserId": 13,
  "invoiceNumber": "INV-2026-0216",
  "status": "paid",
  "issuedAt": "2026-02-22T18:45:48.027Z",
  "dueAt": "2026-03-21T18:45:48.027Z",
  "paidAt": "2026-03-17T16:15:53.099Z",
  "subtotal": 23973.21,
  "tax": 4794.64,
  "total": 28767.85,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Photography services",
      "quantity": 20,
      "unitPrice": 98.21,
      "lineTotal": 1964.2
    },
    {
      "description": "Maintenance contract",
      "quantity": 11,
      "unitPrice": 499.71,
      "lineTotal": 5496.81
    },
    {
      "description": "Software development",
      "quantity": 14,
      "unitPrice": 475.7,
      "lineTotal": 6659.8
    },
    {
      "description": "Consulting services",
      "quantity": 26,
      "unitPrice": 339.83,
      "lineTotal": 8835.58
    },
    {
      "description": "Hardware supply",
      "quantity": 7,
      "unitPrice": 145.26,
      "lineTotal": 1016.82
    }
  ],
  "createdAt": "2026-02-22T05:17:55.926Z"
}