Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Journal Runs > Cancel Journal Run

Cancel Journal Run

This reference describes how to cancel a journal run using the REST API.

The summary journal entries in the journal run are canceled asynchronously. See the "Example" section below for details.

You must have the "Cancel Journal Run" Z-Finance user permission enabled to cancel journal runs.

Request

  • Production: PUT https://api.zuora.com/rest/v1/journal-runs/{jr-number}/cancel
  • API Sandbox: PUT https://apisandbox-api.zuora.com/rest/v1/journal-runs/{jr-number}/cancel

Request Header

The Accept request header is optional. Only JSON is returned.

Request Path Fields

jr-number

required

Journal run number. Must be a valid journal run number in the format JR-00000001

You can only cancel a journal run whose status is "Pending", "Error", or "Completed". 

Response

success

Returns true if the request is successful. Otherwise, returns false.

See the "Example" section below for details.

processId

The internal process ID used to assist Zuora support. Returned only if success is false.

reasons

Information describing the reason for the result. Returned only if success is false.

code

An eight-digit numeric error code.

message

A description of the error.

Example

When you cancel a journal run, the summary journal entries associated with that journal run are canceled asynchronously. A response of { "success": true } means only that the specified journal run has a status of "Pending", "Error", or "Completed" and therefore can be canceled, but does not mean that the whole journal run was successfully canceled.

For example, let's say you want to cancel journal run JR-00000075. The journal run status is "Completed" and it contains ten journal entries. One of the journal entries has its Transferred to Accounting status set to "Yes", meaning that the entry cannot be canceled. The workflow might go as follows:

  1. You make an API call to cancel the journal run.
  2. The journal run status is "Completed", so you receive a response of { "success": true }.
  3. Zuora begins asynchronously canceling journal entries associated with the journal run. The journal entry whose Transferred to Accounting status is "Yes" fails to be canceled. The cancelation process continues, and the other journal entries are successfully canceled.
  4. The journal run status remains as "Completed". The status does not change to "Canceled" because the journal run still contains a journey entry that is not canceled.

The example request and response are provided below.

Request

PUT https://api.zuora.com/rest/v1/journal-runs/JR-00000075/cancel

Response

{
    "success": true
}
Last modified
21:51, 13 Mar 2016

Tags

This page has no custom tags.

Classifications

(not set)