---
title: "Generate Invoice From Term Route"
method: POST
path: "/api/finance/invoices/generate-from-term"
tags: ["finance"]
---

# Generate Invoice From Term Route

`POST /api/finance/invoices/generate-from-term`

## Request

- Base URL: `https://api.pigeonly.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pigeonly.com/api/finance/invoices/generate-from-term`
- Auth: none declared

/invoices/new. v1's POST /invoices/generate-from-contract, mapped
onto a term line (routes.py module docstring).

## Request body

- GenerateFromTermRequest: /invoices/new — the contract-driven creation screen. v1's POST /generate-from-contract mapped onto a term line: `term_id` is the line the picker resolved as covering the chosen invoice_date; every dollar is derived from it server-side (service.generate_invoice_from_term).
  - `term_id` string, uuid, required
  - `invoice_date` string, date, required
  - `piece_count` integer, nullable

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os.md) - [All operations](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/llms.txt) - [OpenAPI document](https://skmtc.dev/pigeonly/apis/roost-v2-pigeonly-company-os/revisions/14571c4b7007?raw)
