PayrollCalendars


Overview

URL https://api.xero.com/payroll.xro/1.0/PayrollCalendars
Methods Supported POST, GET
Description Allows you to retrieve and add Payroll Calendars in a Xero organisation

Elements for PayrollCalendars

The following are required to create a new payroll calendar
Name Name of the Payroll Calendar (max length = 100)
CalendarType See Payroll Calendar types
StartDate The start date for the first pay period you will process. The end date will be calculated based upon this date, and the calendar type selected (YYYY-MM-DD)
PaymentDate The date on which employees will be paid for the first pay period (YYYY-MM-DD)

GET PayrollCalendars

Optional parameters

Record filter You can specify an individual record by appending the value to the endpoint, i.e.
GET https://…/PayrollCalendars/{identifier}
EmployeeID The Xero identifier for a Payroll Calendar
e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
Modified After The ModifiedAfter filter is actually an HTTP header: ‘If-Modified-Since‘.
A UTC timestamp (yyyy-mm-ddThh:mm:ss) . Only payroll calendars created or modified since this timestamp will be returned e.g. 2009-11-12T00:00:00
page By default the number of records returned per call is 100. You can add GET https://…/PayrollCalendars?page=2 to get the next set of records.
Where Filter by an any element (see Filters)
order Order by any element returned (see Order By)

Example response for GET PayrollCalendars/{identifier}

<PayrollCalendars>
   <PayrollCalendar>
     <CalendarType>WEEKLY</CalendarType>
     <Name>Weekly Calendar</Name>
     <PaymentDate>2012-05-20T00:00:00Z</PaymentDate>
     <PayrollCalendarID>bfac31bd-ea62-4fc8-a5e7-7965d9504b15</PayrollCalendarID>
     <StartDate>2012-05-13T00:00:00</StartDate>
   </PayrollCalendar>
</PayrollCalendars>

Example response for GET PayrollCalendars

<PayrollCalendars>
  <PayrollCalendar>
    <CalendarType>FORTNIGHTLY</CalendarType>
    <Name>Fortnightly Calendar</Name>
    <PaymentDate>2012-08-17T00:00:00Z</PaymentDate>
    <PayrollCalendarID>a17394fe-fa23-4d4a-8e2f-a19217bc6b4f</PayrollCalendarID>
    <StartDate>2012-08-01T00:00:00</StartDate>
  </PayrollCalendar>
  <PayrollCalendar>
    <CalendarType>WEEKLY</CalendarType>
    <Name>Weekly Calendar</Name>
    <PaymentDate>2012-05-20T00:00:00Z</PaymentDate>
    <PayrollCalendarID>bfac31bd-ea62-4fc8-a5e7-7965d9504b15</PayrollCalendarID>
    <StartDate>2012-05-13T00:00:00</StartDate>
  </PayrollCalendar>
  <PayrollCalendar>
    <CalendarType>WEEKLY</CalendarType>
    <Name>What</Name>
    <PaymentDate>2012-11-16T00:00:00Z</PaymentDate>
    <PayrollCalendarID>49713875-ad73-492c-b6ac-2d265a5fe862</PayrollCalendarID>
    <StartDate>2012-11-08T00:00:00</StartDate>
  </PayrollCalendar>
</PayrollCalendars>

POST PayrollCalendars

Use this method to create one or more payroll calendar in payroll.

<PayrollCalendars>
  <PayrollCalendar>
    <CalendarType>WEEKLY</CalendarType>
    <Name>NEW CALENDAR</Name>
    <PaymentDate>2012-11-21</PaymentDate>
    <StartDate>2012-11-13</StartDate>
  </PayrollCalendar>
</PayrollCalendars>