This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with Pay Items in Xero

The getPayItems operation retrieves details of one or more payroll items.

getPayItems
<xero.getPayItems>
    <order>{$ctx:order}</order>
    <page>{$ctx:page}</page>
    <modifiedAfter>{$ctx:modifiedAfter}</modifiedAfter>
	<where>{$ctx:where}</where>
</xero.getPayItems>
Properties
  • order: The parameter by which the pay items to be retrieved are sorted.
  • page: The page number of the list of pay items that needs to be retrieved.
  • modifiedAfter: The timestamp after which the pay items are retrieved. If specified, only pay items created or modified after this timestamp will be retrieved. 
  • where: The parameter by which the pay items to be retrieved are filtered.
Sample request

Following is a sample REST/XML request that can be handled by the getPayItems operation.

Sample Request for getPayItems
<getPayItems>
	<consumerKey>IT5UHNVQLNHLYLOBSPOCYLNVSA5PHW</consumerKey>
    <consumerSecret>6PWOUC0VEDYSS2AYZMYFQXOEFIVS4R</consumerSecret>
    <accessToken>QUSMBSLB3NJH0XJ3HJZVQLA9OTJNKY</accessToken>
    <accessTokenSecret>BIFPHUBWUMIQMGLSUW1GQSS2TGN5XZ</accessTokenSecret>
    <acceptType>application/json</acceptType>
    <apiUrl>https://api.xero.com</apiUrl>
    <order></order>
    <page>1</page>
    <modifiedAfter></modifiedAfter>
    <where></where>
</getPayItems>
Related Xero documentation
http://developer.xero.com/documentation/payroll-api-us/pay-items/#GET 

Sample configuration

Following is a sample proxy service that illustrates how to connect to Xero with the init operation and use the getPayItems operation. The sample request for this proxy can be found in getPayItems sample request.

Sample Proxy
<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="xero_getPayItems"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence onError="faultHandlerSeq">
         <property name="consumerKey" expression="//consumerKey/text()"/>
         <property name="accessToken" expression="//accessToken/text()"/>
         <property name="accessTokenSecret" expression="//accessTokenSecret/text()"/>
         <property name="apiUrl" expression="//apiUrl/text()"/>
         <property name="consumerSecret" expression="//consumerSecret/text()"/>
         <property name="order" expression="//order/text()"/>
         <property name="page" expression="//page/text()"/>
         <property name="modifiedAfter" expression="//modifiedAfter/text()"/>
         <property name="where" expression="//where/text()"/>
         <property name="acceptType" expression="//acceptType/text()"/>
         <xero.init>
            <consumerKey>{$ctx:consumerKey}</consumerKey>
            <accessToken>{$ctx:accessToken}</accessToken>
            <accessTokenSecret>{$ctx:accessTokenSecret}</accessTokenSecret>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
            <consumerSecret>{$ctx:consumerSecret}</consumerSecret>
            <acceptType>{$ctx:acceptType}</acceptType>
         </xero.init>
         <xero.getPayItems>
            <order>{$ctx:order}</order>
            <page>{$ctx:page}</page>
            <modifiedAfter>{$ctx:modifiedAfter}</modifiedAfter>
            <where>{$ctx:where}</where>
         </xero.getPayItems>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>