Gen-Endpoint

Free Product Catalog API — Mock REST API for Testing & Development

E-commerce
5 Endpoints
Live & Active

Prototyping e-commerce storefronts requires realistic product descriptions, prices, image URLs, categories, and stock levels. The Product Catalog API supplies mock catalog items spanning electronics, apparel, and accessories, along with filtering by category and product ID lookups.

Internal API - Hosted by Gen-Endpoint

Interactive Live API Explorer

Explore, configure parameters, and execute live HTTP requests directly in your browser. All routes are active!
GET

/api/products

Retrieves a list of products. Supports optional query parameters for filtering (e.g., `?category=electronics&inStock=true`) and `limit` to control the number of products returned (e.g., `?limit=1`).

Try it live in browser

You can add or change query parameters in the path above (e.g., ?name=User).

GET

/api/products/{productId}

Retrieves details for a specific product by ID. Replace {productId} with an ID like `prod_123`.

Try it live in browser

Replace placeholders (e.g., {userId}) with actual values in the path above. You can also add/edit query parameters (e.g., ?key=value).

POST

/api/products

Adds a new product to the catalog.

Try it live in browser
PUT

/api/products/{productId}

Updates an existing product by ID. Replace {productId} with an ID like `prod_123`.

Try it live in browser

Replace placeholders (e.g., {userId}) with actual values in the path above.

DELETE

/api/products/{productId}

Deletes a product by ID. Replace {productId} with an ID like `prod_456`.

Try it live in browser

Replace placeholders (e.g., {userId}) with actual values in the path above.

Code Integration Examples

Copy ready-to-use cURL commands and JavaScript Fetch snippets directly into your projects or testing tools.
Standard Fetch API (Browser & Node.js 18+)
// Free Product Catalog API - JavaScript Fetch Example
async function fetchProductCatalogAPI() {
  try {
    const response = await fetch('https://gen-endpoint.com/api/products', {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
      },
    });

    if (!response.ok) {
      throw new Error(`HTTP error! status: ${response.status}`);
    }

    const data = await response.json();
    console.log('Success:', data);
    return data;
  } catch (error) {
    console.error('Fetch error:', error);
  }
}

fetchProductCatalogAPI();

Sample JSON Response

[
  {
    "id": "prod_123",
    "name": "The Pragmatic Programmer",
    "category": "Books",
    "price": 29.99,
    "stock": 150,
    "imageUrl": "https://placehold.co/300x200.png",
    "description": "From journeyman to master.",
    "details": {
      "pages": 352,
      "author": "David Thomas, Andrew Hunt"
    },
    "reviews": [
      {
        "rating": 5,
        "comment": "A must-read!"
      }
    ],
    "createdAt": "2024-01-10T10:00:00Z"
  }
]

Common Developer Use Cases

How developers integrate the Product Catalog API during rapid frontend prototyping and automated testing.

Building e-commerce product grids, detail pages, and search filters.

Testing responsive image galleries and price formatting logic.

Integrating with shopping cart state and checkout prototypes.

Practicing infinite scroll or pagination in React, Vue, or Angular.

Related Free REST APIs

Explore complementary mock endpoints to chain and test full application workflows.

Shopping Cart API

E-commerce

Manage shopping cart operations with session handling, item management, and checkout preparation.

View API

Inventory Management API

E-commerce

Track stock levels, handle reservations, manage warehouses, and process stock adjustments.

View API

Payment Processing API

E-commerce

Handle payment flows, refunds, and transaction history with multiple payment methods.

View API

Advanced Search API

Data

Demonstrates complex querying, filtering, sorting, and pagination with full-text search capabilities.

View API

Frequently Asked Questions

What fields are included in each product object?

Each item contains an id, title, price, description, category, image URL, rating, and inventory count.

Can I filter by category?

Yes, use query parameter ?category=electronics or query GET /api/categories for the list of available categories.

Are product images real URLs?

Yes, product images use placeholder service URLs that render cleanly in frontend UI components.