> For the complete documentation index, see [llms.txt](https://skyhub-english.gitbook.io/skyhub-api-english/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyhub-english.gitbook.io/skyhub-api-english/skyhub-api-guides/products-attributes.md).

# Products Attributes

Attributes are relevant information for category filters and to differentiate SKUs from your product. The more attributes your product has the more chances it will have to appear in the category filter.

Here are some examples of attributes that are mandatory in the marketplace by category, such as:

* **Voltage** - For appliances category
* **Color** - For fashion category
* **Size** - For fashion category
* **Flavor** - For Sport & Nutrition category

It does not mean that your products should be limited to just these attributes, for example, in the following fashion category we have other attributes such as brand and others.

For a better understanding of mandatory attributes, imagine a fashion shop selling in the marketplace, the MKTP needs to have the color and size information of a T-shirt, as these are attributes of differentiation for each SKU of the product, and thus the marketplace will make available the options that your store has available for sale.

Now that you understand the importance of this information, let's practice! How does the integration send this data to Skyhub?

The fields available at the endpoint: <https://api.skyhub.com.br/attributes> and their types are:

| Status      | Type   | Descrição                                                                                                             |
| ----------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| **name**    | String | Internal attribute identifier                                                                                         |
| **label**   | String | attribute label, this string displayed on the SkyHub                                                                  |
| **options** | Array  | Optional field: Lists attribute options, if it is of type "select" example, \[red, blue, white] for a color attribute |

Integration will need to use the **POST** method through the following endpoint:

```
https://api.skyhub.com.br/attributes 
```

The information to be sent must be in the request BODY as follows:

![](https://2606423342-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWLii0XmQdjJQQG6m8e%2F-LWlbXOsg9olXIcw7elH%2F-LWln7tjgHtfWohFmn8L%2Fimage.png?alt=media\&token=78e1a269-e53d-4869-80bc-4a0da76f7108)

To update a particular product that was created in Skyhub, you must use the PUT (Update) method through the following endpoint:

```
https://api.skyhub.com.br/attributes/{attribute_name}
```

To be updated the information needs to be in the body of the request as follows:

```
{
  "attribute": {
    "label": "Atributo Exemplo",
    "options": [
      "blue",
      "blue",
      "blue"
    ]
  }
}
```

As a best practice, we strongly recommend that the attribute be created separately for posting (link) to the product you wish to create on SkyHub.

Do not follow the above practice raises SkyHub's processing rate and may lead to less efficient returns from our API. This is because of a validation that our tool does that is to verify if the attribute already exists, and if it does not exist, SkyHub does the creation.

As a test, we'll create an attribute in a Skyhub account using rest tools (like DHC / Postman). In practice it works as follows:

![](https://2606423342-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWLii0XmQdjJQQG6m8e%2F-LWlbXOsg9olXIcw7elH%2F-LWlrtyMCyAC1xFeOmuK%2Fimage.png?alt=media\&token=ed78668c-f9d9-40dd-9569-e4865c471b15)

With the attribute created, we will consult it on SkyHub through the left side menu, Skyhub> Attributes:

{% hint style="info" %}
In the screen below, the *Label* field is the *"Label"* field displayed in the API. The *Código* field is the *"Name"* field displayed in the API.
{% endhint %}

![](https://2606423342-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWLii0XmQdjJQQG6m8e%2F-LWlbXOsg9olXIcw7elH%2F-LWls40xg6yS3zyGl7jG%2Fimage.png?alt=media\&token=bdf153a7-97ad-48fa-9168-1cf16c371bcb)

Now let's create a product, making use of the previously created attribute and "telling" to SkyHub, that this product will have an already existing attribute on SkyHub.

To create a product, we use the POST method and the Endpoint <https://api.skyhub.com.br/product> with the following BODY:

![](https://2606423342-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LWLii0XmQdjJQQG6m8e%2F-LWlbXOsg9olXIcw7elH%2F-LWlszWgJj34T4PTu8rB%2Fimage.png?alt=media\&token=e8c4490a-c6fb-4abb-8311-6d5b3626494d)

[Check in our API Explorer](http://api-docs.skyhub.com.br/#/products/createProduct)
