Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Desigining the new GoCardless API
Search
Harry Marr
August 13, 2014
Technology
3
170
Desigining the new GoCardless API
Harry Marr
August 13, 2014
Tweet
Share
More Decks by Harry Marr
See All by Harry Marr
Build your own Heroku
hmarr
1
120
CodeCube: Runnable Gists
hmarr
1
190
Other Decks in Technology
See All in Technology
AWSと生成AIで学ぶ!実行計画の読み解き方とSQLチューニングの実践
yakumo
2
640
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
12k
CodeRabbit CLI + Claude Codeの連携について
oikon48
0
390
AI アクセラレータチップ AWS Trainium/Inferentia に 今こそ入門
yoshimi0227
1
280
20260114_データ横丁 新年LT大会:2026年の抱負
taromatsui_cccmkhd
0
350
旬のブリと旬の技術で楽しむ AI エージェント設計開発レシピ
chack411
1
290
ファインディにおけるフロントエンド技術選定の歴史
puku0x
2
1.5k
SwiftDataを覗き見る
akidon0000
0
290
Exadata Database Service ソフトウェアのアップデートとアップグレードの概要
oracle4engineer
PRO
1
1.2k
Models vs Bounded Contexts for Domain Modularizati...
ewolff
0
210
#22 CA × atmaCup 3rd 1st Place Solution
yumizu
1
220
2026/01/16_実体験から学ぶ 2025年の失敗と対策_Progate Bar
teba_eleven
1
210
Featured
See All Featured
Practical Orchestrator
shlominoach
190
11k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.8k
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.5k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1.1k
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
2.2k
Fireside Chat
paigeccino
41
3.8k
Being A Developer After 40
akosma
91
590k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
What's in a price? How to price your products and services
michaelherold
246
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
390
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