example-data.com
Menu
Browse docs and collections

Overview

invoices / #64

invoices #64

fromUserId
Cassidy Price-Schimmel @cassidy.price-schimmel
toUserId
Telly Sanford @telly.sanford
invoiceNumber
INV-2025-0064
status
paid
issuedAt
dueAt
paidAt
subtotal
23452.91
tax
2345.29
total
25798.2
currency
USD
lineItems
              [
  {
    "description": "Quality assurance",
    "quantity": 37,
    "unitPrice": 413.71,
    "lineTotal": 15307.27
  },
  {
    "description": "Training session",
    "quantity": 33,
    "unitPrice": 46.73,
    "lineTotal": 1542.09
  },
  {
    "description": "Consulting services",
    "quantity": 12,
    "unitPrice": 411.51,
    "lineTotal": 4938.12
  },
  {
    "description": "Maintenance contract",
    "quantity": 13,
    "unitPrice": 128.11,
    "lineTotal": 1665.43
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 64,
  "fromUserId": 227,
  "toUserId": 123,
  "invoiceNumber": "INV-2025-0064",
  "status": "paid",
  "issuedAt": "2025-02-28T06:19:26.678Z",
  "dueAt": "2025-03-13T06:19:26.678Z",
  "paidAt": "2025-03-09T08:23:34.123Z",
  "subtotal": 23452.91,
  "tax": 2345.29,
  "total": 25798.2,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Quality assurance",
      "quantity": 37,
      "unitPrice": 413.71,
      "lineTotal": 15307.27
    },
    {
      "description": "Training session",
      "quantity": 33,
      "unitPrice": 46.73,
      "lineTotal": 1542.09
    },
    {
      "description": "Consulting services",
      "quantity": 12,
      "unitPrice": 411.51,
      "lineTotal": 4938.12
    },
    {
      "description": "Maintenance contract",
      "quantity": 13,
      "unitPrice": 128.11,
      "lineTotal": 1665.43
    }
  ],
  "createdAt": "2025-02-27T15:42:56.410Z"
}