# Variação de Produto

## GET - Consultando a variação de um produto

{% hint style="info" %}
**Desde Março/2025, o array associations foi retirado do JSON do produto.**&#x20;
{% endhint %}

É possível utilizar o método GET e os mesmos headers das ações anteriores para consultar diretamente uma variação previamente criada. Para tal consulta, é necessário utilizar o endpoint:

```
https://api.skyhub.com.br/variations/{SKU_VARIACAO}
```

#### **Request headers:**

| Key                  | Value                                       |
| -------------------- | ------------------------------------------- |
| X-User-Email         | email\_de\_usuario                          |
| X-Api-Key            | token\_de\_integracao de sua conta SkyHub   |
| X-Accountmanager-Key | token\_account único de cada Plataforma/ERP |
| Accept               | application/json                            |
| Content-Type         | application/json                            |

#### **Example request:**

```
curl --location -g --request GET 'https://api.skyhub.com.br/variations/{SKU_VARIACAO}' \
--header 'X-User-Email: email_de_usuario' \
--header 'X-Api-Key: token_de_integracao de sua conta SkyHub' \
--header 'X-Accountmanager-Key: token_account único de cada Plataforma/ERP' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json'
```

#### **Response esperado:**

{% hint style="success" %}
200 \[Success] - OK: Será retornada a estrutura da variação referenciada no endpoint:
{% endhint %}

```
{
    "variation": {
        "sku": "SKU da Variação",
        "qty": 10,
        "price": 199.0,
        "ean": "9876543210987",
        "weight": 0.100,
        "height": 20,
        "width": 30,
        "length": 20,
        "images": [
            "https://foo"
        ],
        "status": enabled,
        "specifications": [
            {
                "key": "price",
                "value": "199.0"
            },
            {
                "key": "promotional_price",
                "value": "149.0"
            }
        ]
    },
    "product": {
        "sku": "SKU Agrupador"
    }
}
```

Note que ao final do resultado é exibido o SKU do ***product***, que é o SKU pai/agrupador da variação consultada. Este SKU só poderá ser consultado no endpoint */products* conforme descrito na seção anterior ([Consulta de Produto > Produto Simples e Variável](/produtos/consulta-produto/produto-simples.md)).

###


---

# 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://desenvolvedores.skyhub.com.br/produtos/consulta-produto/produto-variavel.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.
