# Ecommerce API

## Ecommerce API Documentation

An e-commerce API is like a toolbox for building online stores, letting you manage products, orders, customers, and even integrate marketing tools. Think of it as the backbone for creating a smooth and efficient online shopping experience.

### Base URL

The base URL for the Ecommerce API is:

```
https://santechapi.vercel.app
```

### Authentication

```
headers : {
"token" : {YOUR API KEY}
}
```

**Endpoint:** `/ecommerce/`

*The response includes the product's ID, title, price, description, category, and image.*

*HTTP Method:  `Get`*

**Example Request:**

```
GET /ecommerce/
```

**Example Response:**

**`200`**

```
[
	{
		"_id": "65131e1bb294a6e1ecd01883",
		"id": 14,
		"title": "Samsung 49-Inch CHG90 144Hz Curved Gaming Monitor (LC49HG90DMNXZA) – Super Ultrawide Screen QLED ",
		"price": 999.99,
		"description": "49 INCH SUPER ULTRAWIDE 32:9 CURVED GAMING MONITOR with dual 27 inch screen side by side QUANTUM DOT (QLED) TECHNOLOGY, HDR support and factory calibration provides stunningly realistic and accurate color and contrast 144HZ HIGH REFRESH RATE and 1ms ultra fast response time work to eliminate motion blur, ghosting, and reduce input lag",
		"category": "electronics",
		"image": "https://fakestoreapi.com/img/81Zt42ioCgL._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01887",
		"id": 18,
		"title": "MBJ Women's Solid Short Sleeve Boat Neck V ",
		"price": 9.85,
		"description": "95% RAYON 5% SPANDEX, Made in USA or Imported, Do Not Bleach, Lightweight fabric with great stretch for comfort, Ribbed on sleeves and neckline / Double stitching on bottom hem",
		"category": "women's clothing",
		"image": "https://fakestoreapi.com/img/71z3kpMAYsL._AC_UY879_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187a",
		"id": 5,
		"title": "John Hardy Women's Legends Naga Gold & Silver Dragon Station Chain Bracelet",
		"price": 695,
		"description": "From our Legends Collection, the Naga was inspired by the mythical water dragon that protects the ocean's pearl. Wear facing inward to be bestowed with love and abundance, or outward for protection.",
		"category": "jewelery",
		"image": "https://fakestoreapi.com/img/71pWzhdJNwL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187b",
		"id": 6,
		"title": "Solid Gold Petite Micropave ",
		"price": 168,
		"description": "Satisfaction Guaranteed. Return or exchange any order within 30 days.Designed and sold by Hafeez Center in the United States. Satisfaction Guaranteed. Return or exchange any order within 30 days.",
		"category": "jewelery",
		"image": "https://fakestoreapi.com/img/61sbMiUnoGL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01880",
		"id": 11,
		"title": "Silicon Power 256GB SSD 3D NAND A55 SLC Cache Performance Boost SATA III 2.5",
		"price": 109,
		"description": "3D NAND flash are applied to deliver high transfer speeds Remarkable transfer speeds that enable faster bootup and improved overall system performance. The advanced SLC Cache Technology allows performance boost and longer lifespan 7mm slim design suitable for Ultrabooks and Ultra-slim notebooks. Supports TRIM command, Garbage Collection technology, RAID, and ECC (Error Checking & Correction) to provide the optimized performance and enhanced reliability.",
		"category": "electronics",
		"image": "https://fakestoreapi.com/img/71kWymZ+c+L._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01882",
		"id": 13,
		"title": "Acer SB220Q bi 21.5 inches Full HD (1920 x 1080) IPS Ultra-Thin",
		"price": 599,
		"description": "21. 5 inches Full HD (1920 x 1080) widescreen IPS display And Radeon free Sync technology. No compatibility for VESA Mount Refresh Rate: 75Hz - Using HDMI port Zero-frame design | ultra-thin | 4ms response time | IPS panel Aspect ratio - 16: 9. Color Supported - 16. 7 million colors. Brightness - 250 nit Tilt angle -5 degree to 15 degree. Horizontal viewing angle-178 degree. Vertical viewing angle-178 degree 75 hertz",
		"category": "electronics",
		"image": "https://fakestoreapi.com/img/81QpkIctqPL._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187c",
		"id": 7,
		"title": "White Gold Plated Princess",
		"price": 9.99,
		"description": "Classic Created Wedding Engagement Solitaire Diamond Promise Ring for Her. Gifts to spoil your love more for Engagement, Wedding, Anniversary, Valentine's Day...",
		"category": "jewelery",
		"image": "https://fakestoreapi.com/img/71YAIFU48IL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01876",
		"id": 1,
		"title": "Fjallraven - Foldsack No. 1 Backpack, Fits 15 Laptops",
		"price": 109.95,
		"description": "Your perfect pack for everyday use and walks in the forest. Stash your laptop (up to 15 inches) in the padded sleeve, your everyday",
		"category": "men's clothing",
		"image": "https://fakestoreapi.com/img/81fPKd-2AYL._AC_SL1500_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187d",
		"id": 8,
		"title": "Pierced Owl Rose Gold Plated Stainless Steel Double",
		"price": 10.99,
		"description": "Rose Gold Plated Double Flared Tunnel Plug Earrings. Made of 316L Stainless Steel",
		"category": "jewelery",
		"image": "https://fakestoreapi.com/img/51UDEzMJVpL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01886",
		"id": 17,
		"title": "Rain Jacket Women Windbreaker Striped Climbing Raincoats",
		"price": 39.99,
		"description": "Lightweight perfet for trip or casual wear---Long sleeve with hooded, adjustable drawstring waist design. Button and zipper front closure raincoat, fully stripes Lined and The Raincoat has 2 side pockets are a good size to hold all kinds of things, it covers the hips, and the hood is generous but doesn't overdo it.Attached Cotton Lined Hood with Adjustable Drawstrings give it a real styled look.",
		"category": "women's clothing",
		"image": "https://fakestoreapi.com/img/71HblAHs5xL._AC_UY879_-2.jpg"
	}
]
```

**Endpoint:** `/ecommerce/title`

*HTTP Method:  `Get`*

**Example Request:**

```
GET /ecommerce/title
```

**Example Response:**

**`200`**

```
[
	{
		"_id": "65131e1bb294a6e1ecd01876",
		"title": "Fjallraven - Foldsack No. 1 Backpack, Fits 15 Laptops"
	},
	{
		"_id": "65131e1bb294a6e1ecd01877",
		"title": "Mens Casual Premium Slim Fit T-Shirts "
	},
	{
		"_id": "65131e1bb294a6e1ecd01878",
		"title": "Mens Cotton Jacket"
	},
	{
		"_id": "65131e1bb294a6e1ecd01879",
		"title": "Mens Casual Slim Fit"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187a",
		"title": "John Hardy Women's Legends Naga Gold & Silver Dragon Station Chain Bracelet"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187b",
		"title": "Solid Gold Petite Micropave "
	},
	{
		"_id": "65131e1bb294a6e1ecd0187c",
		"title": "White Gold Plated Princess"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187d",
		"title": "Pierced Owl Rose Gold Plated Stainless Steel Double"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187e",
		"title": "WD 2TB Elements Portable External Hard Drive - USB 3.0 "
	},
	{
		"_id": "65131e1bb294a6e1ecd0187f",
		"title": "SanDisk SSD PLUS 1TB Internal SSD - SATA III 6 Gb/s"
	},
	{
		"_id": "65131e1bb294a6e1ecd01880",
		"title": "Silicon Power 256GB SSD 3D NAND A55 SLC Cache Performance Boost SATA III 2.5"
	},
	{
		"_id": "65131e1bb294a6e1ecd01881",
		"title": "WD 4TB Gaming Drive Works with Playstation 4 Portable External Hard Drive"
	},
	{
		"_id": "65131e1bb294a6e1ecd01882",
		"title": "Acer SB220Q bi 21.5 inches Full HD (1920 x 1080) IPS Ultra-Thin"
	},
	{
		"_id": "65131e1bb294a6e1ecd01883",
		"title": "Samsung 49-Inch CHG90 144Hz Curved Gaming Monitor (LC49HG90DMNXZA) – Super Ultrawide Screen QLED "
	},
	{
		"_id": "65131e1bb294a6e1ecd01884",
		"title": "BIYLACLESEN Women's 3-in-1 Snowboard Jacket Winter Coats"
	},
	{
		"_id": "65131e1bb294a6e1ecd01885",
		"title": "Lock and Love Women's Removable Hooded Faux Leather Moto Biker Jacket"
	},
	{
		"_id": "65131e1bb294a6e1ecd01886",
		"title": "Rain Jacket Women Windbreaker Striped Climbing Raincoats"
	},
	{
		"_id": "65131e1bb294a6e1ecd01887",
		"title": "MBJ Women's Solid Short Sleeve Boat Neck V "
	},
	{
		"_id": "65131e1bb294a6e1ecd01888",
		"title": "Opna Women's Short Sleeve Moisture"
	},
	{
		"_id": "65131e1bb294a6e1ecd01889",
		"title": "DANVOUY Womens T Shirt Casual Cotton Short"
	},
	{
		"_id": "65871d4913d9388fe80af8ee",
		"title": "Lays Chips"
	}
]
```

**Endpoint:** `/ecommerce/images`

*HTTP Method:  `Get`*

**Example Request:**

```
GET /ecommerce/images
```

**Example Response:**

**`200`**

```
[
	{
		"_id": "65131e1bb294a6e1ecd01876",
		"image": "https://fakestoreapi.com/img/81fPKd-2AYL._AC_SL1500_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01877",
		"image": "https://fakestoreapi.com/img/71-3HjGNDUL._AC_SY879._SX._UX._SY._UY_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01878",
		"image": "https://fakestoreapi.com/img/71li-ujtlUL._AC_UX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01879",
		"image": "https://fakestoreapi.com/img/71YXzeOuslL._AC_UY879_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187a",
		"image": "https://fakestoreapi.com/img/71pWzhdJNwL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187b",
		"image": "https://fakestoreapi.com/img/61sbMiUnoGL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187c",
		"image": "https://fakestoreapi.com/img/71YAIFU48IL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187d",
		"image": "https://fakestoreapi.com/img/51UDEzMJVpL._AC_UL640_QL65_ML3_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187e",
		"image": "https://fakestoreapi.com/img/61IBBVJvSDL._AC_SY879_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187f",
		"image": "https://fakestoreapi.com/img/61U7T1koQqL._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01880",
		"image": "https://fakestoreapi.com/img/71kWymZ+c+L._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01881",
		"image": "https://fakestoreapi.com/img/61mtL65D4cL._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01882",
		"image": "https://fakestoreapi.com/img/81QpkIctqPL._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01883",
		"image": "https://fakestoreapi.com/img/81Zt42ioCgL._AC_SX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01884",
		"image": "https://fakestoreapi.com/img/51Y5NI-I5jL._AC_UX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01885",
		"image": "https://fakestoreapi.com/img/81XH0e8fefL._AC_UY879_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01886",
		"image": "https://fakestoreapi.com/img/71HblAHs5xL._AC_UY879_-2.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01887",
		"image": "https://fakestoreapi.com/img/71z3kpMAYsL._AC_UY879_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01888",
		"image": "https://fakestoreapi.com/img/51eg55uWmdL._AC_UX679_.jpg"
	},
	{
		"_id": "65131e1bb294a6e1ecd01889",
		"image": "https://fakestoreapi.com/img/61pHAEJ4NML._AC_UX679_.jpg"
	},
	{
		"_id": "65871d4913d9388fe80af8ee",
		"image": "https://www.bigbasket.com/media/uploads/p/l/1212774_4-lays-potato-chips-indias-magic-masala.jpg?tr=w-640,q=80"
	}
]
```

**Endpoint:** `/ecommerce/category`

*HTTP Method:  `Get`*

**Example Request:**

```
GET /ecommerce/category
```

**Example Response:**

**`200`**

```
[
	{
		"_id": "65131e1bb294a6e1ecd01876",
		"category": "men's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01877",
		"category": "men's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01878",
		"category": "men's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01879",
		"category": "men's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187a",
		"category": "jewelery"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187b",
		"category": "jewelery"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187c",
		"category": "jewelery"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187d",
		"category": "jewelery"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187e",
		"category": "electronics"
	},
	{
		"_id": "65131e1bb294a6e1ecd0187f",
		"category": "electronics"
	},
	{
		"_id": "65131e1bb294a6e1ecd01880",
		"category": "electronics"
	},
	{
		"_id": "65131e1bb294a6e1ecd01881",
		"category": "electronics"
	},
	{
		"_id": "65131e1bb294a6e1ecd01882",
		"category": "electronics"
	},
	{
		"_id": "65131e1bb294a6e1ecd01883",
		"category": "electronics"
	},
	{
		"_id": "65131e1bb294a6e1ecd01884",
		"category": "women's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01885",
		"category": "women's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01886",
		"category": "women's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01887",
		"category": "women's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01888",
		"category": "women's clothing"
	},
	{
		"_id": "65131e1bb294a6e1ecd01889",
		"category": "women's clothing"
	},
	{
		"_id": "65871d4913d9388fe80af8ee",
		"category": "Chips"
	}
]
```

### Error Handling

In case of an error, the API will respond with an appropriate HTTP status code and an error message in the response body.

**Example Error Response:**

**`400`**

<pre><code> {
<strong>     message: "Error retrieving the Ecommerce documents:"
</strong> }
</code></pre>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://santech.gitbook.io/docs/ecommerce-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
