example-data.com
Menu
Browse docs and collections

Overview

invoices / #261

invoices #261

fromUserId
Amparo Dietrich @amparo.dietrich
toUserId
Kariane Schmitt @kariane.schmitt97
invoiceNumber
INV-2024-0261
status
sent
issuedAt
dueAt
paidAt
subtotal
19759.92
tax
3951.98
total
23711.9
currency
CAD
lineItems
              [
  {
    "description": "Data analysis",
    "quantity": 28,
    "unitPrice": 262.99,
    "lineTotal": 7363.72
  },
  {
    "description": "Implementation services",
    "quantity": 14,
    "unitPrice": 487.84,
    "lineTotal": 6829.76
  },
  {
    "description": "Technical support",
    "quantity": 6,
    "unitPrice": 163.34,
    "lineTotal": 980.04
  },
  {
    "description": "Marketing services",
    "quantity": 36,
    "unitPrice": 127.4,
    "lineTotal": 4586.4
  }
]
            
createdAt

Component variants

Related

Request

curl example

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

JavaScript example

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

Python example

import requests

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

Response

{
  "id": 261,
  "fromUserId": 159,
  "toUserId": 32,
  "invoiceNumber": "INV-2024-0261",
  "status": "sent",
  "issuedAt": "2024-11-29T06:08:31.066Z",
  "dueAt": "2025-01-09T06:08:31.066Z",
  "paidAt": null,
  "subtotal": 19759.92,
  "tax": 3951.98,
  "total": 23711.9,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Data analysis",
      "quantity": 28,
      "unitPrice": 262.99,
      "lineTotal": 7363.72
    },
    {
      "description": "Implementation services",
      "quantity": 14,
      "unitPrice": 487.84,
      "lineTotal": 6829.76
    },
    {
      "description": "Technical support",
      "quantity": 6,
      "unitPrice": 163.34,
      "lineTotal": 980.04
    },
    {
      "description": "Marketing services",
      "quantity": 36,
      "unitPrice": 127.4,
      "lineTotal": 4586.4
    }
  ],
  "createdAt": "2024-11-28T11:57:54.678Z"
}