example-data.com
Menu
Browse docs and collections

Overview

invoices / #143

invoices #143

fromUserId
Audreanne Will @audreanne_will
toUserId
Theresia Collins @theresia_collins86
invoiceNumber
INV-2025-0143
status
overdue
issuedAt
dueAt
paidAt
subtotal
9405.68
tax
0
total
9405.68
currency
EUR
lineItems
              [
  {
    "description": "Photography services",
    "quantity": 23,
    "unitPrice": 253.44,
    "lineTotal": 5829.12
  },
  {
    "description": "System integration",
    "quantity": 38,
    "unitPrice": 94.12,
    "lineTotal": 3576.56
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 143,
  "fromUserId": 127,
  "toUserId": 63,
  "invoiceNumber": "INV-2025-0143",
  "status": "overdue",
  "issuedAt": "2025-01-09T05:09:03.935Z",
  "dueAt": "2025-02-10T05:09:03.935Z",
  "paidAt": null,
  "subtotal": 9405.68,
  "tax": 0,
  "total": 9405.68,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Photography services",
      "quantity": 23,
      "unitPrice": 253.44,
      "lineTotal": 5829.12
    },
    {
      "description": "System integration",
      "quantity": 38,
      "unitPrice": 94.12,
      "lineTotal": 3576.56
    }
  ],
  "createdAt": "2025-01-09T04:55:09.204Z"
}