PaySchedules


Overview

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

Elements for PaySchedules

The following are required to create a new pay schedule
PayScheduleName Name of the Pay Schedule
PaymentDate The Payment Date of the Pay Schedule
StartDate The Start Date of the Pay Schedule
ScheduleType The ScheduleType defines the frequency in which an employee gets paid
The following are optional to create a new pay schedule
PayScheduleId Xero Identifier

GET PaySchedules

Optional parameters

Record filter You can specify an individual record by appending the value to the endpoint, i.e.
GET https://…/PaySchedule/{identifier}
PayScheduleID The Xero identifier for a Pay Schedule
e.g. 297c2dc5-cc47-4afd-8ec8-74990b8761e9
You can get all pay schedules by just calling the endpoint.
GET https://…/PaySchedules
Modified After The ModifiedAfter filter is actually an HTTP header: ‘If-Modified-Since‘.
A UTC timestamp (yyyy-mm-ddThh:mm:ss) . Only pay schedules 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://…/PaySchedules?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 PaySchedules/{identifier}

<PaySchedules>
    <PaySchedule>
      <PayScheduleID>3f29f8e1-e4aa-4d2b-a946-393b5269ef62</PayScheduleID>
      <PayScheduleName>Monthly</PayScheduleName>
      <ScheduleType>MONTHLY</ScheduleType>
      <StartDate>2014-03-01T00:00:00</StartDate>
      <PaymentDate>2014-03-24T00:00:00</PaymentDate>
      <UpdatedDateUTC>2014-02-13T00:58:06</UpdatedDateUTC>
    </PaySchedule>
  </PaySchedules>

Example response for GET PaySchedules

<PaySchedules>
    <PaySchedule>
      <PayScheduleID>3f29f8e1-e4aa-4d2b-a946-393b5269ef62</PayScheduleID>
      <PayScheduleName>Monthly</PayScheduleName>
      <ScheduleType>MONTHLY</ScheduleType>
      <StartDate>2014-03-01T00:00:00</StartDate>
      <PaymentDate>2014-03-24T00:00:00</PaymentDate>
      <UpdatedDateUTC>2014-02-13T00:58:06</UpdatedDateUTC>
    </PaySchedule>
    <PaySchedule>
      <PayScheduleID>00a21317-888f-4a26-ad19-03059a49f22d</PayScheduleID>
      <PayScheduleName>NEW SCHEDULE</PayScheduleName>
      <ScheduleType>WEEKLY</ScheduleType>
      <StartDate>2014-02-27T00:00:00</StartDate>
      <PaymentDate>2014-03-07T00:00:00</PaymentDate>
      <UpdatedDateUTC>2014-02-27T03:25:41</UpdatedDateUTC>
    </PaySchedule>
  </PaySchedules>

POST PayScheduless

Use this method to create one or more pay schedule in payroll.

<PaySchedules>
  <PaySchedule>
    <PayScheduleName>NEW SCHEDULE</PayScheduleName>
    <ScheduleType>WEEKLY</ScheduleType>
    <StartDate>2014-02-27T00:00:00</StartDate>
    <PaymentDate>2014-03-07T00:00:00</PaymentDate>
  </PaySchedule>
</PaySchedules>