{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"ff19f537-41c6-4d84-ab2d-5a63bac167f5","name":"My Collection","description":"## Cafe API – Student-Friendly Overview\n\nThis collection shows a simple REST API for managing cafes. You can use it to:\n- Browse all cafes\n- Search cafes by location\n- Get a random cafe suggestion\n- Update a cafe’s coffee price\n- Mark a cafe as permanently closed\n\nAll requests in this collection currently use a local server:\n`http://localhost:5000`\n\n---\n\n## Key Endpoints in This Collection\n\n1. **GET /all**  – *List all cafes*\n   - **Request:** `GET http://localhost:5000/all`\n   - **Use it for:** Getting a full list of cafes with details such as name, location, wifi, sockets, and price.\n   - **In this collection:** Request named **\"for all cafes\"**.\n\n2. **GET /search/<location>**  – *Search cafes by area*\n   - **Request example:** `GET http://localhost:5000/search/Peckham`\n   - **Path parameter:**\n     - `location` – the area to search in (e.g., `Peckham`).\n   - **Use it for:** Finding cafes in a specific location.\n   - **In this collection:** Request named **\"Search cafee and location\"**.\n\n3. **GET /random** – *Get one random cafe*\n   - **Request:** `GET http://localhost:5000/random`\n   - **Use it for:** Getting a single random cafe suggestion.\n   - **In this collection:** Request named **\"random one\"**.\n\n4. **PATCH /update-price/<id>?new_price=...** – *Update a cafe’s coffee price*\n   - **Request example:** `PATCH http://localhost:5000/update-price/1?new_price=2.80`\n   - **Path parameter:**\n     - `id` – numeric cafe ID to update.\n   - **Query parameter:**\n     - `new_price` – new coffee price (e.g., `2.80`).\n   - **Use it for:** Editing the price of a cafe’s coffee.\n   - **In this collection:** Request named **\"to update price\"**.\n\n5. **DELETE /report-closed/<id>?api_key=...** – *Mark a cafe as closed*\n   - **Request example:** `DELETE http://localhost:5000/report-closed/5?api_key=supersecretkey123`\n   - **Path parameter:**\n     - `id` – numeric cafe ID to delete/mark closed.\n   - **Query parameter:**\n     - `api_key` – required key that authorizes deletion.\n   - **Use it for:** Removing a cafe that has shut down.\n   - **In this collection:** Request named **\"to delete a cafe\"**.\n\n---\n\n## How to Use This Collection in Postman (Step-by-Step)\n\n1. **Start your API server**\n   - Make sure the backend for this Cafe API is running locally on `http://localhost:5000`.\n\n2. **Send your first request**\n   - Open the **My Collection** collection.\n   - Choose **\"for all cafes\"** (GET `/all`).\n   - Click **Send**.\n   - You should see a JSON array of cafes in the response.\n\n3. **Try searching by location**\n   - Open **\"Search cafee and location\"** (GET `/search/Peckham`).\n   - Change `Peckham` in the URL to another location your API supports, if needed.\n   - Click **Send** to see cafes filtered by that location.\n\n4. **Get a random cafe**\n   - Open **\"random one\"** (GET `/random`).\n   - Click **Send** and inspect the single cafe returned.\n\n5. **Update a cafe’s price (PATCH)**\n   - Open **\"to update price\"** (PATCH `/update-price/<id>`).\n   - Change the `id` in the URL to a valid cafe ID.\n   - Adjust the `new_price` query parameter to the value you want.\n   - Click **Send** and then check `/all` or `/search` to confirm the new price.\n\n6. **Report a cafe as closed (DELETE)**\n   - Open **\"to delete a cafe\"** (DELETE `/report-closed/<id>`).\n   - Change the `id` to the cafe you want to remove.\n   - Ensure the `api_key` query parameter is set to a valid key expected by your server.\n   - Click **Send**, then re-run `/all` to check that the cafe is gone.\n\n---\n\n## Notes for Students\n\n- All examples use a **local server**, so they only work when your API project is running.\n- You can duplicate these requests, change parameters, and observe how the JSON response changes.\n- This collection is a good starting point for learning:\n  - HTTP methods: **GET**, **PATCH**, **DELETE**\n  - Path vs query parameters\n  - Basic API testing with Postman.\n\nYou can extend this API by adding more endpoints (for example, to create a new cafe) and then adding matching requests to this collection.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"52395039","team":13564447,"collectionId":"ff19f537-41c6-4d84-ab2d-5a63bac167f5","publishedId":"2sBXcBo3HV","public":true,"publicUrl":"https://documenter-api.postman.tech/view/52395039/2sBXcBo3HV","privateUrl":"https://go.postman.co/documentation/52395039-ff19f537-41c6-4d84-ab2d-5a63bac167f5","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":"Cafe REST API\n\nThis project provides a RESTful API for managing and querying cafe data.\n\nThe API allows users to:\n• Retrieve all cafes\n• Search cafes by location\n• Get a random cafe suggestion\n• Update coffee price\n• Delete a cafe entry\n\nThe backend is built using Flask and SQLite database and deployed on a cloud serve"},{"name":"title","value":"Cafe REST API Documentation (Flask Backend)"}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.0","publishDate":"2026-02-15T11:18:42.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"Cafe REST API Documentation (Flask Backend)","description":"Cafe REST API\n\nThis project provides a RESTful API for managing and querying cafe data.\n\nThe API allows users to:\n• Retrieve all cafes\n• Search cafes by location\n• Get a random cafe suggestion\n• Update coffee price\n• Delete a cafe entry\n\nThe backend is built using Flask and SQLite database and deployed on a cloud serve"},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/15c2cb9c1e87a54a3b3b1b244d5298a7c31bd7e73d2c5cb4916ee17c905cc3c9","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sBXcBo3HV"}