Desigining the new GoCardless API

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →
Harry Marr
August 13, 2014

Desigining the new GoCardless API

Harry Marr

August 13, 2014

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

50 slides
  1. { "payment": { "xmlns": "urn:ns:payment", "amount": { "$t": 20000 },

    "metadata": { "type": "metadata", "xmlns": "urn:ns:metadata", "description": { "$t": "Rent" } } } }
  2. { "payment": { "amount": 20000, "metadata": { "description": "Rent" }

    } } https://www.mnot.net/blog/2012/04/13/json_or_xml_just_decide
  3. { "linked": { "author": { "id": "12" } }, "posts":

    [{ "id": "1", "title": "API", "links": { "author": "12" } }] } http://jsonapi.org/format/
  4. /payments { "meta": { "cursors": { "after": "abcd1234", "before": "wxyz0987"

    }, "limit": 50 }, "payments": [{ ... }] } /payments?limit=50&after=abcd1234
  5. 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
  6. { "error": { "documentation_url": “https://errors", "id": “ERROR_ID”, "type": "validation_failed”, "code":

    422, "errors": [{ "field": "account_number", "type": "missing_field", "message": "is required" }] } }
  7. ✓ Adding resources ✓ Adding attributes ✗ Removing attributes ✗

    Changing attributes ✗ Removing resources ✗ Changing behaviour
  8. /v1

  9. /v1

  10. v1

  11. 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
  12. In summary, • Developing an API is hard • Think

    about what you can’t change • And plan for incremental updates

More Decks by Harry Marr

Other Decks in Technology