Use this call to get the current fiscal year with the start and end date from the model calendar.
This helps external systems align their time references with the model’s fiscal calendar before exchanging or validating data.
The value of the start and end dates is determined by the calendar type set in the model. This value isn't always in a range from Jan. 1 to Dec. 31. The API returns an empty value if the calendar type doesn't have an available fiscal year, for example, Weeks General.
Note: To use this call, you must be a Workspace Administrator.
Method and endpoint
/workspaces/{workspaceId}/models/{modelId}/modelCalendar
Parameters
| Parameter | Details |
{workspaceId} |
|
{modelId} |
|
Curl example
curl -X GET 'https://api.anaplan.com/2/0/workspaces/{workspaceId}/models/{modelId}/modelCalendar' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Accept: application/json'
Response
Response headers
Content-Type: application/json
Response 200 body
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/modelCalendar"
},
"status": {
"code": 200,
"message": "Success"
},
"modelCalendar": {
"fiscalYear": {
"year": "FY21",
"startDate": "2021-01-01",
"endDate": "2021-12-31"
}
}
}
Example 1: Calendar Type: weeks 4-4-5,4-5-4 or 5-4-4
Model Calendar
In Anaplan, the Current fiscal year in the Model Calendar is set to FY21: 29 Mar. 2020–27 Mar. 2021.
Response
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/modelCalendar"
},
"status": {
"code": 200,
"message": "Success"
},
"modelCalendar": {
"calendarType": "Calendar Months/Quarters/Years",
"fiscalYear": {
"year": "FY21",
"startDate": "2020-03-29",
"endDate": "2021-03-27"
},
"pastYearsCount": 0,
"futureYearsCount": 0,
"currentPeriod": {
"periodText": "",
"lastDay": ""
},
"totalsSelection": {
"quarterTotals": true,
"halfYearTotals": false,
"yearToDateSummary": false,
"yearToGoSummary": false,
"totalOfAllPeriods": false
}
}
}
Example 2: Calendar Type: Weeks general
Model Calendar
In Anaplan, the Calendar Type in the Model Calendar is set to weeks general.
Response
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/modelCalendar"
},
"status": {
"code": 200,
"message": "Success"
},
"modelCalendar": {}
}