example-data.com
Menu
Browse docs and collections

Overview

invoices / #164

invoices #164

fromUserId
Mateo Gerlach @mateo.gerlach
toUserId
Jamil Mayer @jamil.mayer
invoiceNumber
INV-2025-0164
status
paid
issuedAt
dueAt
paidAt
subtotal
1232.62
tax
0
total
1232.62
currency
EUR
lineItems
              [
  {
    "description": "Technical support",
    "quantity": 4,
    "unitPrice": 225.9,
    "lineTotal": 903.6
  },
  {
    "description": "Training session",
    "quantity": 1,
    "unitPrice": 329.02,
    "lineTotal": 329.02
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 164,
  "fromUserId": 81,
  "toUserId": 233,
  "invoiceNumber": "INV-2025-0164",
  "status": "paid",
  "issuedAt": "2025-01-12T13:47:19.581Z",
  "dueAt": "2025-02-17T13:47:19.581Z",
  "paidAt": "2025-01-14T23:24:16.103Z",
  "subtotal": 1232.62,
  "tax": 0,
  "total": 1232.62,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Technical support",
      "quantity": 4,
      "unitPrice": 225.9,
      "lineTotal": 903.6
    },
    {
      "description": "Training session",
      "quantity": 1,
      "unitPrice": 329.02,
      "lineTotal": 329.02
    }
  ],
  "createdAt": "2025-01-11T23:34:49.168Z"
}