example-data.com
Menu
Browse docs and collections

Overview

invoices / #260

invoices #260

fromUserId
Lamar Wilkinson @lamar_wilkinson43
toUserId
Melba Collier @melba.collier
invoiceNumber
INV-2025-0260
status
paid
issuedAt
dueAt
paidAt
subtotal
43916.01
tax
0
total
43916.01
currency
GBP
lineItems
              [
  {
    "description": "Content writing",
    "quantity": 21,
    "unitPrice": 86.68,
    "lineTotal": 1820.28
  },
  {
    "description": "Maintenance contract",
    "quantity": 39,
    "unitPrice": 308,
    "lineTotal": 12012
  },
  {
    "description": "Photography services",
    "quantity": 22,
    "unitPrice": 206.16,
    "lineTotal": 4535.52
  },
  {
    "description": "Legal review",
    "quantity": 24,
    "unitPrice": 464.79,
    "lineTotal": 11154.96
  },
  {
    "description": "Training session",
    "quantity": 16,
    "unitPrice": 264.75,
    "lineTotal": 4236
  },
  {
    "description": "License fee",
    "quantity": 29,
    "unitPrice": 350.25,
    "lineTotal": 10157.25
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 260,
  "fromUserId": 43,
  "toUserId": 19,
  "invoiceNumber": "INV-2025-0260",
  "status": "paid",
  "issuedAt": "2025-09-16T23:43:50.031Z",
  "dueAt": "2025-10-21T23:43:50.031Z",
  "paidAt": "2025-10-20T03:36:32.787Z",
  "subtotal": 43916.01,
  "tax": 0,
  "total": 43916.01,
  "currency": "GBP",
  "lineItems": [
    {
      "description": "Content writing",
      "quantity": 21,
      "unitPrice": 86.68,
      "lineTotal": 1820.28
    },
    {
      "description": "Maintenance contract",
      "quantity": 39,
      "unitPrice": 308,
      "lineTotal": 12012
    },
    {
      "description": "Photography services",
      "quantity": 22,
      "unitPrice": 206.16,
      "lineTotal": 4535.52
    },
    {
      "description": "Legal review",
      "quantity": 24,
      "unitPrice": 464.79,
      "lineTotal": 11154.96
    },
    {
      "description": "Training session",
      "quantity": 16,
      "unitPrice": 264.75,
      "lineTotal": 4236
    },
    {
      "description": "License fee",
      "quantity": 29,
      "unitPrice": 350.25,
      "lineTotal": 10157.25
    }
  ],
  "createdAt": "2025-09-16T06:46:51.945Z"
}