Posts or cancels a bill run.
Posting a bill run is an asynchronous operation. To post a bill run, the current bill run must have a status of Completed
.
When a bill run is posted, its status is changed to PostInProgress
. Once all invoices for this bill run are posted then its status is changed to Posted
.
When you post a bill run and query the status of a bill run, you will get one of the following results PostInProgress
, Completed
, or Posted
. If all invoices in the bill run are posted, then the status of the bill run is Posted
. If one or more invoices fail to post, the status will change back to Completed
and you will need to post the bill run again.
Canceling a bill run is an asynchronous operation. When canceling a bill run, the logic is the same as when using the UI to cancel a bill run. You need to provide the BillRunId
, and set the Status to Canceled
.
When canceling a bill run, consider the following:
Completed
status.Pending
status.The Cancel operation may not be successful. Its success depends on its current business validation. Only a bill run that has no posted invoices can be canceled. If any posted invoices belong to the bill run then an invalid value exception will be thrown with the message, "The Bill Run cannot be Cancelled, There are Posted invoices."
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-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 do not need to set this header. |
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 ( |
Status required | string The status for this bill run. See Status Types for more information. To cancel a bill run, specify Character limit: 20 Values:
|
InvoiceDate | string <date> The new invoice date of all invoices invloved in the bill run, or the new memo date of all credit memos invloved in the bill run. The date cannot fall in a closed accounting period. This field takes effect only when Note: The Credit and Debit Memos feature is only available if you have Invoice Settlement enabled. The Invoice Settlement feature is generally available as of Zuora Billing Release 296 (March 2021). This feature includes Unapplied Payments, Credit and Debit Memo, and Invoice Item Settlement. If you want to enable Invoice Settlement, see Invoice Settlement Enablement and Checklist Guide for more information. |
{- "Status": "Posted",
- "InvoiceDate": "2020-02-18"
}
{- "Success": true,
- "Id": "2c92c0f959d961e1015a0872b69a7347"
}