Knowledge Center

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

Create Accounting Period

This reference describes how to create 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

  • When creating the first accounting period on your tenant, 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.

Request

  • Production: POST https://api.zuora.com/rest/v1/accounting-periods
  • API Sandbox: POST https://apisandbox-api.zuora.com/rest/v1/accounting-periods

Request Header Fields

Specify the following field in the request header.

Accept

optional

Optionally specify application/json. Only JSON is returned.

Request Body Fields

Specify the following fields in the body of the request.

name

required

Name of the accounting period.

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

startDate

required

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

endDate

required

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

fiscalYear

required

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>

conditional

Custom fields you have configured for the accounting period object. If you have configured any required custom fields then you must specify them in the call.

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

POST https://apisandbox-api.zuora.com/rest/v1/accounting-periods

{
    "name": "Jun 2016",
    "startDate": "2016-06-01",
    "endDate": "2016-06-30",
    "fiscalYear": 2016,
    "notes": "optional notes here"
}

Example Response

{
    "id": "7b7181ae547aac1e01547efb61f20162", 
    "success": true
}
Last modified
21:44, 7 Jul 2016

Tags

Classifications

(not set)