# Create a Product

## Product creation

<mark style="color:green;">`POST`</mark> `https://{workspace}.myeshopbox.com/product-engine/api/v1/products`

This endpoint creates a product.

#### Headers

| Name           | Type   | Description                                 |
| -------------- | ------ | ------------------------------------------- |
| Authentication | string | The bearer token to grant access to the API |

#### Request Body

| Name            | Type   | Description                                                                                          |
| --------------- | ------ | ---------------------------------------------------------------------------------------------------- |
| sku             | string | A `SKU` is a unique code that identifies characteristics of each product, source: client             |
| type            | string | Defines  a type of the product(Base, Kit, Virtual Combo)                                             |
| description     | string | Product description                                                                                  |
| brand           | string | Product brand                                                                                        |
| vertical        | string | Product category code                                                                                |
| mrp             | number | Maximum retail price of product                                                                      |
| unitPrice       | number | Unit price of product                                                                                |
| dimensionLength | number | A characteristic of a product in terms of its length                                                 |
| dimesnionWidth  | number | A characteristic of a product in terms of its width                                                  |
| dimensionHeight | number | A characteristic of a product in terms of its height                                                 |
| dimesnsionUnit  | string | Dimension unit                                                                                       |
| weight          | number | Weight of a product without any packaging                                                            |
| components      | array  | Unit of virtual combo and kit. It is null for base product                                           |
| hsnCode         | string | It is used for the classification of goods in a systematic and logical manner                        |
| taxCode         | string | Product tax code                                                                                     |
| groupCode       | string | It used for grouping of multiple `SKU`                                                               |
| imageUrl        | string | Product image                                                                                        |
| additionalNames | object | Additional names of the product(`EAN`,`UPC`, `GTIN`, Others)                                         |
| specification   | string | It describes the nature of the product(Fragile, Dangerous, Liquid, A battery or contains one, Media) |
| properties      | object | Client defined attributes of the product                                                             |

{% tabs %}
{% tab title="200 Product created successfully." %}

```
{
    "type": "BASE",
    "sku": "73682939-172882-32",
    "groupCode": "73682939-172882",
    "vertical": "APL",
    "brand": "Kapas Kraft",
    "description": "Rust Regular Fit Bundi",
    "specification": [
        "Fragile",
        "Dangerous",
        "Liquid"
    ],
    "additionalNames": {
        "ean": "89027189271829",
        "upc": "87162143127",
        "gtin": "8276174829301",
        "others": [
            "57182_Brown_32"
        ]
    },
    "status": "DRAFT",
    "createdAt": "2020-03-06T10:33:42.028Z",
    "updatedAt": "2020-03-06T10:33:42.028Z",
    "esin": "STDXE3FMCZA",
    "parentEsin": "STDXE3FMCZA",
    "verticalName": "Apparels"
}
```

{% endtab %}
{% endtabs %}

#### &#x20;

{% tabs %}
{% tab title="cURL" %}

```
curl --location --request POST 'https://{workspace}.myeshopbox.com/product-engine/api/v1/products' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data-raw '{
    "type": "BASE",
    "sku": "73682939-172882-32",
    "groupCode": "73682939-172882",
    "vertical": "APL",
    "brand": "Kapas Kraft",
    "description": "Rust Regular Fit Bundi",
    "specification": [
        "Fragile",
        "Dangerous",
        "Liquid"
    ],
    "additionalNames": {
        "ean": "89027189271829",
        "upc": "87162143127",
        "gtin": "8276174829301",
        "others": [
            "57182_Brown_32"
        ]
    }
}'
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
if (Brand, Vertical, MRP, unitPrice, HSN Code, Tax Code, Dimensions, Dimension Unit, Weight, and WeightUnit) fields are missing, then the draft product will be created. You will not be able to create consignment, orders, etc for draft products.
{% endhint %}


---

# 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://eshop.gitbook.io/eshopbox-developers/product/products/create-a-product.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.
