example-data.com
Menu
Browse docs and collections

Overview

invoices / #262

invoices #262

fromUserId
Anne Hamill @anne_hamill75
toUserId
Jennifer Stoltenberg @jennifer_stoltenberg
invoiceNumber
INV-2025-0262
status
sent
issuedAt
dueAt
paidAt
subtotal
5545.5
tax
277.28
total
5822.78
currency
USD
lineItems
              [
  {
    "description": "Technical support",
    "quantity": 30,
    "unitPrice": 180.63,
    "lineTotal": 5418.9
  },
  {
    "description": "Consulting services",
    "quantity": 2,
    "unitPrice": 63.3,
    "lineTotal": 126.6
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 262,
  "fromUserId": 9,
  "toUserId": 25,
  "invoiceNumber": "INV-2025-0262",
  "status": "sent",
  "issuedAt": "2025-03-09T15:30:17.881Z",
  "dueAt": "2025-04-08T15:30:17.881Z",
  "paidAt": null,
  "subtotal": 5545.5,
  "tax": 277.28,
  "total": 5822.78,
  "currency": "USD",
  "lineItems": [
    {
      "description": "Technical support",
      "quantity": 30,
      "unitPrice": 180.63,
      "lineTotal": 5418.9
    },
    {
      "description": "Consulting services",
      "quantity": 2,
      "unitPrice": 63.3,
      "lineTotal": 126.6
    }
  ],
  "createdAt": "2025-03-09T14:21:03.869Z"
}