example-data.com

invoices / #83

fromUserId
174
toUserId
91
invoiceNumber
INV-2024-0083
status
paid
issuedAt
dueAt
paidAt
subtotal
25867.14
tax
2069.37
total
27936.51
currency
CAD
lineItems
[
  {
    "description": "Maintenance contract",
    "quantity": 5,
    "unitPrice": 168.62,
    "lineTotal": 843.1
  },
  {
    "description": "Photography services",
    "quantity": 19,
    "unitPrice": 302.32,
    "lineTotal": 5744.08
  },
  {
    "description": "Project management",
    "quantity": 2,
    "unitPrice": 401.16,
    "lineTotal": 802.32
  },
  {
    "description": "Research services",
    "quantity": 26,
    "unitPrice": 440.54,
    "lineTotal": 11454.04
  },
  {
    "description": "Research services",
    "quantity": 31,
    "unitPrice": 199.45,
    "lineTotal": 6182.95
  },
  {
    "description": "Marketing services",
    "quantity": 17,
    "unitPrice": 49.45,
    "lineTotal": 840.65
  }
]
createdAt

Component variants

curl -sS \
  "https://example-data.com/api/v1/invoices/83" \
  -H "Accept: application/json"
const res = await fetch(
  "https://example-data.com/api/v1/invoices/83"
);
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/83"
);
const invoice = (await res.json()) as Invoice;
import requests

res = requests.get(
    "https://example-data.com/api/v1/invoices/83"
)
invoice = res.json()
{
  "id": 83,
  "fromUserId": 174,
  "toUserId": 91,
  "invoiceNumber": "INV-2024-0083",
  "status": "paid",
  "issuedAt": "2024-06-05T19:42:12.009Z",
  "dueAt": "2024-06-16T19:42:12.009Z",
  "paidAt": "2024-06-08T12:29:46.881Z",
  "subtotal": 25867.14,
  "tax": 2069.37,
  "total": 27936.51,
  "currency": "CAD",
  "lineItems": [
    {
      "description": "Maintenance contract",
      "quantity": 5,
      "unitPrice": 168.62,
      "lineTotal": 843.1
    },
    {
      "description": "Photography services",
      "quantity": 19,
      "unitPrice": 302.32,
      "lineTotal": 5744.08
    },
    {
      "description": "Project management",
      "quantity": 2,
      "unitPrice": 401.16,
      "lineTotal": 802.32
    },
    {
      "description": "Research services",
      "quantity": 26,
      "unitPrice": 440.54,
      "lineTotal": 11454.04
    },
    {
      "description": "Research services",
      "quantity": 31,
      "unitPrice": 199.45,
      "lineTotal": 6182.95
    },
    {
      "description": "Marketing services",
      "quantity": 17,
      "unitPrice": 49.45,
      "lineTotal": 840.65
    }
  ],
  "createdAt": "2024-06-05T00:46:37.819Z"
}
Draftbit