example-data.com
Menu
Browse docs and collections

invoices

invoices

Page 3 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": 49,
      "fromUserId": 184,
      "toUserId": 176,
      "invoiceNumber": "INV-2025-0049",
      "status": "sent",
      "issuedAt": "2025-10-03T12:09:22.723Z",
      "dueAt": "2025-11-22T12:09:22.723Z",
      "paidAt": null,
      "subtotal": 16048.61,
      "tax": 0,
      "total": 16048.61,
      "currency": "CAD",
      "lineItems": [
        {
          "description": "Accounting services",
          "quantity": 33,
          "unitPrice": 215.97,
          "lineTotal": 7127.01
        },
        {
          "description": "System integration",
          "quantity": 9,
          "unitPrice": 372.88,
          "lineTotal": 3355.92
        },
        {
          "description": "Data analysis",
          "quantity": 36,
          "unitPrice": 86.1,
          "lineTotal": 3099.6
        },
        {
          "description": "Technical support",
          "quantity": 37,
          "unitPrice": 55.04,
          "lineTotal": 2036.48
        },
        {
          "description": "Content writing",
          "quantity": 20,
          "unitPrice": 21.48,
          "lineTotal": 429.6
        }
      ],
      "createdAt": "2025-10-03T11:18:47.762Z"
    },
    {
      "id": 50,
      "fromUserId": 165,
      "toUserId": 180,
      "invoiceNumber": "INV-2024-0050",
      "status": "sent",
      "issuedAt": "2024-08-18T12:07:28.947Z",
      "dueAt": "2024-10-04T12:07:28.947Z",
      "paidAt": null,
      "subtotal": 4020.39,
      "tax": 321.63,
      "total": 4342.02,
      "currency": "CAD",
      "lineItems": [
        {
          "description": "Consulting services",
          "quantity": 17,
          "unitPrice": 139.91,
          "lineTotal": 2378.47
        },
        {
          "description": "Consulting services",
          "quantity": 4,
          "unitPrice": 196.73,
          "lineTotal": 786.92
        },
        {
          "description": "Content writing",
          "quantity": 10,
          "unitPrice": 85.5,
          "lineTotal": 855
        }
      ],
      "createdAt": "2024-08-17T21:17:18.007Z"
    },
    {
      "id": 51,
      "fromUserId": 164,
      "toUserId": 210,
      "invoiceNumber": "INV-2025-0051",
      "status": "sent",
      "issuedAt": "2025-06-19T04:05:01.177Z",
      "dueAt": "2025-07-30T04:05:01.177Z",
      "paidAt": null,
      "subtotal": 25101.51,
      "tax": 0,
      "total": 25101.51,
      "currency": "EUR",
      "lineItems": [
        {
          "description": "Documentation",
          "quantity": 4,
          "unitPrice": 199.11,
          "lineTotal": 796.44
        },
        {
          "description": "License fee",
          "quantity": 15,
          "unitPrice": 389.2,
          "lineTotal": 5838
        },
        {
          "description": "Data analysis",
          "quantity": 29,
          "unitPrice": 486.39,
          "lineTotal": 14105.31
        },
        {
          "description": "Project management",
          "quantity": 9,
          "unitPrice": 484.64,
          "lineTotal": 4361.76
        }
      ],
      "createdAt": "2025-06-19T03:40:11.440Z"
    }
  ],
  "meta": {
    "page": 3,
    "limit": 24,
    "total": 300,
    "totalPages": 13
  },
  "links": {
    "self": "/api/v1/invoices?page=3&limit=24",
    "first": "/api/v1/invoices?page=1&limit=24",
    "last": "/api/v1/invoices?page=13&limit=24",
    "next": "/api/v1/invoices?page=4&limit=24",
    "prev": "/api/v1/invoices?page=2&limit=24"
  }
}