Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Endpoints >

Date format not accepted by invoices endpoint when sent from Azure data factory

Started by Josh Pedersen -   in API Endpoints

I am trying to automate the extraction of data from Xero into my azure db, and have set up the authentication flow to get and refresh tokens via the key vault etc.

However when it comes to calling various API's via a web activity, I run into issues if trying to use the "If-Modified-Since" header. The xero endpoint simply returns an error as below

https://i.stack.imgur.com/ogrFw.png

But when I remove the If-Modified-Since header, everything works fine. I have also tested the url in Postman and it works fine.

I have tried multiple date formats, utcnow(), getpastdate(), wrapping it all in a string etc etc, and they all fail. I know it will be something simple, but cant work it out!

Below is the call i am making

{
"url": "https://api.xero.com/api.xro/2.0/Invoices?includeArchived=false&unitdp=2&Page=1",
"method": "GET",
"headers": {
"Authorization": "Bearer xxxx",
"xero-tenant-id": "xxx",
"If-Modified-Since": "2021-06-01"
}
}
Hey Josh,

From what you've put in the post it looks like thats the correct format. If you could please share more details and reach us on api@xero.com we might be able to look further into this.

Thanks
Keertika
 

Keertika Chandola (Community Manager)