> For the complete documentation index, see [llms.txt](https://docs.sizebay.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sizebay.com/size-and-fit-data-integration/product-integration-api.md).

# Product Integration (API)

## Authentication

We use the basic authentication standard, please contact us for your credentials at **<support@sizebay.com>**

## Request endpoint

This endpoint create a new product in our database.

## Create new product

<mark style="color:green;">`POST`</mark> `https://api.sizebay.technology/v1/integrations/products`

#### Authenticator

| Name                                       | Type   | Description   |
| ------------------------------------------ | ------ | ------------- |
| user<mark style="color:red;">\*</mark>     | string | Your user     |
| password<mark style="color:red;">\*</mark> | string | Your password |

#### Request Body

| Name                                             | Type   | Description                                                  |
| ------------------------------------------------ | ------ | ------------------------------------------------------------ |
| name<mark style="color:red;">\*</mark>           | string | Name of the product                                          |
| gender<mark style="color:red;">\*</mark>         | string | Product gender (see options below)                           |
| permalink<mark style="color:red;">\*</mark>      | string | Unique product link (url)                                    |
| image<mark style="color:red;">\*</mark>          | string | Product image link (url)                                     |
| feedProductId                                    | string | Unique product ID                                            |
| brandName<mark style="color:red;">\*</mark>      | string | Product brand                                                |
| categoryName<mark style="color:red;">\*</mark>   | string | Product category                                             |
| availableSizes<mark style="color:red;">\*</mark> | array  | Size of the clothing / shoe avaliables. Ex: \["P", "M", "G"] |
| ageGroup<mark style="color:red;">\*</mark>       | string | Product age group (see options below)                        |
| sizeType<mark style="color:red;">\*</mark>       | string | Product type (see options below)                             |

{% tabs %}
{% tab title="200 Success" %}

```javascript
""
```

{% endtab %}

{% tab title="401 Permission denied" %}

{% endtab %}

{% tab title="400: Bad Request An error occurred" %}

```javascript
{
    // The error response can vary, due the many fields on this req
}
```

{% endtab %}
{% endtabs %}

### Payload example

{% hint style="danger" %}
There's an important information regarding **categoryName** that must be acknowledged before attempting this integration. Please read the details by checking our docs at <https://docs.sizebay.com/integration-products/categories-accepted-by-the-integration>
{% endhint %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>  "name": "Shorts",
  "gender": "M",
  "permalink": "https://www.exemple.com/prod/3213",
  "image": "https://www.exemple.com/short-image.jpg",
  "feedProductId": "he3jga4j4b",
  "brandName": "Product Brand",
  "categoryName": "Shorts",
  "availableSizes": ["PP", "P", "M", "G", "GG"],
  "ageGroup": "adult",

  // Properties below are OPTIONAL
  "sizeType": "regular"
}
</code></pre>

### Field value limits

* `availableSizes`: 20 as the maximum allowed length for each element
* `image`: 255 as the maximum allowed url length
* `name`: 150 as the maximum allowed length
* `categoryName`: 150 as the maximum allowed length
* `brandName`: 100 as the maximum allowed length
* `permalink`: 150 as the maximum allowed href length

### Fields Options

<table><thead><tr><th width="206" align="center">field</th><th width="285.490930745063" align="center">options</th><th align="center">description</th><th data-hidden></th><th data-hidden></th></tr></thead><tbody><tr><td align="center"><strong>gender</strong></td><td align="center"><code>M</code>, <code>F</code>, <code>U</code></td><td align="center">M = male, F = female, U = unisex</td><td></td><td></td></tr><tr><td align="center"><strong>ageGroup</strong></td><td align="center"><code>adult</code><strong>,</strong> <code>infant</code><strong>,</strong> <code>kids</code><strong>,</strong> <code>newborn</code><strong>,</strong> <code>toddler</code></td><td align="center"></td><td></td><td></td></tr><tr><td align="center"><strong>sizeType (optional)</strong></td><td align="center"><code>regular</code>, <code>petite</code> <code>plus size</code>, <code>big and tall</code>, <code>maternity</code></td><td align="center">They must be <strong>exactly the way they are described here.</strong> Do <strong>NOT</strong> send it as e.g "Regular". It's case sensitive.</td><td></td><td></td></tr></tbody></table>
