Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Payrun Endpoint - Where Clause

Started by Andre Luiz Costantino Botta -   in API Endpoints

Hello,

I am trying to retrieve all the Payrun objects between a specific PaymentDate
and those which the PayRunStatus are equal to 'Posted' using the following
where clause:

PayRunStatus==Posted&&
PaymentDate>=DateTime(2019,08,01)&&
PaymentDate<=DateTime(2019,08,31)

When using the where clause on https://app.xero.com/Preview/payroll/Payruns
I receive a Bad Request error.
However, individually the queries work. If you try each of the following queries,
you will get the right result:

PayRunStatus==Posted
PaymentDate>=DateTime(2019,08,01)&&PaymentDate<=DateTime(2019,08,31)

Only when you combine them together, you get the error.

Am I doing something wrong?

Thank you.
Kind regards.