Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Accounting Periods > Close Accounting Period

Close Accounting Period

This reference describes how to close an accounting period through the REST API.

Prerequisites

  • You must have Z-Finance enabled on your tenant.
  • You must have the Manage Close Process and Run Trial Balance user permissions. See Z-Finance Roles.

Limitations

  • The accounting period cannot already be closed.
  • The accounting period cannot be in the process of running a trial balance.
  • All earlier accounting periods must be closed.
  • There must be no required action items for the accounting period. See Reconcile Transactions Before Closing an Accounting Period for more information.

Request

  • Production: PUT https://api.zuora.com/rest/v1/accounting-periods/{ap-id}/close
  • API Sandbox: PUT https://apisandbox-api.zuora.com/rest/v1/accounting-periods/{ap-id}/close

Request Header Fields

Specify the following field in the request header.

Accept

optional

Optionally specify application/json. Only JSON is returned.

Request Path Fields

Specify the following field in the path of the request URL.

ap-id

required

ID of the accounting period you want to close.

Response

When you close an accounting period in Zuora, a trial balance is automatically run for that period. A response of { "success": true } means only that the accounting period is now closed, but does not mean that the trial balance has successfully completed. You can use the Get Accounting Period REST API call to view details about the outcome of the trial balance.

Response Body Fields

The following fields are returned in the body of the response.

success

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

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

Example Request

PUT https://apisandbox-api.zuora.com/rest/v1/accounting-periods/7b7181ae547aac1e01547efb61f20162/close

Example Response

{
    "success": true
}
Last modified
22:03, 25 May 2016

Tags

Classifications

(not set)