Spaces:
Paused
Paused
File size: 7,609 Bytes
21d2ae0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | {
"info": {
"_postman_id": "a8c5d3b1-2d98-4e9f-9b1e-9a1c2b3d4f5e",
"name": "Marine Business Directory API",
"description": "A collection for the Marine Business Directory API defined in `app.py`. This API allows searching for marine-related companies, checking user status, and retrieving system statistics.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Public",
"item": [
{
"name": "Health Check",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/health",
"host": [
"{{baseUrl}}"
],
"path": [
"health"
]
},
"description": "Checks the health of the API. Should return a status of 'healthy'."
},
"response": []
}
]
},
{
"name": "API Endpoints",
"item": [
{
"name": "Get All Categories",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/categories",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"categories"
]
},
"description": "Retrieves a list of all available company categories as an ID: Name mapping."
},
"response": []
},
{
"name": "Get All Locations",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/locations",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"locations"
]
},
"description": "Retrieves a list of all available locations as an ID: Name mapping."
},
"response": []
},
{
"name": "Search Companies",
"item": [
{
"name": "Search by Category and Location",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/search?category_id=1&location_id=1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"search"
],
"query": [
{
"key": "category_id",
"value": "1",
"description": "ID of the category (e.g., '1' for Marinas)."
},
{
"key": "location_id",
"value": "1",
"description": "ID of the location (e.g., '1' for Singapore)."
}
]
},
"description": "Search for companies with the required `category_id` and `location_id` parameters."
},
"response": []
},
{
"name": "Search with a Search Term",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/search?category_id=1&location_id=1&search_term=luxury",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"search"
],
"query": [
{
"key": "category_id",
"value": "1"
},
{
"key": "location_id",
"value": "1"
},
{
"key": "search_term",
"value": "luxury",
"description": "Optional search term to filter by company name, description, or keywords."
}
]
},
"description": "Performs a search including an optional `search_term` to filter results further."
},
"response": []
},
{
"name": "Search - Missing Required Params",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/search?category_id=1",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"search"
],
"query": [
{
"key": "category_id",
"value": "1"
}
]
},
"description": "This request is expected to fail with a 400 Bad Request error because the `location_id` is missing."
},
"response": []
}
]
},
{
"name": "Get User Status",
"item": [
{
"name": "Get Premium User Status",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/user/status?phone_number=+6591234567",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"user",
"status"
],
"query": [
{
"key": "phone_number",
"value": "+6591234567",
"description": "The user's phone number, including country code."
}
]
},
"description": "Retrieves the subscription status for a known premium user."
},
"response": []
},
{
"name": "Get Free User Status",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/user/status?phone_number=+6598765432",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"user",
"status"
],
"query": [
{
"key": "phone_number",
"value": "+6598765432"
}
]
},
"description": "Retrieves the subscription status for a known free user."
},
"response": []
},
{
"name": "Get New User Status",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/user/status?phone_number=+60123456789",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"user",
"status"
],
"query": [
{
"key": "phone_number",
"value": "+60123456789"
}
]
},
"description": "Retrieves the default free tier status for a user not present in the system."
},
"response": []
}
]
},
{
"name": "Get System Stats",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{baseUrl}}/api/stats",
"host": [
"{{baseUrl}}"
],
"path": [
"api",
"stats"
]
},
"description": "Retrieves internal system statistics, such as total counts for categories, locations, companies, and users."
},
"response": []
}
],
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "{{api_token}}",
"type": "string"
}
]
},
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
]
}
],
"auth": {
"type": "noauth"
},
"variable": [
{
"key": "baseUrl",
"value": "http://localhost:5000",
"type": "string",
"description": "The base URL for the API."
},
{
"key": "api_token",
"value": "ssg_secure_token_2025",
"type": "string",
"description": "The API token for authorized endpoints."
}
]
} |