> For the complete documentation index, see [llms.txt](https://docs.saas.haut.ai/haut.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-product-inventory.md).

# API for Product Inventory

Learn how to create products, organize them into shelves, and manage your Product Inventory through the Haut.AI SaaS API.

The Product Inventory is your product catalog in Haut.AI SaaS. Use this API to add products that you sell and organize them into groups for product recommendations.

You do not need to be familiar with the internal API terminology before you start. The two main concepts are:

| In the SaaS interface | In the API             | What it means                                                         |
| --------------------- | ---------------------- | --------------------------------------------------------------------- |
| **Product Item**      | **Inventory Item**     | One product, such as a cleanser, serum, or shampoo.                   |
| **Product Shelf**     | **Inventory Item Set** | A named group of products that can be used in a recommendation setup. |

{% hint style="info" %}
The interface and API names are different, but they refer to the same objects. For example, an `inventory_item_id` is the ID of a Product Item.
{% endhint %}

## What you can do

With the Product Inventory API, you can:

* create, view, search, update, and delete Product Items;
* organize Product Items into Product Shelves;
* add or remove several Product Items at once;
* duplicate Product Items and update product tags in bulk.

## Before you start

You need:

1. A Haut.AI SaaS account with access to the company whose inventory you want to manage.
2. An API key. See [Authentication and Token Management](/haut.ai/developers/authentication-and-token-management.md) for instructions.
3. Your **Company ID**, shown when you create an API key in SaaS.

Every request must use the base URL `https://saas.haut.ai` and include your API key in the `Authorization` header:

```http
Authorization: Bearer YOUR_API_KEY
```

Replace `{company_id}` in every endpoint with your Company ID. Keep API keys private and use them only in secure server-side code.

## Recommended first workflow

If you are setting up an inventory for the first time, follow these steps:

1. [Create a Product Item](/haut.ai/developers/saas-api-overview/api-for-product-inventory/manage-product-items.md#create-a-product-item).
2. Save the returned Product Item `id`.
3. [Create a Product Shelf](/haut.ai/developers/saas-api-overview/api-for-product-inventory/manage-product-shelves.md#create-a-product-shelf).
4. Save the returned Product Shelf `id`.
5. [Add the Product Item to the Product Shelf](/haut.ai/developers/saas-api-overview/api-for-product-inventory/manage-product-shelves.md#add-one-product-item-to-a-product-shelf).

You can then use the Product Shelf in your product recommendation setup.

## Choose what you want to manage

* [Manage Product Items](/haut.ai/developers/saas-api-overview/api-for-product-inventory/manage-product-items.md) — add products and maintain their information.
* [Manage Product Shelves](/haut.ai/developers/saas-api-overview/api-for-product-inventory/manage-product-shelves.md) — group products for recommendation setups.

## How to use the API blocks

The pages in this section contain interactive API reference blocks. Each block shows:

* the request method and URL;
* required path values, such as `company_id` or `id`;
* optional query filters;
* the request body and available fields;
* possible responses.

An `id` is returned when you create an item or shelf. Save it: you will use it to retrieve, update, delete, or connect that object later.

## Common response codes

| Code           | Meaning                                         | What to check                                                     |
| -------------- | ----------------------------------------------- | ----------------------------------------------------------------- |
| `200` or `201` | The request succeeded.                          | Read the response body for the requested or newly created object. |
| `204`          | The request succeeded and has no response body. | No further action is required.                                    |
| `400`          | Some request data is invalid.                   | Check the error details, field names, and accepted values.        |
| `401`          | The API key is missing, invalid, or expired.    | Check the `Authorization` header and API key.                     |
| `403`          | The API key cannot perform this action.         | Confirm that the key has access to the Company ID in the URL.     |
| `404`          | The requested object was not found.             | Check the Company ID and object `id`.                             |

***

{% hint style="warning" %}
Not a Haut.AI client yet?
{% endhint %}

<a href="https://haut.ai/book-a-demo?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button primary" data-icon="user-vneck">Book a demo</a> <a href="https://haut.ai/product/ai-skin-analysis?utm_source=referral&#x26;utm_medium=saas_docs&#x26;utm_campaign=Docs_SaaS_HautAI" class="button secondary" data-icon="external-link">Platform overview on haut.ai</a>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.saas.haut.ai/haut.ai/developers/saas-api-overview/api-for-product-inventory.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
