Tasks
Tasks
Monthly Billing Cycle
M-1 + M-4: monthly invoice generation with weekend/holiday adjustment.
BILLING_RULES.md Section 3:
- Invoice date: 26th of M+1 calendar-basis
- Weekend/holiday adjustment: next business day
The Cloud Scheduler job runs DAILY (cron under our control). Each run:
- Calls invoice_date_for_billing_cycle(today) to decide whether today is the canonical invoice date (M-4 logic encapsulated there).
- If not the invoice day, no-ops and returns success.
- If it IS the invoice day, calls InvoiceGenerator.generate_monthly_invoices(today).
Idempotent: the generator skips any attribution row already invoiced. Two firings on the same canonical day will not double-charge.
post/api/tasks/monthly-billing-cycle
Request
- Base URLhttps://api.primetime.media (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
x-cloudscheduler-secretstring nullable
x-scheduler-secretstring nullable
authorizationstring nullable
Response
Successful Response
unknown required
Changes
No recorded changes to this operation across all 5 revisions of this API.