example-data.com
Menu
Browse docs and collections

invoices

invoices

Page 13 of 13.

Overview

Request

curl example

curl -sS \
  "https://example-data.com/api/v1/invoices?limit=25"

JavaScript example

const res = await fetch(
  "https://example-data.com/api/v1/invoices?limit=25"
);
const { data, meta } = 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, ListEnvelope } from "./types/invoices";

const res = await fetch(
  "https://example-data.com/api/v1/invoices?limit=25"
);
const { data, meta } = (await res.json()) as ListEnvelope<Invoice>;

Python example

import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices",
    params={"limit": 25},
)
data = res.json()

Response

{
  "data": [
    {
      "id": 289,
      "fromUserId": 205,
      "toUserId": 41,
      "invoiceNumber": "INV-2025-0289",
      "status": "paid",
      "issuedAt": "2025-09-03T06:54:54.657Z",
      "dueAt": "2025-09-16T06:54:54.657Z",
      "paidAt": "2025-09-08T16:49:34.408Z",
      "subtotal": 21280.48,
      "tax": 2128.05,
      "total": 23408.53,
      "currency": "CAD",
      "lineItems": [
        {
          "description": "Content writing",
          "quantity": 27,
          "unitPrice": 455.17,
          "lineTotal": 12289.59
        },
        {
          "description": "Implementation services",
          "quantity": 20,
          "unitPrice": 168.62,
          "lineTotal": 3372.4
        },
        {
          "description": "Design work",
          "quantity": 9,
          "unitPrice": 410.65,
          "lineTotal": 3695.85
        },
        {
          "description": "Design work",
          "quantity": 8,
          "unitPrice": 240.33,
          "lineTotal": 1922.64
        }
      ],
      "createdAt": "2025-09-02T08:25:57.070Z"
    },
    {
      "id": 290,
      "fromUserId": 120,
      "toUserId": 59,
      "invoiceNumber": "INV-2024-0290",
      "status": "viewed",
      "issuedAt": "2024-05-30T19:19:26.505Z",
      "dueAt": "2024-06-13T19:19:26.505Z",
      "paidAt": null,
      "subtotal": 1942.37,
      "tax": 194.24,
      "total": 2136.61,
      "currency": "EUR",
      "lineItems": [
        {
          "description": "Accounting services",
          "quantity": 20,
          "unitPrice": 15.7,
          "lineTotal": 314
        },
        {
          "description": "Training session",
          "quantity": 27,
          "unitPrice": 60.31,
          "lineTotal": 1628.37
        }
      ],
      "createdAt": "2024-05-30T08:28:29.592Z"
    },
    {
      "id": 291,
      "fromUserId": 145,
      "toUserId": 218,
      "invoiceNumber": "INV-2026-0291",
      "status": "cancelled",
      "issuedAt": "2026-05-07T01:01:31.456Z",
      "dueAt": "2026-05-16T01:01:31.456Z",
      "paidAt": null,
      "subtotal": 37442.13,
      "tax": 5616.32,
      "total": 43058.45,
      "currency": "GBP",
      "lineItems": [
        {
          "description": "Legal review",
          "quantity": 29,
          "unitPrice": 365.31,
          "lineTotal": 10593.99
        },
        {
          "description": "Project management",
          "quantity": 40,
          "unitPrice": 114.57,
          "lineTotal": 4582.8
        },
        {
          "description": "Marketing services",
          "quantity": 40,
          "unitPrice": 12.81,
          "lineTotal": 512.4
        },
        {
          "description": "Research services",
          "quantity": 34,
          "unitPrice": 86.22,
          "lineTotal": 2931.48
        },
        {
          "description": "Legal review",
          "quantity": 31,
          "unitPrice": 417.42,
          "lineTotal": 12940.02
        },
        {
          "description": "Data analysis",
          "quantity": 12,
          "unitPrice": 490.12,
          "lineTotal": 5881.44
        }
      ],
      "createdAt": "2026-05-06T01:09:09.815Z"
    }
  ],
  "meta": {
    "page": 13,
    "limit": 24,
    "total": 300,
    "totalPages": 13
  },
  "links": {
    "self": "/api/v1/invoices?page=13&limit=24",
    "first": "/api/v1/invoices?page=1&limit=24",
    "last": "/api/v1/invoices?page=13&limit=24",
    "next": null,
    "prev": "/api/v1/invoices?page=12&limit=24"
  }
}