Notify URL When Stuff Changes in Xero - Webhooks
I'm requesting "web hooks" for the Xero API.
Here's how they work: Customer provides a URL (http://myserver.com/xero/changed) to Xero, and when something is changed, Xero notifies that URL, perhaps indicating which records have changed.
The Xero API provides methods that you can query and compare with previous results to see what has changed. However, this is not performant for large data sets, and detecting changes involves a lot of code.
The competition has it - web hooks are supported by QuickBooks. Let's get them in Xero - it's a superior product in every other way.
Would it be possible for Xero to push changes made within its system to 3rd party systems.
For example if I push an Invoice from procision+ within Microsoft CRM 4.0 to Xero. If someone then changes one of the invoice lines in Xero, Xero then pushes those changes back out to procision+ via a webservice.
Rather than polling the Xero API to see when invoice payments have been made, could Xero call a URL to let another application know when an invoice is paid
- Update April 2016 -
Webhooks is still a hot topic for us in the API team, and we are sorry to say that we are not in a position to deliver them yet. The existing technical architecture does not support it, but some of the changes we require are being worked on so we hope to have some better news in the near future.
To keep your calls efficient while polling, we recommend using “if-modified-since” and paging whenever possible.
Bear with us, webhooks will come but it will take a bit longer than we would like. We are working on getting the necessary background changes in place and will update the community as soon as we have more news to share.
Hu zapier go notifications from xero changes ! That's mean a ray of hope for us ?
Ewen Wallace (CAD bloke) commented
ok, so Zapier go it https://zapier.com/zapbook/xero/ but no us?
Ewen Wallace (CAD bloke) commented
Why does Zapier get some notifications and we don't https://zapier.com/zapbook/xero/
@ Xero - Any news on this?
Come on guys! You can do it!
Jesse Archer commented
Any news on this? Can we expect webhooks this year?
Wilson McCoubrey commented
I would LOVE to see webhooks implemented. For us personally, this would take a lot of pressure off the API quota and be much more efficient. All we need is a notification of when an invoice and/or its line items changes.
Will we see this feature in 2016?
I'd like to second this BIG TIME. We use Slack to coordinate all kinds of things, and getting various notifications out of Xero via Webhooks would be revolutionary because we live inside Slack. This is becoming a "get with the times" requirement.
Eliot Slevin commented
I work for Hoist.io, which is an integration platform to make dealing with apis much easier. With a few previous Xero employees in the team, it’s no surprise that over the last five years we’ve worked with the Xero API extensively, and we've been wanting webhooks just as much as everybody else.
That’s why we’re excited to announce our Xero Connector. Now any developer can subscribe to events from their own Xero accounts, or their users accounts. Never poll for new or updated data again! We're currently open for early access, if you're interested we'd love to talk to you
Matthew Schinckel commented
According to the presentations from Xerocon 2014: webhooks are still not on the agenda until at least _after_ 2015.
Is this going to happen or not? really need this for CRM + Chat room
Plus one for Webhooks
Out of a meeting last week and the other devs are pushing for a platform change due to API limitations, mainly lack the of webhooks in xero.
We need near realtime and without webhooks + the API rate limit, there is no real way to achieve this right now.
Please don't make us deal with Quickbooks.
Since November of last year was the last Admin comment about this, it would be nice to get another update. Any sort of ETA would be very helpful. I am currently developing an app that needs this functionality and I love everything else about Xero but this might be the deal breaker for me. If I know it is coming sometime soon I would be willing to deal with the workarounds for awhile but just need some sort of timeframe so I can make an informed decision. Thanks.
Any ETA? This is kind of critical for proper integration especially with the API limits. Any update would really be great.
One of the big pushes from my company to move services is lack of webhook support.
Is there any update on the ETA for webhooks?
My business is eager to migrate to Xero, but without unnecessary re-development for event notifications at a later stage.
Our use case involves the requirement to send invoice notifications via our own mail infrastructure to improve credibility and deliverability.
AdminXero API (Admin, Xero API) commented
@Chris - why do you need to retrieve each invoice individually? You should be able to do a GET Invoices call to retrieve multiple invoices at once unless you need the line item detail. In addition, you can use the modified-since parameter to only retrieve the changes: http://developer.xero.com/documentation/getting-started/http-requests-and-responses/#title2
All that aside, 18,000 API queries a month is still well inside the average monthly limit of 30,000 (1,000 per day).
That does not mean we should not keep working to make the API more efficient via web hooks etc, just some pointers to keep you going for now. ^RQ
Chris Rutherfurd commented
We are currently in the process of building an in house customer management system to manage all of our customers business with us through a single system, to date we have been using a few dozen. We are currently implementing our link with Xero as one way for creating invoices only and then marking them as paid when the customer pays them but this means that we can not use the web invoice viewer or the invoice payment feature therein because the invoice won't show up as paid in our system unless we query it for an update. Due to the API limits which are set this would be impractical as we are forecasting that within 2 years of our system going into production in our business we would be tracking almost 500 new invoices each month, and some invoices may not be paid for 3-4 months, in addition taking into account that the updates would have to be queries daily so as to ensure our data was up to date, this would mean that conservatively we would be looking at 15'000 API queries per month for new invoices only, and an additional 3'000 queries each month against overdue invoices and invoices with longer terms. Bear in mind that the figure above of 18'000 queries a month is based only on getting payment updates on invoices and not on any other task such as creating a new invoice or marking an invoice as paid if it was paid through one of our other payment sources such as BPay, in store payment, etc.
Web Hooks are definately the way to go, we currently have webhooks into a number of our suppliers to get real time updates when an order we place has a status update, with our freight provider for when a delivery is marked as completed, and with several of our online store systems and online auction systems for when a purchase is placed, an enquiry is made, or an auction is completed.
We do want to use Xero and are currently using it in limited form as we find it to be the best solution for us in accounting, and a far better option than existing solutions such as QuickBooks and MYOB but without webhooks it is of strictly limited value.
Jack Bremer commented
We have a line item "pre paid hours" for clients who wish to obtain an hourly discount by paying in advance. Some require an invoice first, so we invoice them and credit their account with the hours when paid for.
The problem is that reconciling the bank account doesn't give any indication of the contents of an invoice you're reconciling, so these payments against prepaid hours often go amiss - paid for but not credited to their block of hours in our support system.
If we could be alerted of invoices containing that specific line item, when they are marked as paid, that would be excellent. I believe WEBHOOKS will allow this in a far easier fashion than running convoluted API calls to search for possible invoices with no money due, then requerying those to see if the specific line item exists in them, and then alerting us by email if they do, marking it as alerted so it doesn't alert us again in the future.
It would also surely save on the Xero API server resources.
David Bullock commented
STOP! Webhooks are all very well, so long as you can tolerate the possibility of 'missed messages'. A better idea is to provide a 'feed' for each class of logical entity ... where items in the feed are sorted by their 'last modified date', and thus can be queried with a "gimme all the things which have changed since ..." query. The 'webhook' is then a single hook. "Hey, some stuff changed lately in categories X and Z, since the last time you queried them ... better grab the latest stuff". Because this message is issued every time there is a fresh change to stuff, (and possibly on a 'stubborn retry' if the callback doesn't give a 200 response), the impact of missed messages is reduced ... the client can always find the stuff they are after, which has changed since the last timetamp.
It's all in the GData protocol, one way or another (something to reflect on, rather than to copy exactly ... it's multidimensional complexity caused Google to go with a more classic RPC-style interface (for adoption and for ther decreasing quality of their engineers). However, the 'feed of items ordered by last-updated-date' is a cherry worth picking. https://developers.google.com/gdata/docs/2.0/reference#Queries