Skip to Content
ReferenceStorefront Public JS APIOverview

Storefront Public JS API Overview

The Storefront Public JS API offers a set of HTTP endpoints for interacting with essential e-commerce resources in a Finqu storefront. It is designed to be used directly in storefront themes, allowing developers to enhance user experience (UX) by building dynamic, interactive features such as product displays, live cart updates, and blog integrations—all without requiring authentication.

You can safely call these endpoints from the browser or any HTTP client to fetch product data, update the cart, or interact with blog content. The API is public and optimized for seamless integration into custom storefronts.

Key Features

  • Product Management: Retrieve product details and pricing, including support for customizations and tax calculations.
  • Cart Operations: Add, update, or remove items from the shopping cart, or clear the cart entirely.
  • Blog Interactions: Fetch blog articles, post comments, and manage comment threads.

Error Handling

The API uses standard HTTP status codes to indicate the result of each request:

  • 200 OK: Successful operation.
  • 404 Not Found: Resource does not exist.
  • 403 Forbidden: Action not permitted (e.g., not the owner).
  • 422 Unprocessable Entity: Validation errors (e.g., missing fields).

Example Usage

You can interact with the API using fetch in JavaScript or any HTTP client. For example, to get a product:

fetch('/api/products/123') .then(res => res.json()) .then(data => console.log(data));

Refer to the individual endpoint documentation for details on parameters, request/response formats, and error handling.

Last updated on