Knowledge Center

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

Get Accounting Period

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

Prerequisites

You must have Z-Finance enabled on your tenant.

Request

  • Production: GET https://api.zuora.com/rest/v1/accounting-periods/{ap-id}
  • API Sandbox: GET 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 URL path of the request.

ap-id

required

ID of the accounting period you want to get.

Response

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.

id

ID of the accounting period.

name

Name of the accounting period.

startDate

The start date of the accounting period.

endDate

The end date of the accounting period.

status

Status of the accounting period. Possible values:

  • Open
  • PendingClose
  • Closed

runTrialBalanceStatus

Status of the trial balance for the accounting period. Possible values:

  • Pending
  • Processing
  • Completed
  • Error

runTrialBalanceStart

Date and time that the trial balance was run. If the trial balance status is Pending, this field is null.

runTrialBalanceEnd

Date and time that the trial balance was completed. If the trial balance status is Pending, Processing, or Error, this field is null.

runTrialBalanceErrorMessage

If trial balance status is Error, an error message is returned in this field.

fiscalYear

Fiscal year of the accounting period.

notes

Any optional notes about the accounting period.

<custom fields>

Custom fields you have configured for the accounting period object.

The fields use their API Name.

createdOn

Date and time when the accounting period was created.

createdBy

ID of the user who created the accounting period.

updatedOn

Date and time when the accounting period was last updated.

updatedBy

ID of the user who last updated the accounting period.

fileIds

File IDs of the reports available for the accounting period. You can retrieve the reports by specifying the file ID in a Get Files REST API call.

unprocessedChargesFileId

File ID of a report containing all unprocessed charges for the accounting period.

accountsReceivableInvoiceAgingDetailExportFileId

File ID of the Accounts Receivable Aging Invoice Detail report.

accountsReceivableAccountAgingDetailExportFileId

File ID of the Accounts Receivable Aging Account Detail report.

revenueDetailExcelFileId

File ID of the Revenue Detail report in XLSX format.

revenueDetailCsvFileId

File ID of the Revenue Detail report in CSV format.

arRollForwardDetailExportFileId

File ID of the Accounts Receivable Detail report.

fxRealizedGainAndLossDetailExportFileId

File ID of the Realized Gain and Loss Detail report.

Returned only if you have Foreign Currency Conversion enabled.

fxUnrealizedGainAndLossDetailExportFileId

File ID of the Unrealized Gain and Loss Detail report.

Returned only if you have Foreign Currency Conversion enabled.

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

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

Example Response

{
    "id": "e20b074749d2a38b0149eac2e9550aa9",
    "name": "Oct 2014",
    "startDate": "2014-10-01",
    "endDate": "2014-10-31",
    "status": "Closed",
    "runTrialBalanceStatus": "Completed",
    "runTrialBalanceStart": "2015-09-28 00:53:13",
    "runTrialBalanceEnd": "2015-09-28 00:53:36",
    "runTrialBalanceErrorMessage": null,
    "fiscalYear": 2014,
    "notes": "",
    "fileIds": {
        "unprocessedChargesFileId": null,
        "accountsReceivableInvoiceAgingDetailExportFileId": "8a8081ae5002967c015012f122f10913",
        "accountsReceivableAccountAgingDetailExportFileId": "8a8081ae5002967c015012f1230e0914",
        "revenueDetailExcelFileId": "8a8081ae5002967c015012f129870925",
        "revenueDetailCsvFileId": "8a8081ae5002967c015012f129a10926",
        "arRollForwardDetailExportFileId": "8a8081ae5002967c015012f15d7b09e2",
        "fxRealizedGainAndLossDetailExportFileId": "8a8081ae5002967c015012f151a609ba",
        "fxUnrealizedGainAndLossDetailExportFileId": "8a8081ae5002967c015012f150b509b8"
    },
    "createdOn": "2014-11-25 22:21:22",
    "createdBy": "e20b074746ec48f40147140f51e30a1a",
    "updatedOn": "2015-09-28 00:53:13",
    "updatedBy": "e20b074746ec48f40147140f51e30a1a",
    "success": true
}

 

Last modified
22:03, 25 May 2016

Tags

Classifications

(not set)