> For the complete documentation index, see [llms.txt](https://eshop.gitbook.io/eshopbox-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eshop.gitbook.io/eshopbox-developers/product/products/create-a-product.md).

# 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 %}
