Creates an ad-hoc bill run or a scheduled bill run.
To use this operation, you must have the Create Bill Runs billing permission.
Restrictions and limitations
When using this operation to create bill runs, keep the following restrictions and limitations in mind:
batches
and cannot specify billRunFilters
.billRunFilters
and cannot specify batches
. Only one single account is allowed.billRunFilters
and cannot specify batches
. All subscriptions must belong to the same account. At most 50 subscriptions are allowed.Pending
status, you cannot use this operation to create any more bill runs.Idempotency-Key | string <= 255 characters Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident. |
Accept-Encoding | string Include the If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a |
Content-Encoding | string Include the |
Authorization | string The value is in the |
Zuora-Track-Id | string <= 64 characters A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon ( |
Zuora-Entity-Ids | string An entity ID. If you have Zuora Multi-entity enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header. |
Zuora-Org-Ids | string Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. If the header is not set, the operation is performed in scope of the user's accessible orgs. |
autoEmail | boolean Default: false Whether to automatically send emails after Auto-Post is complete. Note: To use this field, you must first set the Support Bill Run Auto-Post? billing rule to Yes through the Zuora UI. |
autoPost | boolean Default: false Whether to automatically post the bill run after the bill run is created. Note: To use this field, you must first set the Support Bill Run Auto-Post? billing rule to Yes through the Zuora UI. |
autoRenewal | boolean Default: false Whether to automatically renew auto-renew subscriptions that are up for renewal. |
batches | Array of strings The batch of accounts for this bill run. You can only specify either this field or the Values: Note: By default, you have 50 configurable account batches. To increase the limit to 200 batches, you must have the Performance Booster Elite package. |
billCycleDay | string The day of the bill cycle. This field is only valid if the Values:
|
Array of objects (billRunFilters) The target account or subscriptions for this bill run. You can only specify either this field or the | |
billRunType | string The type of the bill run. If you do not specify any value for this field, the default value is
Values:
|
chargeTypeToExclude | Array of strings The types of the charges to be excluded from the generation of billing documents. You can specify at most two charge types in the array. |
invoiceDate | string <date> The invoice date for the bill run.
Note: You can use one of the following methods to specify the invoice date:
|
invoiceDateMonthOffset | integer The month offset of invoice date for this bill run compared to bill run execution date. Notes:
|
invoiceDateDayOfMonth | integer [ 1 .. 31 ] The day of month of invoice date for this bill run. Specify a day of the month. If you specify 31, even though the month doesn't have 31, for example, February or April, the date recurs on the end day of each scheduled month. Notes:
|
name | string The name of the bill run. |
noEmailForZeroAmountInvoice | boolean Default: false Whether to suppress emails for invoices with zero total amount generated in this bill run after the bill run is complete. It is best practice to not send emails for invoices with zero amount. |
Array of objects The organization(s) that the bill run is created for. For each item in the array, either the This field is only required when you have already turned on Multi-Org feature. | |
object (schedule) Container for information about the scheduled bill run. | |
targetDate | string <date> The target date for this bill run.
|
targetDateMonthOffset | integer The month offset of target date for this bill run compared to bill run execution date. Note: This field is only valid when the |
targetDateDayOfMonth | integer [ 1 .. 31 ] The day of month of target date for this bill run. Specify a day of the month. If you specify 31, even though the month doesn't have 31, for example, February or April, the date recurs on the end day of each scheduled month. Note: This field is only valid when the |
Internal Server Error
Request Errors
{- "autoEmail": false,
- "autoPost": false,
- "autoRenewal": false,
- "billRunFilters": [
- {
- "accountId": "2c9081a03c63c94c013c66688a2c00bf",
- "filterType": "Subscription",
- "subscriptionId": "402882297e387c51017e38a245c313db"
}
], - "chargeTypeToExclude": [
- "OneTime",
- "Usage"
], - "invoiceDate": "2020-02-01",
- "name": "test",
- "noEmailForZeroAmountInvoice": false,
- "targetDate": "2020-02-01"
}
{- "autoEmail": false,
- "autoPost": false,
- "autoRenewal": false,
- "batches": null,
- "billCycleDay": 1,
- "billRunFilters": [
- {
- "accountId": "2c9081a03c63c94c013c66688a2c00bf",
- "filterType": "Subscription",
- "subscriptionId": "402882297e387c51017e38a245c313db"
}
], - "billRunNumber": "BR-00000016",
- "chargeTypeToExclude": [
- "OneTime",
- "Usage"
], - "createdById": "ff808081298c6e5401298c7274a40005",
- "createdDate": "2022-01-24 19:58:27",
- "id": "2c9890077e8a8490017e8bf3a5171a43",
- "invoiceDate": "2020-02-01",
- "invoiceDateOffset": null,
- "name": "test",
- "noEmailForZeroAmountInvoice": false,
- "schedule": null,
- "scheduledExecutionTime": null,
- "status": "Pending",
- "success": true,
- "targetDate": "2020-02-01",
- "targetDateOffset": null,
- "updatedById": "ff808081298c6e5401298c7274a40005",
- "updatedDate": "2022-01-24 19:58:27"
}