Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Desigining the new GoCardless API
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Harry Marr
August 13, 2014
Technology
170
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Desigining the new GoCardless API
Harry Marr
August 13, 2014
More Decks by Harry Marr
See All by Harry Marr
Build your own Heroku
hmarr
1
130
CodeCube: Runnable Gists
hmarr
1
200
Other Decks in Technology
See All in Technology
作品が生態系になった ─ Mini Tokyo 3D から世界へ
nagix
0
150
2026-09-09 【sigma_ucj#1】Sigma を IaC 管理したい! / IaC for Sigma
civitaspo
0
100
TinyGo 開発サイクルを高速化する:Go で作るエミュレータ入門
zozotech
PRO
1
370
The Agent Builder Loop from Daily Work to OSS
minorun365
PRO
3
120
Microsoft 365 Copilot chat -tekoälypalvelun tietosuojaongelmat
hponka
0
580
コスト最適化の「めんどくさい」を AWS FinOps Agent でチョット楽にする
classmethod_kaz
0
290
Where Is JetBrains AI Heading- — Central CLI, Air Alpha, and the Agentic Development Stack
x5gtrn
PRO
0
150
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
120
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
1
290
Sigmaユーザーのための有用リソース一挙公開 & Sigmaで使えるMCP #sigma_ucj /useful-resources-for-sigma-computing-users-and-mcps-with-sigma
shinyaa31
0
170
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
340
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
300
Featured
See All Featured
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
450
Faster Mobile Websites
deanohume
310
32k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
410
The Spectacular Lies of Maps
axbom
PRO
1
980
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
230
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
Fireside Chat
paigeccino
42
4k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
57k
Thoughts on Productivity
jonyablonski
76
5.4k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
680
First, design no harm
axbom
PRO
2
1.3k
sira's awesome portfolio website redesign presentation
elsirapls
0
410
Transcript
Designing the new GoCardless API Harry Marr and Philip Harrison
None
GrouPAY API
GrAPI
None
1. Agile API development 2. Build your framework 3. Prepare
for change
HOW TO BUILD PRODUCTS
None
None
None
None
Work out what people want Build it
Work out what people want Build it Work out what
people really want
Work out what people want Build it Work out what
people really want
HOW TO BUILD APIS
Work out what people want Build it
Work out what people want Build it Work out what
people really want
Work out what people want Build it Work out what
people really want Uh oh!
Changing a product is easy Changing your API is hard
1. Agile API development 2. Build your framework 3. Prepare
for change
MAKING IT LAST
• Content Type • Document/url structure • TLS/SSL • Pagination
• Rate-limiting • Errors
CONTENT TYPE
{ "payment": { "xmlns": "urn:ns:payment", "amount": { "$t": 20000 },
"metadata": { "type": "metadata", "xmlns": "urn:ns:metadata", "description": { "$t": "Rent" } } } }
{ "payment": { "amount": 20000, "metadata": { "description": "Rent" }
} } https://www.mnot.net/blog/2012/04/13/json_or_xml_just_decide
DOCUMENT/URL STRUCTURE
{ "linked": { "author": { "id": "12" } }, "posts":
[{ "id": "1", "title": "API", "links": { "author": "12" } }] } http://jsonapi.org/format/
/customers/1/bank_accounts/2/mandates/1 Don’t map database relations to urls
/mandates?bank_account=2 /customer_bank_accounts?customer=1 Flexible relationships
TLS/SSL All traffic including web hooks https://istlsfastyet.com/
PAGINATION
/payments { "meta": { "cursors": { "after": "abcd1234", "before": "wxyz0987"
}, "limit": 50 }, "payments": [{ ... }] } /payments?limit=50&after=abcd1234
RATE-LIMITING
X-Rate-Limit-Limit: 5000 X-Rate-Limit-Remaining: 0 X-Rate-Limit-Reset: Thu, 01 May 2014 16:00:00
GMT Content-Type: application/json; charset=utf-8 Connection: keep-alive Retry-After: Thu, 01 May 2014 16:00:00 GMT
ERRORS
{ "error": { "documentation_url": “https://errors", "id": “ERROR_ID”, "type": "validation_failed”, "code":
422, "errors": [{ "field": "account_number", "type": "missing_field", "message": "is required" }] } }
GoCardless API design https://github.com/gocardless/http-api-design
1. Agile API development 2. Build your framework 3. Prepare
for change
Work out what people want Build it Work out what
people really want Uh oh!
Work out what people want Build it Work out what
people really want
✓ Adding resources ✓ Adding attributes ✗ Removing attributes ✗
Changing attributes ✗ Removing resources ✗ Changing behaviour
/v1
/v1
v1
2014-08-13
/2014-08-13
2014-08-13
You are currently using version 2014-‐05-‐12. ! Click here
to view all changes since 2014-‐05-‐12. To:
[email protected]
From:
[email protected]
GoCardless API Update Available
In summary, • Developing an API is hard • Think
about what you can’t change • And plan for incremental updates
QUESTIONS? ! @harrymarr @harrisonphilip