Dev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityDoc feedbackLog In
GitHubNuGetDev CommunityDoc feedback


**HTTP Verb** – GET

**URL** – /api/v1/budgetcalendars

**Description** – Returns a collection of budget calendar for the current customer

**Base** – HandlerBase\<GetBudgetCalendarCollectionParameter, GetBudgetCalendarCollectionResult>

**Handlers** –

<table class="TableStyle-Borders" style="margin-left: 0; margin-right: auto; width: 100%;" data-cellspacing="0"> <thead> <tr class="header TableStyle-Borders-Head-Header1"> <th class="TableStyle-Borders-HeadE-Regular-Header1">Order</th> <th class="TableStyle-Borders-HeadE-Regular-Header1">Handler</th> <th class="TableStyle-Borders-HeadD-Regular-Header1">Description</th> </tr> </thead> <tbody> <tr class="odd TableStyle-Borders-Body-Row1"> <td class="TableStyle-Borders-BodyE-Regular-Row1">500</td> <td class="TableStyle-Borders-BodyE-Regular-Row1">ValidateContext</td> <td class="TableStyle-Borders-BodyD-Regular-Row1">Checks, if BillTo in site context is not null, otherwise returns error</td> </tr> <tr class="even TableStyle-Borders-Body-Row1"> <td class="TableStyle-Borders-BodyB-Regular-Row1">600</td> <td class="TableStyle-Borders-BodyB-Regular-Row1">GetBudgetCalendarCollection</td> <td class="TableStyle-Borders-BodyA-Regular-Row1">Retrieves all BudgetCalendar`s for BillTo with filtering by FiscalYear parameter or all, if FiscalYear property is not set. Put those calendars into GetBudgetCalendarResults.<br /> If FiscalYear property has value and GetBudgetCalendarResults collection is empty, then create new GetBudgetCalendarResult for FiscalYear property and BillTo.</td> </tr> </tbody> </table>

**HTTP Verb** – PATCH

**URL** – /api/v1/budgetcalendars/{fiscalYear}

**Description** – Updates a single budget calendar by fiscal year and current customer

**Base** – HandlerBase\<UpdateBudgetCalendarParameter, UpdateBudgetCalendarResult>

**Handlers** –

OrderHandlerDescription
500UpdateBudgetCalendarChecks, if BillTo in site context is not null, otherwise returns error. Tries to load BudgetCalendar for current BillTo and FiscalYear from parameter, if not exists  - creates new one and inserts into database. Sets BudgetPeriods and FiscalYearEndDate from parameters.

**HTTP Verb** – GET

**URL** – /api/v1/budgetcalendars/{fiscalYear}

**Description** – Returns a single budget calendar by fiscal year and current customer

**Base** – HandlerBase\<GetBudgetCalendarParameter, GetBudgetCalendarResult>

**Handlers** –

OrderHandlerDescription
500GetBudgetCalendarCalls GetBudgetCalendarCollection for FiscalYear parameter. If GetBudgetCalendarResults count is not equals to 1, then returns not found, otherwise gets first item.