Restmancer API - Products
This page documents the available REST endpoints for fetching product data from the API.
GET /api/products
Returns a list of products. If the limit is greater than initial data length (10), more will be generated on the fly.
Optional Query Parameters:
limit– Number of products to return.fields– Comma-separated list of fields (e.g.,name,price).
Examples:
Fields Available
idnamecategorypricedescriptionimagestockaddedAt
You can control the number of products returned and which fields are included using query parameters like ?limit=3 and ?fields=name,price.
Example: GET /api/products?fields=name,price&limit=3
import requests
url = "https://restmancer.vercel.app/api/products"
response = requests.get(url)
print(response.json())
fetch("https://restmancer.vercel.app/api/products")
.then(res => res.json())
.then(data => console.log(data));
const axios = require("axios");
axios.get("https://restmancer.vercel.app/api/products")
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error(error);
});
curl "https://restmancer.vercel.app/api/products"