Create a billing report
POST/v1/billing/reports
Creates a billing report for the billing period from startDate to endDate, and calculates its fees in the background, as Run Billing does in the console. Send periodType standard for a standard billing cycle, as Firm-Wide Billing does, or custom for a custom dated billing cycle, as One-Off Billing does. Send householdIds to bill only those households; leave it out to bill every household and account that has a fee structure. Returns the billing report with the status pending and households as []. To see its fees, call Get a billing report until its status is complete.
Request
Responses
- 201
- 400
- 401
- 403
- 409
- 429
The billing report you created.
The request body is invalid, for example startDate or endDate is missing or is not a date, periodType is not standard or custom, or householdIds holds a value that is not a positive whole number.
The access token is missing, invalid, or expired.
The access token does not have the write:billing scope.
A household of your firm is a member of two or more household groups on endDate, so no billing report is created. When you send householdIds, only those households and the other member households of their household groups count. message names each such household and its household groups, and details.householdsInTwoGroups lists them. Correct the membership, then send the request again. No billing report is created either when the payer account of a household group is not among the accounts of that household group in the billing report, or when a household group with a Flat Group Fee fee structure or a billing minimum has no accounts in the billing report. message names each such household group, and its payer account when that is the cause, and details.householdGroups lists them. Change the payer account or the households you send, then send the request again.
Too many requests. Wait the number of seconds in the Retry-After-per-person header (script-audience tokens) or the Retry-After header (other requests) before you retry. See Rate limit.