example-data.com
Menu
Browse docs and collections

Overview

invoices / #252

invoices #252

fromUserId
Audreanne Will @audreanne_will
toUserId
Merl Jenkins @merl.jenkins6
invoiceNumber
INV-2025-0252
status
draft
issuedAt
dueAt
paidAt
subtotal
10298.85
tax
514.94
total
10813.79
currency
USD
lineItems
              [
  {
    "description": "System integration",
    "quantity": 12,
    "unitPrice": 441.07,
    "lineTotal": 5292.84
  },
  {
    "description": "License fee",
    "quantity": 11,
    "unitPrice": 358.41,
    "lineTotal": 3942.51
  },
  {
    "description": "Technical support",
    "quantity": 5,
    "unitPrice": 212.7,
    "lineTotal": 1063.5
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 252,
  "fromUserId": 127,
  "toUserId": 60,
  "invoiceNumber": "INV-2025-0252",
  "status": "draft",
  "issuedAt": "2025-10-12T07:29:27.591Z",
  "dueAt": "2025-11-09T07:29:27.591Z",
  "paidAt": null,
  "subtotal": 10298.85,
  "tax": 514.94,
  "total": 10813.79,
  "currency": "USD",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 12,
      "unitPrice": 441.07,
      "lineTotal": 5292.84
    },
    {
      "description": "License fee",
      "quantity": 11,
      "unitPrice": 358.41,
      "lineTotal": 3942.51
    },
    {
      "description": "Technical support",
      "quantity": 5,
      "unitPrice": 212.7,
      "lineTotal": 1063.5
    }
  ],
  "createdAt": "2025-10-11T22:29:44.187Z"
}