0

I am pretty new to Xero API but have gotten most things working. I am trying to return a list of invoices from a date range. I can do this by using the following url

https://api.xero.com/api.xro/2.0/Invoices?where=Type=="ACCREC" AND Date>=DateTime(2022,12,15) AND Date<=DateTime(2022,12,31)

This works fine and returns the invoices but only returns the summary info (no invoicelines). I know that using the endpoint required you to use pagination to get the all the info from the api but i can't seem to figure out how to add the pagination to this. If i use this

https://api.xero.com/api.xro/2.0/Invoices?where=Type=="ACCREC" AND Date>=DateTime(2022,12,15) AND Date<=DateTime(2022,12,31)?Page=1

it returns an error. What am i doing wrong?

  • 1
    Have also tried https://api.xero.com/api.xro/2.0/Invoices?where=Type=="ACCREC" AND Date>=DateTime(2022,12,15) AND Date<=DateTime(2022,12,31) AND Page=1 – mitaithecat Jul 23 '23 at 16:06

1 Answers1

0

Did you get an error when using

api.xero.com/api.xro/2.0/Invoices?where=Type=="ACCREC" AND Date>=DateTime(2022,12,15) AND Date<=DateTime(2022,12,31) AND Page=1

what error did you get?

Can you try

GET https://api.xero.com/api.xro/2.0/Invoices?where=Date>=DateTime(2022,12,15) AND Date<=DateTime(2022,12,31)&page=1