example-data.com
Menu
Browse docs and collections

Overview

invoices / #255

invoices #255

fromUserId
Amya Powlowski @amya_powlowski32
toUserId
Kenya Abshire @kenya.abshire
invoiceNumber
INV-2025-0255
status
overdue
issuedAt
dueAt
paidAt
subtotal
32475.53
tax
6495.11
total
38970.64
currency
GBP
lineItems
              [
  {
    "description": "System integration",
    "quantity": 23,
    "unitPrice": 53.69,
    "lineTotal": 1234.87
  },
  {
    "description": "Implementation services",
    "quantity": 18,
    "unitPrice": 247.11,
    "lineTotal": 4447.98
  },
  {
    "description": "License fee",
    "quantity": 36,
    "unitPrice": 483.5,
    "lineTotal": 17406
  },
  {
    "description": "Training session",
    "quantity": 20,
    "unitPrice": 72.95,
    "lineTotal": 1459
  },
  {
    "description": "Implementation services",
    "quantity": 32,
    "unitPrice": 247.74,
    "lineTotal": 7927.68
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 255,
  "fromUserId": 80,
  "toUserId": 18,
  "invoiceNumber": "INV-2025-0255",
  "status": "overdue",
  "issuedAt": "2025-11-12T17:23:26.608Z",
  "dueAt": "2025-11-29T17:23:26.608Z",
  "paidAt": null,
  "subtotal": 32475.53,
  "tax": 6495.11,
  "total": 38970.64,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "System integration",
      "quantity": 23,
      "unitPrice": 53.69,
      "lineTotal": 1234.87
    },
    {
      "description": "Implementation services",
      "quantity": 18,
      "unitPrice": 247.11,
      "lineTotal": 4447.98
    },
    {
      "description": "License fee",
      "quantity": 36,
      "unitPrice": 483.5,
      "lineTotal": 17406
    },
    {
      "description": "Training session",
      "quantity": 20,
      "unitPrice": 72.95,
      "lineTotal": 1459
    },
    {
      "description": "Implementation services",
      "quantity": 32,
      "unitPrice": 247.74,
      "lineTotal": 7927.68
    }
  ],
  "createdAt": "2025-11-11T17:45:57.338Z"
}