Skip to main content
POST
Complete a subscription milestone

Authorizations

X-SALESBRICKS-KEY
string
header
required

API key for authentication

Path Parameters

milestone_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$
subscription_id
string
required
Pattern: ^([a-zA-Z\d\-]+)$

Body

Input serializer for completing a milestone.

quantity
integer
required

How much of the milestone to complete. May not take the completed total past the milestone's total_quantity.

Required range: x >= 1
bill_on
enum<string>
required

When the completion bills. IMMEDIATELY raises a standalone invoice for the milestone and issues it now. NEXT_INVOICE adds it to the subscription's next scheduled invoice, and is rejected when there is no invoice left to defer onto.

  • IMMEDIATELY - Immediately
  • NEXT_INVOICE - Next invoice
Available options:
IMMEDIATELY,
NEXT_INVOICE
issued_at
string<date> | null

Issue date for the new invoice. Defaults to today; a future date leaves the invoice to be issued by the scheduled sweep. Only valid with bill_on: IMMEDIATELY.

due_at
string<date> | null

Due date for the new invoice. Defaults to the order's payment terms, and may not precede issued_at. Only valid when bill_on is IMMEDIATELY.

service_date
string<date> | null

The date the work was delivered. The new invoice's service period starts and ends on this day — it is a single date, not a range. Defaults to today, and may be backdated independently of issued_at. Only valid when bill_on is IMMEDIATELY.

Response

Output serializer for a milestone completion.

completion
object
required

The completion that was recorded.

milestone
object
required

The milestone's state after the completion.