example-data.com
Menu
Browse docs and collections

Overview

invoices / #250

invoices #250

fromUserId
Stephan Heller @stephan.heller
toUserId
Roberta Mueller-Yundt @roberta_mueller-yundt
invoiceNumber
INV-2025-0250
status
draft
issuedAt
dueAt
paidAt
subtotal
8143.39
tax
0
total
8143.39
currency
GBP
lineItems
              [
  {
    "description": "Design work",
    "quantity": 11,
    "unitPrice": 433.69,
    "lineTotal": 4770.59
  },
  {
    "description": "Technical support",
    "quantity": 31,
    "unitPrice": 108.8,
    "lineTotal": 3372.8
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 250,
  "fromUserId": 82,
  "toUserId": 162,
  "invoiceNumber": "INV-2025-0250",
  "status": "draft",
  "issuedAt": "2025-03-25T21:15:42.405Z",
  "dueAt": "2025-05-20T21:15:42.405Z",
  "paidAt": null,
  "subtotal": 8143.39,
  "tax": 0,
  "total": 8143.39,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Design work",
      "quantity": 11,
      "unitPrice": 433.69,
      "lineTotal": 4770.59
    },
    {
      "description": "Technical support",
      "quantity": 31,
      "unitPrice": 108.8,
      "lineTotal": 3372.8
    }
  ],
  "createdAt": "2025-03-24T23:00:24.263Z"
}