The following is an example of documentation to support a fictional API integration:
Breakfast Burrito Integration API
The Breakfast Burrito Integration API consists of the following single endpoint:
GET /api/web/v5/Breakfast_Burrito_Integration_API
In response to GET, POST, PUT, and DELETE methods, the API is able to perform the following actions:
- Retrieve all ingredients for a breakfast burrito.
- Retrieve a single ingredient for a breakfast burrito.
- Create an ingredient for a breakfast burrito.
- Update a specific ingredient.
- Remove a specific ingredient.
Note: Each request must contain a unique API key for the breakfast burrito that is being updated, which can be found at the bottom of the Admin page for the breakfast burrito.
Note: POST and PUT requests may be based via the URL as a JSON, with content type application/JSON in the header.
Retrieve All Ingredients for a Breakfast Burrito
GET /api/web/v5/Breakfast_Burrito_Integration_API
Note: For the action to function properly, each ingredient must have initially been created within the Food Truck system and have utilized the Breakfast Burrito Integration API to push the data to the appropriate breakfast burrito.
Parameters
api_key (required)– String – The API key for the Breakfast Burrito. Example:
25642887525812efbhdf56231
Sample Request
http://api.breakfastburritos.com/api/web/v5/Breakfast_Burrito_Integration_API_items/25642887525812efbhdf56231
Response
{
"resultCount":1,
"results": [
{"wrapperType":"artist", "artistType":"Artist", "artistName":"Breakfast Burrito", "artistLinkUrl":"https://breakfastburrito.com/us/artist/breakfast-burrito/909253?uo=4", "artistId":909253, "amgArtistId":468749, "primaryGenreName":"Rock", "primaryGenreId":21}]
}