Shopping Cart

The /cart endpoints are useful when you are prototyping a shopping cart UI of an online store or a mobile app.

Here's an example of how can you fetch data using axios:

axios({
    method: 'get',
        url: 'https://jsonfakery.com/carts',
        responseType: 'application/json'
    }).then(function (response) {
        // Fetch endpoint response.
        // response.data
    });

Mock Shopping Carts

This will return mock data for fictional users or persons.

Get/shopping-cart/carts

Paginated Result

The paginated result will return page links, and other data for proper pagination.

Get/shopping-cart/carts/paginated

Simple Pagination

The simple pagination endpoint will only display the "Next" and "Previous" links.

Get/shopping-cart/carts/simple-paginate

Infinite Scrolling Pagination

If your front-end implements "infinite scrolling" user interfaces such as a mobile app, you may use this endpoint:

Get/shopping-cart/carts/infinite-scroll

Single Random Product

If you only need a single item, you may use this endpoint:

Get/shopping-cart/carts/random

A random endpoint will fetch a single random item from the database object.

Custom Number of Output

Get a specific number of cart items.

Get/shopping-cart/carts/random/3

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.

Stay Updated

Receive Free Giveaways!

We are going to be giving away free beautiful HTML templates from time to time and we will be launching our "learning" section where we post tutorials about Laravel, React among other things.

Subscribe now to get free updates!