Endpoint que permite a listagem das variações de produtos criados na plataforma da SULTS.
URL: https://api.sults.com.br/api/v2/compras/product/variation/list
Método: GET
Parâmetros
Headers
| Header | Valor |
|---|---|
| Authorization | <token_de_acesso> |
| Content-Type | application/json;charset=UTF-8 |
Query parameters
| Filtro | Valor | Descrição |
|---|---|---|
| id | Integer | Código da variação |
| productId | Integer | Código do produto Requerido |
| active | Boolean | true – (Padrão) variações ativos false – variações inativos |
| page | Integer | Define a página da listagem que será retornada |
Exemplo
fetch("https://api.sults.com.br/api/v2/compras/product/variation/list?active=1&productId=2&page=0", {
method: "GET",
headers: {
"Authorization": "<token_de_acesso>",
"Content-Type":"application/json;charset=UTF-8"
}
})Resposta
[
{
"id": 44,
"name": "Tamanho",
"active": true,
"index": 0,
"option": [
{
"id": 34,
"name": "Pequeno",
"active": true,
"index": 0
},
{
"id": 77,
"name": "Grande",
"active": true,
"index": 1
}
]
}
]