example-data.com
Menu
Browse docs and collections

Overview

invoices / #11

invoices #11

fromUserId
Lennie Dickinson @lennie_dickinson8
toUserId
Frederic Armstrong @frederic_armstrong96
invoiceNumber
INV-2025-0011
status
paid
issuedAt
dueAt
paidAt
subtotal
4011.16
tax
320.89
total
4332.05
currency
EUR
lineItems
              [
  {
    "description": "Maintenance contract",
    "quantity": 7,
    "unitPrice": 385.96,
    "lineTotal": 2701.72
  },
  {
    "description": "Content writing",
    "quantity": 11,
    "unitPrice": 119.04,
    "lineTotal": 1309.44
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 11,
  "fromUserId": 121,
  "toUserId": 199,
  "invoiceNumber": "INV-2025-0011",
  "status": "paid",
  "issuedAt": "2025-03-31T03:13:01.994Z",
  "dueAt": "2025-05-20T03:13:01.994Z",
  "paidAt": "2025-04-29T17:29:50.256Z",
  "subtotal": 4011.16,
  "tax": 320.89,
  "total": 4332.05,
  "currency": "EUR",
  "lineItems": [
    {
      "description": "Maintenance contract",
      "quantity": 7,
      "unitPrice": 385.96,
      "lineTotal": 2701.72
    },
    {
      "description": "Content writing",
      "quantity": 11,
      "unitPrice": 119.04,
      "lineTotal": 1309.44
    }
  ],
  "createdAt": "2025-03-30T08:19:08.236Z"
}