Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > SDKs >

xero-php-oauth2 -> Payroll AU API createTimesheet example error

Started by Matthew Jones -   in SDKs

Hi All,

I am currently converting existing Private OAuth1 App to use the new OAuth2 Custom Connection App.

I have most of my code converted, but I am having problems trying to Create a Timesheet entry for the Payroll AU API (PHP), using the following example.


This code is provided by the developer community - Xero does not warrant it in any way

I have added comments to the above Git Gist showing the Xero Api History Request Body and the Response Body, which can be viewed using this link

The example is returning
an Error occurred during JSON de/serialization. Cannot deserialize the current JSON object

It looks like something is not happy with the EmployeeID, however I am unsure how to rectify this.

Anyone have any ideas ?

It looks like the Xero Endpoint requires a JSON array of Payroll AU timesheets to be submitted.

However I cant see any methods in the Payroll AU API (PHP) that allow for sending an array of timesheets.

Anyone have any ideas ?

Matthew Jones