Categories Screen

This API is designed to list all categories and subcategories. Additionally, subcategories can further contain sub-subcategories, forming a hierarchical structure.

Categories API

The Categories API is a critical endpoint that provides access to the list of product categories available in the e-commerce application. This API enables users to explore and browse products conveniently based on different product categories and tags.

Categories interface

Endpoint

  • {{baseurl}}/api/v1/categories

Method

  • GET

Request Parameters:

  • lang_code (optional): A two-letter language code (e.g., "en" for English, "es" for Spanish, etc.) to support language-based localization. If provided, the API returns category names and descriptions in the specified language.

  • page (optional): The page number to retrieve when using pagination. If not specified, the API defaults to the first page.

  • limit (optional): The maximum number of categories to return per page. If not specified, the API defaults to 15 categories per page.

Request Body:

  • None

Authorization

The API requires a bearer token in the request header for authentication. Users need to include their valid bearer token in the "Authorization" header of the HTTP request to access the categories.

Response Format

The API responds with a JSON array containing category objects. Each category object represents a specific product category and includes details such as category ID, name, description, and more.

Features:

  • The Categories API allows users to retrieve a list of product categories and sub categories available in the e-commerce application.

  • Each category object includes essential details such as ID, name, banner and icon, providing users with a clear understanding of each category.

  • Categories can be associated with tags, making it easier for users to find specific product types within a category.

Usage:

The Categories API is used to present a comprehensive list of product categories to users, enabling them to navigate through different product offerings efficiently. Users can explore various categories and find products that match their preferences.

Last updated