example-data.com

invoices / #155

fromUserId
127
toUserId
196
invoiceNumber
INV-2024-0155
status
paid
issuedAt
dueAt
paidAt
subtotal
16006.67
tax
1600.67
total
17607.34
currency
AUD
lineItems
[
  {
    "description": "Quality assurance",
    "quantity": 4,
    "unitPrice": 304.1,
    "lineTotal": 1216.4
  },
  {
    "description": "Photography services",
    "quantity": 24,
    "unitPrice": 230.89,
    "lineTotal": 5541.36
  },
  {
    "description": "License fee",
    "quantity": 14,
    "unitPrice": 49.63,
    "lineTotal": 694.82
  },
  {
    "description": "License fee",
    "quantity": 35,
    "unitPrice": 49.32,
    "lineTotal": 1726.2
  },
  {
    "description": "Implementation services",
    "quantity": 22,
    "unitPrice": 288.98,
    "lineTotal": 6357.56
  },
  {
    "description": "Hardware supply",
    "quantity": 7,
    "unitPrice": 67.19,
    "lineTotal": 470.33
  }
]
createdAt

Component variants

curl -sS \
  "https://example-data.com/api/v1/invoices/155" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/invoices/155"
);
const invoice = await res.json();
import type { Invoice } from "https://example-data.com/types/invoices.d.ts";

const res = await fetch(
  "https://example-data.com/api/v1/invoices/155"
);
const invoice = (await res.json()) as Invoice;
import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/155"
)
invoice = res.json()
{
  "id": 155,
  "fromUserId": 127,
  "toUserId": 196,
  "invoiceNumber": "INV-2024-0155",
  "status": "paid",
  "issuedAt": "2024-12-17T08:16:22.966Z",
  "dueAt": "2025-01-02T08:16:22.966Z",
  "paidAt": "2024-12-21T08:37:41.490Z",
  "subtotal": 16006.67,
  "tax": 1600.67,
  "total": 17607.34,
  "currency": "AUD",
  "lineItems": [
    {
      "description": "Quality assurance",
      "quantity": 4,
      "unitPrice": 304.1,
      "lineTotal": 1216.4
    },
    {
      "description": "Photography services",
      "quantity": 24,
      "unitPrice": 230.89,
      "lineTotal": 5541.36
    },
    {
      "description": "License fee",
      "quantity": 14,
      "unitPrice": 49.63,
      "lineTotal": 694.82
    },
    {
      "description": "License fee",
      "quantity": 35,
      "unitPrice": 49.32,
      "lineTotal": 1726.2
    },
    {
      "description": "Implementation services",
      "quantity": 22,
      "unitPrice": 288.98,
      "lineTotal": 6357.56
    },
    {
      "description": "Hardware supply",
      "quantity": 7,
      "unitPrice": 67.19,
      "lineTotal": 470.33
    }
  ],
  "createdAt": "2024-12-16T20:34:08.545Z"
}
Draftbit