example-data.com
Menu
Browse docs and collections

Overview

invoices / #40

invoices #40

fromUserId
Glenna Keebler @glenna_keebler
toUserId
Ruben Terry @ruben.terry
invoiceNumber
INV-2026-0040
status
paid
issuedAt
dueAt
paidAt
subtotal
30266.91
tax
4540.04
total
34806.95
currency
USD
lineItems
              [
  {
    "description": "Data analysis",
    "quantity": 38,
    "unitPrice": 289.79,
    "lineTotal": 11012.02
  },
  {
    "description": "Marketing services",
    "quantity": 21,
    "unitPrice": 370.18,
    "lineTotal": 7773.78
  },
  {
    "description": "Legal review",
    "quantity": 14,
    "unitPrice": 327.03,
    "lineTotal": 4578.42
  },
  {
    "description": "Accounting services",
    "quantity": 11,
    "unitPrice": 26.02,
    "lineTotal": 286.22
  },
  {
    "description": "Consulting services",
    "quantity": 22,
    "unitPrice": 289.55,
    "lineTotal": 6370.1
  },
  {
    "description": "Implementation services",
    "quantity": 1,
    "unitPrice": 246.37,
    "lineTotal": 246.37
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 40,
  "fromUserId": 134,
  "toUserId": 91,
  "invoiceNumber": "INV-2026-0040",
  "status": "paid",
  "issuedAt": "2026-03-21T00:39:17.964Z",
  "dueAt": "2026-04-20T00:39:17.964Z",
  "paidAt": "2026-04-08T08:15:51.854Z",
  "subtotal": 30266.91,
  "tax": 4540.04,
  "total": 34806.95,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 38,
      "unitPrice": 289.79,
      "lineTotal": 11012.02
    },
    {
      "description": "Marketing services",
      "quantity": 21,
      "unitPrice": 370.18,
      "lineTotal": 7773.78
    },
    {
      "description": "Legal review",
      "quantity": 14,
      "unitPrice": 327.03,
      "lineTotal": 4578.42
    },
    {
      "description": "Accounting services",
      "quantity": 11,
      "unitPrice": 26.02,
      "lineTotal": 286.22
    },
    {
      "description": "Consulting services",
      "quantity": 22,
      "unitPrice": 289.55,
      "lineTotal": 6370.1
    },
    {
      "description": "Implementation services",
      "quantity": 1,
      "unitPrice": 246.37,
      "lineTotal": 246.37
    }
  ],
  "createdAt": "2026-03-20T07:35:16.661Z"
}