All Categories
GET
/api/categories
Retrieve a list of all categories available on the site.
Parameters:
none
Response:
- 200 OK: Successful request. Returns a JSON array containing product objects.
- 400 Bad Request: Invalid parameters supplied.
- 404 Not Found: No products matching the criteria were found.
- 500 Internal Server Error: Server encountered an unexpected condition.
Sample Request:
fetch('https://applejson.net/api/categories')
.then(res => res.json())
.then(data => console.log(data));