You can browse it right now. Just click here.
(you'll need to get your own login details first from snapbill.com)
Our API is based on simple RESTful design, however we've taken a whole lot of liberties in order to produce an api interface that is fully accessible straight from your web browser. For more details you can check the REST introduction.
We'll be setting up more later, but for now you can check out our Python API library on Github: snapbill-pyapi
We're still adding content to this site and there is a space here so I'm just filling it with some random text (not really a big fan of that lorem ipsum thing really.)
Add your new client josh
$ curl -u user:pass -d "firstname=josh&email=josh@example.com" \ > https://api.snapbill.com/v1/client/add.json{ "code": 200, "type": "item", "class": "client", "client": { "depth": 0, "id": 126, "xid": "Bad:B-", "state": "new", "number": "091", "name": "josh", "firstname": "josh", "surname": "", "company": "", "email": "josh@example.com", "cell": "", "country": { "code": "ZA", "iso2": "ZA", "iso3": "ZAF", "name": "South Africa" }, "credit": 0, "currency": { "code": "ZAR", "format": "R%.2f", "state": "enabled" }, "payment": "bdb", "payment_method": { "depth": 1, "code": "bdb", "name": "BDB Data" }, "account": { "id": 5789, "xid": "Bad:Bad", "username": "demo" }, "totals": { "unpaid_invoices": 0, "paid_payments": 0 }, "urls": { "statement": "https://demo.snapbill.com/statement/Bad:B-/u9J3mYUSmc1c", "payment": "https://demo.snapbill.com/payment/client/Bad:B-/LwqRg4oMOpvj" }, "services": [] } }
Search for clients named josh
$ curl -u user:pass -d "query=josh" \ > https://api.snapbill.com/v1/client/list.json{ "code": 200, "type": "list", "page": 1, "numpages": 1, "class": "client", "list": [ { "depth": 0, "id": 126, "xid": "Bad:B-", "state": "new", "number": "091", "name": "josh", "firstname": "josh", "surname": "", "company": "", "email": "josh@example.com", "cell": "", "country": { "code": "ZA", "iso2": "ZA", "iso3": "ZAF", "name": "South Africa" }, "credit": 0, "currency": { "code": "ZAR", "format": "R%.2f", "state": "enabled" }, "payment": "bdb", "payment_method": { "depth": 1, "code": "bdb", "name": "BDB Data" }, "account": { "id": 5789, "xid": "Bad:Bad", "username": "debitor" }, "totals": { "unpaid_invoices": 0, "paid_payments": 0 }, "urls": { "statement": "http://debitor.snap/statement/Bad:B-/u9J3mYUSmc1c", "payment": "http://debitor.snap/payment/client/Bad:B-/LwqRg4oMOpvj" }, "services": [] } ] }
Change the clients name to george
$ curl -u user:pass -d "firstname=george" \ > https://api.snapbill.com/v1/client/126/update.json{ "code": 200, "type": "result", "status": "ok" }
Remove the client
$ curl -u user:pass -d "" \ > https://api.snapbill.com/v1/client/126/delete.json{ "code": 200, "type": "result", "status": "ok" }