Products
The /products
endpoints are useful when you are prototyping an online store or a shopping mobile app.
Here's an example of how can you fetch data using axios:
axios({
method: 'get',
url: 'https://jsonfakery.com/products',
responseType: 'application/json'
}).then(function (response) {
// Fetch endpoint response.
// response.data
});
Mock Products
This will return mock data for products to simulate an online store product list or a shopping cart.
Paginated Result
The paginated result will return page links, and other data for proper pagination.
Simple Pagination
The simple pagination endpoint will only display the "Next" and "Previous" links.
Infinite Scrolling Pagination
If your front-end implements "infinite scrolling" user interfaces such as a mobile app, you may use this endpoint:
A random endpoint will fetch a single random item from the database object.
You can get a custom number of results by changing the url value. You can fetch a random data for up to 100 items.
The data within the API is NOT factual, and names or images may be out of context. This JSON information is intended solely for front-end mockups/prototypes and shouldn't be implemented in production environments.