Preview Payment Schedule
POST /quotes/payment-schedule
What a set of line items would bill, and when. Arithmetic over the body.
Authorizations
Parameters
Header Parameters
Request Body required
Compute the payment schedule a set of line items WOULD produce.
Reads nothing and writes nothing - it is arithmetic over the body, which
is why it is POST but tiered read.
object
ISO date the contract starts.
One priced line, mirroring the app’s LineItemDTO.
The two REQUIRED fields are required here too, and that is the point: the
app model is built inside the handler, so a missing product_name or
unit_amount would raise a bare pydantic.ValidationError there - not the
RequestValidationError error_handlers.py registers - and escape as a
500 instead of a 422.
unit_amount is in CENTS, like the app. An API that took dollars here
while the app took cents would be wrong by a factor of a hundred on every
quote, silently.
CLOSED (extra="forbid"), which makes this stricter than the app on
purpose. LineItemDTO uses pydantic’s default behaviour and DROPS an
unrecognised field, so an open model here would accept a pricing field,
lose it on the way in, and return a schedule computed without it. On a
money surface a 422 naming the field is worth more than a 200 that quietly
priced something else. Nothing existing is affected - this route is new.
object
CENTS, not dollars.
Responses
200
Successful Response
object
An open envelope for a quote, template, contact or job result.
object
422
Validation Error