SlideShare a Scribd company logo
5 Ways to Make
Your Integration
More Resilient
Jenks Gu
o

DEVELOPER EVANGELIST, XERO
apidays LIVE Jakarta - E5 ways to make your integration more resilient  by Jenks Guo, Xero
apidays LIVE Jakarta - E5 ways to make your integration more resilient  by Jenks Guo, Xero
Jenks Guo
• Software Develope
r

• Developer Evangelist @ Xer
o

• Reviewed many integration
s

• Write technical conten
t

• Build SDK tools
#XD19
Xero app ecosystem
Resilience
• what is resilience?
 

• 5 ways to achieve
resilienc
e

• how to prevent and
deal with failures?
PHOTO BY ZACH REINER ON UNSPLASH
Resilience
The capacity to
recover quickly from
dif
fi
culties; toughness
PHOTO BY ROMAIN VIGNES ON UNSPLASH
Resilienc
e

API INTEGRATION
• Understands
constraint
s

• Improves ef
fi
cienc
y

• Handles errors
 

• Care for users
The ability of an app
to recover from
certain types of
failure and remain
functional from the
customer perspective
PHOTO BY ROMAIN VIGNES ON UNSPLASH
Resilienc
e

API INTEGRATION
∞
API Limits
Everywhere
API calls per month
850m
Users of Xero
API
75k+
Registered apps
30k+
Subscribers
2m+
1st cloud
accounting API
2007
Webhook batches
2.3m
API endpoints available
and growing
40+
Certi
fi
ed app
partners
800+
Delivering
an API
Program 

at Scale
apidays LIVE Jakarta - E5 ways to make your integration more resilient  by Jenks Guo, Xero
5 ways to
improve API
ef
fi
ciency
If-modified-since
Filter
Batching Paging Webhooks
developer.xero.com/documentation/api/invoices#put
x 500
0

API calls
Batching
create & update
things in batches
Paging GET https://api.xero.com/api.xro/
2.0/Invoices
Get all invoices in summary
"LineItems": [],
Get one invoice in great details
"LineItems":
[

{

"Description": "Company car park (month in advance)"
,

"UnitAmount": 135
,

"TaxType": "INPUT"
,

"TaxAmount": 13.5
,

"LineAmount": 135
,

"AccountCode": "449"
,

"Tracking": []
,

"Quantity": 1
,

"LineItemID": "c997b810-
b637-439d-9036-93fd4319011f"
,

"ValidationErrors": [
]

}],
GET https://api.xero.com/api.xro/2.0/Invoices/
243216c5-369e-4056-ac67-05388f86dc81
getting
information in
batches
Paging
Get the 1st 100 invoices with details:
"LineItems":
[

{

"Description": "Company car park (month in advance)"
,

"UnitAmount": 135
,

"TaxType": "INPUT"
,

"TaxAmount": 13.5
,

"LineAmount": 135
,

"AccountCode": "449"
,

"Tracking": []
,

"Quantity": 1
,

"LineItemID": "c997b810-b637-439d-9036-93fd4319011f"
,

"ValidationErrors": [
]

}],
GET https://api.xero.com/api.xro/2.0/Invoices?
page=1
x 100
page=1
x 100
page=2
x 100
page=3
x 23
page=n
getting
information in
batches
Filters
Retrieve all unpaid Invoices against a particular contact?
read all
invoices
GET https://.../Invoices?page=1&ContactIDs=3138017f-8ddc-420e-a159-
e7e1cf9e643d&Statuses=AUTHORISED
check contacts
& status
read each invoice
for details ?
getting
information in a
smart way
If-modi
fi
ed-since
get all invoices process/store invoices
compare al
l

old invoices data
pulling data the
brut force way
If-modi
fi
ed-since
invoices modi
fi
ed
 

since last sync
process/store invoices
pulling data the
smarter wa
y

look out for
“Expires” HTTP
header
Invoices
Contacts
Create / Update events
Your App
Webhooks
the reverse of
API calls
Webhooks
developer.xero.com/documentation/webhooks/overview
It is only a
noti
fi
cation
Webhooks Webhook
An invoice has been paid full
:

Status: Authorised -> Paid
Send GET request for
 

complete invoice details
API
GET
Store payment info and
 

invoice status
Send noti
fi
cation to user
Your App
When things
go wrong…
PHOTO BY SARAH KILIAN ON UNSPLASH
Errors
170 millio
n

4xx & 5xx errors per month
“A clever person solves a problem.


A wise person avoids it.”


Albert Einstein
apidays LIVE Jakarta - E5 ways to make your integration more resilient  by Jenks Guo, Xero
The Good,
Error
Handling
The Good, The Better,
Error
Handling T
e Better,
Error
Handling The Best?
Audit
 

Logs
Noti
fi
cations
API outage
PHOTO BY OZZIE STERN ON UNSPLASH
• decouple your ap
p

• queue your message
s

• implement a retry
policy
De
fi
ne
Recap
How Recover
• Software
integration
resilience
• Respect limit
s

• Improve ef
fi
ciency
• Validation
s

• Error handlin
g

• Outages
Thanks
jenks.guo@xero.com
Contact Follow
api@xero.com
github.com/XeroAPI
@xeroapi
Xero Developer
devblog.xero.com
@JenksGuo
Q & A
xero.com/developer

More Related Content

PDF
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
PPTX
APIs for... Your Mom
PDF
apidays LIVE Paris - Driving innovation through External APIs without putting...
PPTX
API Management Part 1 - An Introduction to Azure API Management
PDF
apidays LIVE Jakarta - What will the next generation of API Portals look like...
PDF
APIdays Singapore 2019 - SDKs and Code Samples - The Cornerstone of API Devel...
PDF
apidays LIVE Paris - Potential of API integrations, common traps and advices ...
PDF
apidays LIVE Paris - Succeeding with API Programs by Kiran Nadgir
apidays LIVE JAKARTA - The modern digital with API Economy Ecosystems by Hari...
APIs for... Your Mom
apidays LIVE Paris - Driving innovation through External APIs without putting...
API Management Part 1 - An Introduction to Azure API Management
apidays LIVE Jakarta - What will the next generation of API Portals look like...
APIdays Singapore 2019 - SDKs and Code Samples - The Cornerstone of API Devel...
apidays LIVE Paris - Potential of API integrations, common traps and advices ...
apidays LIVE Paris - Succeeding with API Programs by Kiran Nadgir

What's hot (20)

PDF
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
PDF
INTERFACE, by apidays - From Monolith to Open Finance with APIs by Marcilio ...
PDF
APIdays Singapore 2019 - Going Global and Crossing Borders with APIs, James C...
PDF
Building an API Platform for Digital Transformation
PDF
Api architectures for the modern enterprise
PDF
apidays LIVE Paris - Drawing the right lines: DDD, APIs and Microservices by ...
PDF
APIdays Zurich 2019 - Digital Ecosystems, fueled by APIs Matthias Biehl, API ...
PDF
apidays LIVE London 2021 - Productization of APIs by Jay Dembani, Avalara
PDF
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...
PDF
apidays LIVE Australia 2021 - Overcoming the 3 Largest Obstacles to Digital T...
PDF
apidays LIVE Hong Kong - The Business of APIs by Jed Ng
PDF
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
PPT
apidays LIVE Helsinki & North - Bye bye to the insurance monolith - case Eule...
PDF
API Management Solution Powerpoint Presentation Slides
PPTX
apidays LIVE LONDON - API Standards and Governance Platform by Nicoleta Stoica
PPTX
apidays LIVE JAKARTA - APIs as Products in payments, telecommunications and D...
PPTX
API Products: Who, What, Where, When, Why, and How?
PPTX
API Strategy Introduction
PPTX
apidays LIVE New York 2021 - API Automation For DevOps at Scale by Rod Cope, ...
PPTX
apidays LIVE India - Open Broking revolution in India by Raghava BS, Angel Br...
apidays LIVE LONDON - Protecting financial-grade APIs - Getting the right API...
INTERFACE, by apidays - From Monolith to Open Finance with APIs by Marcilio ...
APIdays Singapore 2019 - Going Global and Crossing Borders with APIs, James C...
Building an API Platform for Digital Transformation
Api architectures for the modern enterprise
apidays LIVE Paris - Drawing the right lines: DDD, APIs and Microservices by ...
APIdays Zurich 2019 - Digital Ecosystems, fueled by APIs Matthias Biehl, API ...
apidays LIVE London 2021 - Productization of APIs by Jay Dembani, Avalara
Distributed Digital Manufacturing – How APIs are Powering the Next Industrial...
apidays LIVE Australia 2021 - Overcoming the 3 Largest Obstacles to Digital T...
apidays LIVE Hong Kong - The Business of APIs by Jed Ng
apidays LIVE Australia 2021 - Leveraging Async APIs to deliver Cross Domain A...
apidays LIVE Helsinki & North - Bye bye to the insurance monolith - case Eule...
API Management Solution Powerpoint Presentation Slides
apidays LIVE LONDON - API Standards and Governance Platform by Nicoleta Stoica
apidays LIVE JAKARTA - APIs as Products in payments, telecommunications and D...
API Products: Who, What, Where, When, Why, and How?
API Strategy Introduction
apidays LIVE New York 2021 - API Automation For DevOps at Scale by Rod Cope, ...
apidays LIVE India - Open Broking revolution in India by Raghava BS, Angel Br...
Ad

Similar to apidays LIVE Jakarta - E5 ways to make your integration more resilient by Jenks Guo, Xero (20)

PDF
Building towards a Composite API Framework in Salesforce
PPTX
RESTful API - Best Practices
PPTX
Exploring the Salesforce REST API
PPTX
What It Takes to Build API Integrations
PDF
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
PPTX
How to deal with REST API Evolution
PPTX
apidays Helsinki & North 2025 - Vero APIs - Experiences of API development in...
PDF
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
PDF
Enterprise API New Features and Roadmap
PPTX
apidays LIVE Paris 2021 - Inside API delivery Pipeline, the checklist! - Fran...
PDF
REST API Recommendations
PDF
Apidays Paris 2023 - Real-Life REST API Versioning, Alexandre Touret, Worldline
PDF
Cleveland Developers: Technical Debt 10/4
DOCX
PDF
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
PDF
Building RESTful APIs
PPT
RESTful API In Node Js using Express
PDF
Error Handling in APIs Tips to Enhance User Experience and Debugging.pdf
PPTX
CMPT-842-BRACK
PDF
RESTful API in Node.pdf
Building towards a Composite API Framework in Salesforce
RESTful API - Best Practices
Exploring the Salesforce REST API
What It Takes to Build API Integrations
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
How to deal with REST API Evolution
apidays Helsinki & North 2025 - Vero APIs - Experiences of API development in...
Boxcars and Cabooses: When one more XHR is too much - Peter Chittum - Codemot...
Enterprise API New Features and Roadmap
apidays LIVE Paris 2021 - Inside API delivery Pipeline, the checklist! - Fran...
REST API Recommendations
Apidays Paris 2023 - Real-Life REST API Versioning, Alexandre Touret, Worldline
Cleveland Developers: Technical Debt 10/4
Getting Started with API Management – Why It's Needed On-prem and in the Cloud
Building RESTful APIs
RESTful API In Node Js using Express
Error Handling in APIs Tips to Enhance User Experience and Debugging.pdf
CMPT-842-BRACK
RESTful API in Node.pdf
Ad

More from apidays (20)

PDF
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
PDF
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
PDF
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
PDF
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
PDF
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
PDF
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
PDF
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
PDF
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
PDF
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
PPTX
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
PPTX
apidays Munich 2025 - Effectively incorporating API Security into the overall...
PPTX
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
PPTX
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
PPTX
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
PPTX
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
PPTX
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
PDF
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
PDF
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
PDF
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
PDF
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...
apidays Munich 2025 - The Physics of Requirement Sciences Through Application...
apidays Munich 2025 - Developer Portals, API Catalogs, and Marketplaces, Miri...
apidays Munich 2025 - Making Sense of AI-Ready APIs in a Buzzword World, Andr...
apidays Munich 2025 - Integrate Your APIs into the New AI Marketplace, Senthi...
apidays Munich 2025 - The Double Life of the API Product Manager, Emmanuel Pa...
apidays Munich 2025 - Let’s build, debug and test a magic MCP server in Postm...
apidays Munich 2025 - The life-changing magic of great API docs, Jens Fischer...
apidays Munich 2025 - Automating Operations Without Reinventing the Wheel, Ma...
apidays Munich 2025 - Geospatial Artificial Intelligence (GeoAI) with OGC API...
apidays Munich 2025 - GraphQL 101: I won't REST, until you GraphQL, Surbhi Si...
apidays Munich 2025 - Effectively incorporating API Security into the overall...
apidays Munich 2025 - Federated API Management and Governance, Vince Baker (D...
apidays Munich 2025 - Agentic AI: A Friend or Foe?, Merja Kajava (Aavista Oy)
apidays Munich 2025 - Streamline & Secure LLM Traffic with APISIX AI Gateway ...
apidays Munich 2025 - Building Telco-Aware Apps with Open Gateway APIs, Subhr...
apidays Munich 2025 - Building an AWS Serverless Application with Terraform, ...
apidays Helsinki & North 2025 - REST in Peace? Hunting the Dominant Design fo...
apidays Helsinki & North 2025 - Monetizing AI APIs: The New API Economy, Alla...
apidays Helsinki & North 2025 - How (not) to run a Graphql Stewardship Group,...
apidays Helsinki & North 2025 - APIs in the healthcare sector: hospitals inte...

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPT
Teaching material agriculture food technology
PDF
cuic standard and advanced reporting.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
Modernizing your data center with Dell and AMD
Building Integrated photovoltaic BIPV_UPV.pdf
Teaching material agriculture food technology
cuic standard and advanced reporting.pdf
Spectral efficient network and resource selection model in 5G networks
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf
MYSQL Presentation for SQL database connectivity
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Big Data Technologies - Introduction.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
The Rise and Fall of 3GPP – Time for a Sabbatical?
Understanding_Digital_Forensics_Presentation.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Mobile App Security Testing_ A Comprehensive Guide.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication

apidays LIVE Jakarta - E5 ways to make your integration more resilient by Jenks Guo, Xero