# Add products to cart

**Add to cart** functionality is a fundamental feature that allows customers to add a particular product to their Shopping cart.

When adding product to the shopping cart, always check if the selected product is available.

[This API call](https://demo.theshop.dev/api-documentation/v1#/products/ac0a9e535756249912ecc80a803f988c) checks if product is available.

## Types of products in the shopping cart

There are three types of products that can be added to the Shopping cart. You can combine all of them within the one cart call.

### Simple product

When adding a simple product, you should use `cart[]` array in endpoint to get correct results from the shopping cart.

### Product variant

When adding a variant of product to the shopping cart, use `variants[]` array in endpoint to get correct results from the shopping cart.

### Multipack product

If adding a multipack product, use `multipack[]` array in endpoint to get correct results from the shopping cart.

<figure><img src="/files/Dp4wmXmhfCN3jwtnX5vm" alt=""><figcaption><p><strong>Add to cart</strong> button located in the right side of the screen</p></figcaption></figure>


---

# 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://wiki.theshop.dev/docs/frontstore/basic-selling-flow/product-detail/add-products-to-cart.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.
