example-data.com
Menu
Browse docs and collections

Overview

invoices / #249

invoices #249

fromUserId
Izaiah Rempel @izaiah_rempel
toUserId
Sandrine Osinski @sandrine.osinski
invoiceNumber
INV-2025-0249
status
paid
issuedAt
dueAt
paidAt
subtotal
49173.15
tax
3933.85
total
53107
currency
EUR
lineItems
              [
  {
    "description": "Hardware supply",
    "quantity": 40,
    "unitPrice": 354.53,
    "lineTotal": 14181.2
  },
  {
    "description": "Hardware supply",
    "quantity": 15,
    "unitPrice": 350.37,
    "lineTotal": 5255.55
  },
  {
    "description": "Design work",
    "quantity": 36,
    "unitPrice": 230.01,
    "lineTotal": 8280.36
  },
  {
    "description": "Accounting services",
    "quantity": 24,
    "unitPrice": 430.37,
    "lineTotal": 10328.88
  },
  {
    "description": "Photography services",
    "quantity": 32,
    "unitPrice": 144.26,
    "lineTotal": 4616.32
  },
  {
    "description": "Training session",
    "quantity": 23,
    "unitPrice": 283.08,
    "lineTotal": 6510.84
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 249,
  "fromUserId": 31,
  "toUserId": 157,
  "invoiceNumber": "INV-2025-0249",
  "status": "paid",
  "issuedAt": "2025-05-19T04:10:15.323Z",
  "dueAt": "2025-06-15T04:10:15.323Z",
  "paidAt": "2025-05-25T05:42:47.026Z",
  "subtotal": 49173.15,
  "tax": 3933.85,
  "total": 53107,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Hardware supply",
      "quantity": 40,
      "unitPrice": 354.53,
      "lineTotal": 14181.2
    },
    {
      "description": "Hardware supply",
      "quantity": 15,
      "unitPrice": 350.37,
      "lineTotal": 5255.55
    },
    {
      "description": "Design work",
      "quantity": 36,
      "unitPrice": 230.01,
      "lineTotal": 8280.36
    },
    {
      "description": "Accounting services",
      "quantity": 24,
      "unitPrice": 430.37,
      "lineTotal": 10328.88
    },
    {
      "description": "Photography services",
      "quantity": 32,
      "unitPrice": 144.26,
      "lineTotal": 4616.32
    },
    {
      "description": "Training session",
      "quantity": 23,
      "unitPrice": 283.08,
      "lineTotal": 6510.84
    }
  ],
  "createdAt": "2025-05-18T20:52:42.494Z"
}