invoices
invoices
Page 7 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": 145,
"fromUserId": 63,
"toUserId": 4,
"invoiceNumber": "INV-2025-0145",
"status": "paid",
"issuedAt": "2025-10-22T05:28:39.189Z",
"dueAt": "2025-11-13T05:28:39.189Z",
"paidAt": "2025-11-02T18:40:22.864Z",
"subtotal": 16411.95,
"tax": 0,
"total": 16411.95,
"currency": "GBP",
"lineItems": [
{
"description": "Software development",
"quantity": 23,
"unitPrice": 228.83,
"lineTotal": 5263.09
},
{
"description": "Research services",
"quantity": 11,
"unitPrice": 166.66,
"lineTotal": 1833.26
},
{
"description": "Photography services",
"quantity": 30,
"unitPrice": 310.52,
"lineTotal": 9315.6
}
],
"createdAt": "2025-10-21T13:15:47.123Z"
},
{
"id": 146,
"fromUserId": 132,
"toUserId": 20,
"invoiceNumber": "INV-2025-0146",
"status": "paid",
"issuedAt": "2025-01-16T07:14:17.035Z",
"dueAt": "2025-02-25T07:14:17.035Z",
"paidAt": "2025-01-18T08:59:35.187Z",
"subtotal": 3804.04,
"tax": 380.4,
"total": 4184.44,
"currency": "CAD",
"lineItems": [
{
"description": "Data analysis",
"quantity": 29,
"unitPrice": 114.62,
"lineTotal": 3323.98
},
{
"description": "Data analysis",
"quantity": 2,
"unitPrice": 240.03,
"lineTotal": 480.06
}
],
"createdAt": "2025-01-16T03:13:47.072Z"
},
{
"id": 147,
"fromUserId": 160,
"toUserId": 62,
"invoiceNumber": "INV-2025-0147",
"status": "paid",
"issuedAt": "2025-02-19T01:12:25.989Z",
"dueAt": "2025-03-09T01:12:25.989Z",
"paidAt": "2025-02-23T22:49:16.046Z",
"subtotal": 20924.44,
"tax": 0,
"total": 20924.44,
"currency": "AUD",
"lineItems": [
{
"description": "Design work",
"quantity": 12,
"unitPrice": 465.61,
"lineTotal": 5587.32
},
{
"description": "Technical support",
"quantity": 37,
"unitPrice": 118.96,
"lineTotal": 4401.52
},
{
"description": "Implementation services",
"quantity": 26,
"unitPrice": 420.6,
"lineTotal": 10935.6
}
],
"createdAt": "2025-02-18T04:42:07.725Z"
}
],
"meta": {
"page": 7,
"limit": 24,
"total": 300,
"totalPages": 13
},
"links": {
"self": "/api/v1/invoices?page=7&limit=24",
"first": "/api/v1/invoices?page=1&limit=24",
"last": "/api/v1/invoices?page=13&limit=24",
"next": "/api/v1/invoices?page=8&limit=24",
"prev": "/api/v1/invoices?page=6&limit=24"
}
}