latestOpenAPI 3.1.02026-08-218667571.2 MB

a8ca30023371

Admin APIs
block-s3-invoices

Mark Invoice Ready

Lock one held invoice's applied S3 tokens. Does not send it, and is not what sends it.

The daily pass finalizes and emails every held invoice on its send date, locked or not (PRO-3535). What this changes is who may still alter the applied tokens before then: a locked invoice leaves the client's Next Billing surface, so this is how an operator makes an override stick. To send now, call /send-now, which exists as a separate endpoint precisely because that send cannot be undone.

Outstanding S3 credits are written to Stripe as part of this call, since an override is the usual reason to lock and leaves exactly the state the guard below refuses on. Still refused with 409 invoice_not_ready when a credit write is awaiting confirmation from Stripe, or when writing it here did not succeed — locking over an uncredited invoice would let it go out at full price while the client's tokens are consumed against a discount never given.

post/api/v1/admin/block/s3-invoices/mark-ready

Request body

block_invoice_draft_idstring uuid required

Response

Successful Response

idstring uuid required
stripe_invoice_idstring required
client_idstring uuid required
period_seqinteger nullable
statestring required
send_datestring date-time nullable
edit_window_daysinteger required
approval_overdue_atstring date-time nullable
marked_ready_atstring date-time nullable
marked_ready_bystring nullable
finalized_atstring date-time nullable
sent_atstring date-time nullable
positive_subtotal_centsinteger nullable
tokens_applied_centsinteger nullable
net_centsinteger nullable
manual_override_atstring date-time nullable
manual_override_bystring nullable
manual_override_reasonstring nullable