example-data.com
Menu
Browse docs and collections

invoices

invoices

Page 11 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": 241,
      "fromUserId": 34,
      "toUserId": 41,
      "invoiceNumber": "INV-2025-0241",
      "status": "sent",
      "issuedAt": "2025-09-03T11:27:16.510Z",
      "dueAt": "2025-10-21T11:27:16.510Z",
      "paidAt": null,
      "subtotal": 20508.88,
      "tax": 3076.33,
      "total": 23585.21,
      "currency": "GBP",
      "lineItems": [
        {
          "description": "Project management",
          "quantity": 29,
          "unitPrice": 133.19,
          "lineTotal": 3862.51
        },
        {
          "description": "Implementation services",
          "quantity": 17,
          "unitPrice": 265.5,
          "lineTotal": 4513.5
        },
        {
          "description": "Maintenance contract",
          "quantity": 29,
          "unitPrice": 383.67,
          "lineTotal": 11126.43
        },
        {
          "description": "Accounting services",
          "quantity": 3,
          "unitPrice": 335.48,
          "lineTotal": 1006.44
        }
      ],
      "createdAt": "2025-09-03T06:11:47.043Z"
    },
    {
      "id": 242,
      "fromUserId": 240,
      "toUserId": 32,
      "invoiceNumber": "INV-2025-0242",
      "status": "viewed",
      "issuedAt": "2025-12-05T18:50:47.857Z",
      "dueAt": "2026-01-04T18:50:47.857Z",
      "paidAt": null,
      "subtotal": 14614.75,
      "tax": 2922.95,
      "total": 17537.7,
      "currency": "EUR",
      "lineItems": [
        {
          "description": "Maintenance contract",
          "quantity": 37,
          "unitPrice": 162.91,
          "lineTotal": 6027.67
        },
        {
          "description": "System integration",
          "quantity": 18,
          "unitPrice": 477.06,
          "lineTotal": 8587.08
        }
      ],
      "createdAt": "2025-12-05T09:37:08.507Z"
    },
    {
      "id": 243,
      "fromUserId": 178,
      "toUserId": 56,
      "invoiceNumber": "INV-2025-0243",
      "status": "paid",
      "issuedAt": "2025-08-05T07:59:25.890Z",
      "dueAt": "2025-09-29T07:59:25.890Z",
      "paidAt": "2025-09-21T23:26:39.359Z",
      "subtotal": 15910.77,
      "tax": 0,
      "total": 15910.77,
      "currency": "EUR",
      "lineItems": [
        {
          "description": "Technical support",
          "quantity": 8,
          "unitPrice": 347.96,
          "lineTotal": 2783.68
        },
        {
          "description": "Project management",
          "quantity": 7,
          "unitPrice": 164.99,
          "lineTotal": 1154.93
        },
        {
          "description": "Training session",
          "quantity": 32,
          "unitPrice": 374.13,
          "lineTotal": 11972.16
        }
      ],
      "createdAt": "2025-08-04T21:18:02.225Z"
    }
  ],
  "meta": {
    "page": 11,
    "limit": 24,
    "total": 300,
    "totalPages": 13
  },
  "links": {
    "self": "/api/v1/invoices?page=11&limit=24",
    "first": "/api/v1/invoices?page=1&limit=24",
    "last": "/api/v1/invoices?page=13&limit=24",
    "next": "/api/v1/invoices?page=12&limit=24",
    "prev": "/api/v1/invoices?page=10&limit=24"
  }
}