> For the complete documentation index, see [llms.txt](https://expedy.gitbook.io/openapi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://expedy.gitbook.io/openapi/produto/atributos.md).

# Atributos

## Get Atributo

<mark style="color:blue;">`GET`</mark> `/v1/product/attribute`

Endpoint para consulta de todos os atributos cadastrados.

#### Query Parameters

| Name               | Type   | Description                                      |
| ------------------ | ------ | ------------------------------------------------ |
| page               | String | Número da página. **Default: 1.**                |
| pageSize           | String | Quantidade de itens por página. **Default: 10.** |
| nome               | String | Nome do Atributo.                                |
| marketplace        | String | Nome do marketplace.                             |
| marketplace\_valor | String | Valor do atributo no marketplace.                |
| valor              | String | Valor do Atributo.                               |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
	"paging": {
		"total": 4,
		"page": 1,
		"limit": 10,
		"offset": 0
	},
	"Atributos": [
		{
			"id": 5,
			"_id": "6260362670b4a90c289a10fc",
			"nome": "cor",
			"valor": "vermelho",
			"company": "4",
			"marketplaces": [],
			"idERP_Attribute": 5,
			"__v": 0
		},
		{
			"id": 6,
			"_id": "6260362c70b4a90c289a1100",
			"nome": "tamanho",
			"valor": "P",
			"company": "4",
			"marketplaces": [],
			"idERP_Attribute": 6,
			"__v": 0
		},
		{
			"id": 7,
			"_id": "6260382570b4a90c289a110c",
			"nome": "tamanho",
			"valor": "G",
			"company": "4",
			"marketplaces": [],
			"idERP_Attribute": 7,
			"__v": 0
		},
		{
			"id": 8,
			"_id": "6260382c70b4a90c289a1110",
			"nome": "cor",
			"valor": "cinza",
			"company": "4",
			"marketplaces": [],
			"idERP_Attribute": 8,
			"__v": 0
		}
	]
}	
```

{% endtab %}
{% endtabs %}

## Get Atributo por ID

<mark style="color:blue;">`GET`</mark> `/v1/product/attribute/:id`

Para consultar o atributo é necessário mandar o id, deixando a url como **`/v1/product/attribute/5`** por exemplo

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
	"atributo": {
		"id": 5,
		"_id": "6260362670b4a90c289a10fc",
		"nome": "cor",
		"valor": "vermelho",
		"company": "4",
		"marketplaces": [],
		"idERP_Attribute": 5,
		"__v": 0
	}
}
```

{% endtab %}
{% endtabs %}

## Post Atributo

<mark style="color:green;">`POST`</mark> `/v1/product/attribute/`

Endpoint para cadastro de novos atributos.

#### Request Body

| Name                                    | Type   | Description                      |
| --------------------------------------- | ------ | -------------------------------- |
| nome<mark style="color:red;">\*</mark>  | String | Nome do atributo. Ex: Cor.       |
| valor<mark style="color:red;">\*</mark> | String | Valor do atributo. Ex: Vermelho. |

{% tabs %}
{% tab title="201: Created " %}

```javascript
{
	"message": "created",
	"Atributo": {
		"id": 8,
		"_id": "6260382c70b4a90c289a1110",
		"nome": "cor",
		"valor": "cinza",
		"company": "4",
		"marketplaces": [],
		"idERP_Attribute": 8,
		"__v": 0
	}
}
```

{% endtab %}
{% endtabs %}

## Put Atributo

<mark style="color:orange;">`PUT`</mark> `/v1/product/attribute/:id`

Endpoint para atualizar o atributo.

#### Request Body

| Name  | Type   | Description                      |
| ----- | ------ | -------------------------------- |
| nome  | String | Nome do atributo. Ex: Cor.       |
| valor | String | Valor do atributo. Ex: Vermelho. |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
	"message": "Atributo Atualizado",
	"atributo": {
		"id": 6,
		"_id": "6260362c70b4a90c289a1100",
		"nome": "tamanho",
		"valor": "Cinza",
		"company": "4",
		"marketplaces": [],
		"idERP_Attribute": 6,
		"__v": 0
	}
}
```

{% endtab %}
{% endtabs %}

## Delete Atributo

<mark style="color:red;">`DELETE`</mark> `/v1/product/attribute/:id`

Endpoint para Deletar um atributo.

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
	"message": "Deletado com sucesso"
}
```

{% endtab %}
{% endtabs %}


---

# 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:

```
GET https://expedy.gitbook.io/openapi/produto/atributos.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.
