Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > Wrapper libraries >

How can I send JSON in POST request Xero API PHP

Started by Wasimamjad Wasimamjad -   in Wrapper libraries


I am using this library for xero projects api https://github.com/XeroAPI/XeroOAuth-PHP.
This library is fine for me for GET request.
The issue is Xero Projects API support only json for POST request. But this wrapper does not support json as request.
XML: request data (for PUT and POST operations)

I also checked this wrapper https://github.com/calcinai/xero-php
The problem is this wrapper has not implementation for Xero Projects API.

Can you please help me ASAP.
As it stands we recommend using the https://github.com/calcinai/xero-php library.

The library doesn't currently support making JSON requests. However I can see there is currently a PR to add support for the UK Payroll endpoints, this includes support to make the necessary JSON calls.

Once this has been implemented, you should be able to add models for the other endpoints that require JSON.

Robin Blackstone (Community Manager)