Credit Balance API. Need to find out your credit balance on your pre-paid account? This API allows you to do just that and stay on top of SMS marketing for your target audience. No more guess work! This API keeps you confident!
Example : Show All Users
- Note: try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple.)
- Note: Also add additional info here such as a description, if need be.
URL
/users
or /users/:id
or /users?id=:id
- For fixed urls: /users or /photos
- For urls with parameters in them: /users/:id or /photos/:photo_id or /users?id=:id
METHOD
GET
| POST
| DELETE
| PUT
URL PARAMS
Required:
id=[integer]
example: id=12
Optional
photo_id=[alphanumeric]
example: photo_id=2345kj3
DATA PARAMS
Example:
{u : { email : [string], name : [string], current_password : [alphanumeric] password : [alphanumeric], password_confirmation : [alphanumeric]}}
Example:
{u : { email : "john@smith.com", name : "John", current_password : "apassw0rd" password : "anewpassw0rd", password_confirmation : "anewpassw0rd"}}
SUCCESS RESPONSE
Example:
Code: 200
Content: { id : 12 }
ERROR RESPONSE
Example:
Code: 401 UNAUTHORIZED
Content: { error : "Log in" }
OR
Code: 422 Unprocessable Entry
Content: { error : "Email invalid" }
SAMPLE CALL
$.ajax({url: "/users", dataType: "json", data : {u: {id : 12, email : "john@smith.com"}}, type : "PUT", success : function(r) {console.log(r);}});
NOTES