I have been using Phalcon to develop my web system, and have added to it an API where orders can be sent through and stock numbers can be requested.
I am new to web services, so just wandering, is my API a RESTful API?
- All requests go through http://myurl.com/api.
- All requests have to put an "API-Key" in the header of the request which is used to authenticate.
- If they want to download the stock numbers, they send a "GET" to http://myurl.com/api/stock
- If they want to send an order through, then send a "POST" to http://myurl.com/api/order with a "data" parameter which contains a json_encoded array of the order details.
Returned data is usually a 200 status code with either success or fail (except invalid API keys which return a 401).