This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
developers:api:client [2014/10/17 20:28] Jaco van Wyk |
developers:api:client [2014/10/18 07:13] (current) Jaco van Wyk |
||
---|---|---|---|
Line 5: | Line 5: | ||
Retrieve a client by id and return it's details. | Retrieve a client by id and return it's details. | ||
- | <code> | + | <code php> |
$ curl -u user:pass -d "" \ | $ curl -u user:pass -d "" \ | ||
> https://api.snapbill.com/v1/client/158975/get.json | > https://api.snapbill.com/v1/client/158975/get.json | ||
Line 16: | Line 16: | ||
Creates a new client and returns it's details. | Creates a new client and returns it's details. | ||
- | <code> | + | <code php> |
$ curl -u user:pass -d "firstname=jane&email=jane@example.com" \ | $ curl -u user:pass -d "firstname=jane&email=jane@example.com" \ | ||
> https://api.snapbill.com/v1/client/add.json | > https://api.snapbill.com/v1/client/add.json | ||
Line 27: | Line 27: | ||
Updates details about the given client in the database | Updates details about the given client in the database | ||
- | <code> | + | <code php> |
$ curl -u user:pass -d "company=helkom&state=suspended" \ | $ curl -u user:pass -d "company=helkom&state=suspended" \ | ||
> https://api.snapbill.com/v1/client/158975/update.json | > https://api.snapbill.com/v1/client/158975/update.json | ||
Line 105: | Line 105: | ||
The example below updates the payment type to other which requires no extra parameters. | The example below updates the payment type to other which requires no extra parameters. | ||
- | <code> | + | <code php> |
$ curl -u user:pass -d "payment_method_code=other" \ | $ curl -u user:pass -d "payment_method_code=other" \ | ||
> https://api.snapbill.com/v1/client/158975/set_payment.json | > https://api.snapbill.com/v1/client/158975/set_payment.json | ||
Line 116: | Line 116: | ||
Deletes a client from the database | Deletes a client from the database | ||
- | <code> | + | <code php> |
$ curl -u user:pass -d "" \ | $ curl -u user:pass -d "" \ | ||
> https://api.snapbill.com/v1/client/158975/delete.json | > https://api.snapbill.com/v1/client/158975/delete.json |