Knowledge Center

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

Update Accounting Period

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

Prerequisites

  • You must have Z-Finance enabled on your tenant.
  • You must have the Create Accounting Period user permission. See Z-Finance Roles.

Limitations

  • You can update the start date of only the earliest accounting period on your tenant. You cannot update the start date of later periods.
  • If you update the earliest accounting period, the start date must be equal to or earlier than the date of the earliest transaction on the tenant.
  • Start and end dates of accounting periods must be contiguous. For example, if one accounting period ends on January 31, the next period must start on February 1.
  • If you have the Revenue Recognition Package and have enabled the "Monthly recognition over time" revenue recognition model, the accounting period start date and end date must be on the first day and last day of the month, respectively. Note that the start and end dates do not necessarily have to be in the same month.
  • You cannot update the start date or end date of an accounting period if:
    • Any revenue has been distributed into the period.
    • The period has any active journal entries.

Request

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

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 update.

Request Body Fields

Specify the following fields in the body of the request. Specify only the fields you want to update.

name

optional

Name of the accounting period.

Accounting period name must be unique. Maximum of 100 characters.

startDate

optional

The start date of the accounting period in yyyy-mm-dd format, for example, " 2016-02-19".

endDate

optional

The end date of the accounting period in yyyy-mm-dd format, for example, "2016-02-19".

fiscalYear

optional

Fiscal year of the accounting period in yyyy format, for example, "2016".

notes

optional

Notes about the accounting period.

Maximum of 255 characters.

<custom fields>

optional

Custom fields you have configured for the accounting period object.

You must use the API Name of the custom field.

Response

Response Body Fields

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

id

ID of the newly-created accounting period.

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

{
    "name":"Jan 2016",
    "startDate":"2016-01-01",
    "endDate":"2016-01-31",
    "fiscalYear":2016
}

Example Response

{
    "success": true
}
Last modified

Tags

Classifications

(not set)