example-data.com
Menu
Browse docs and collections

Overview

invoices / #300

invoices #300

fromUserId
Carley Gleichner @carley.gleichner
toUserId
Maximus Bosco @maximus_bosco
invoiceNumber
INV-2025-0300
status
paid
issuedAt
dueAt
paidAt
subtotal
17917.88
tax
895.89
total
18813.77
currency
GBP
lineItems
              [
  {
    "description": "Software development",
    "quantity": 31,
    "unitPrice": 263.3,
    "lineTotal": 8162.3
  },
  {
    "description": "Software development",
    "quantity": 34,
    "unitPrice": 30.63,
    "lineTotal": 1041.42
  },
  {
    "description": "Legal review",
    "quantity": 32,
    "unitPrice": 98.98,
    "lineTotal": 3167.36
  },
  {
    "description": "Design work",
    "quantity": 38,
    "unitPrice": 98.54,
    "lineTotal": 3744.52
  },
  {
    "description": "Data analysis",
    "quantity": 4,
    "unitPrice": 450.57,
    "lineTotal": 1802.28
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 300,
  "fromUserId": 142,
  "toUserId": 128,
  "invoiceNumber": "INV-2025-0300",
  "status": "paid",
  "issuedAt": "2025-12-10T03:10:04.093Z",
  "dueAt": "2026-01-14T03:10:04.093Z",
  "paidAt": "2026-01-04T22:06:07.395Z",
  "subtotal": 17917.88,
  "tax": 895.89,
  "total": 18813.77,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Software development",
      "quantity": 31,
      "unitPrice": 263.3,
      "lineTotal": 8162.3
    },
    {
      "description": "Software development",
      "quantity": 34,
      "unitPrice": 30.63,
      "lineTotal": 1041.42
    },
    {
      "description": "Legal review",
      "quantity": 32,
      "unitPrice": 98.98,
      "lineTotal": 3167.36
    },
    {
      "description": "Design work",
      "quantity": 38,
      "unitPrice": 98.54,
      "lineTotal": 3744.52
    },
    {
      "description": "Data analysis",
      "quantity": 4,
      "unitPrice": 450.57,
      "lineTotal": 1802.28
    }
  ],
  "createdAt": "2025-12-09T14:30:15.612Z"
}