> For the complete documentation index, see [llms.txt](https://desenvolvedores.skyhub.com.br/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://desenvolvedores.skyhub.com.br/produtos/consultar-marcas.md).

# Consultar Marcas

Ao consultar as Marcas, será possível consultar o ID de uma determinada e assim incluí-lo no JSON de produtos.

## GET - Consultar Marcas

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

{% hint style="info" %}
A consulta trará 10 marcas, mas é possível utilizar o **limit** para trazer mais conforme necessidade (Máx. 10). Também é possível aplicar a paginação através do parâmetro ***offset**.*
{% endhint %}

#### Request headers:

<table><thead><tr><th>Key</th><th width="398">Value</th></tr></thead><tbody><tr><td>X-User-Email</td><td>email_de_usuario</td></tr><tr><td>X-Api-Key</td><td>token_de_integracao de sua conta SkyHub</td></tr><tr><td>X-Accountmanager-key</td><td>token_account único de cada Plataforma/ERP</td></tr><tr><td>Accept</td><td>application/json</td></tr><tr><td>Content-Type</td><td>application/json</td></tr></tbody></table>

#### **Estrutura de resposta:**

```
{
  "total": 0,
  "limit": 0,
  "offset": "0",
  "sort": "string",
  "values": [
    {
      "tenant": "string",
      "operator": "string",
      "createDate": "1970-01-01T00:00:00.000000",
      "lastUpdate": "1970-01-01T00:00:00.000000",
      "brandData": {
        "id": "string",
        "code": "string",
        "name": "string"
      }
    }
  ]
}
```

#### **Example request:**

```
curl --location -g --request GET 'https://api.skyhub.com.br/brands?limit=4&offset=10' \
--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: Haverá um response body com as Marcas:
{% endhint %}

```
{
  "total": 1000,
  "limit": 4,
  "offset": 10,
  "sort": "lastupdate",
  "values": [
    {
      "tenant": "xxxxxxxxxxxxxx",
      "operator": "xxxxxxxxxxxxxx",
      "account": null,
      "createDate": "2025-01-01T20:01:05.490000",
      "lastUpdate": "2025-01-01T20:01:05.490000",
      "lastEvent": null,
      "brandData": {
        "id": "1rxxxxxx490",
        "code": "1rxxxxxx490",
        "name": "Marca",
        "active": true,
        "menuHome": true
      }
    }
  ]
}
```

## Filtros de consulta

### Como filtrar por nome

É possível realizar buscas por nome de uma determinada marca.&#x20;

{% hint style="info" %}
A busca retornará todas as marcas que possuírem a sequência de caracteres declarada no filtro.
{% endhint %}

Para realizar o filtro pelo nome da marca, deverá ser informada a query **?brandName=** no endpoint /brands, referenciando a sequência de caracteres a ser consultado, conforme exemplo a seguir:

```
https://api.skyhub.com.br/brands?brandName={nome_da_marca}
```

#### Example request:

```
curl --location -g --request GET 'https://api.skyhub.com.br/brands?brandName=est' \
--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: No retorno da consulta acima, retornará todas as marcas que possuírem a sequência 'est' como vemos a seguir:
{% endhint %}

```
{
    "total": 71,
    "limit": 5,
    "offset": 0,
    "sort": "lastupdate",
    "values": [
        {
            "tenant": "00776574000660",
            "operator": "00776574000660",
            "account": null,
            "createDate": "2025-06-18T20:03:01.628000",
            "lastUpdate": "2025-06-18T20:03:01.628000",
            "lastEvent": null,
            "brandData": {
                "id": "175e028778L1V628",
                "code": "175e028778L1V628",
                "name": "Bestway",
                "active": true,
                "menuHome": true
            }
        },
        {
            "tenant": "00776574000660",
            "operator": "00776574000660",
            "account": null,
            "createDate": "2025-06-13T20:03:07.300000",
            "lastUpdate": "2025-06-13T20:03:07.300000",
            "lastEvent": null,
            "brandData": {
                "id": "174985m578tu7300",
                "code": "174985m578tu7300",
                "name": "Homestar",
                "active": true,
                "menuHome": true
            }
        },
        {
            "tenant": "00776574000660",
            "operator": "00776574000660",
            "account": null,
            "createDate": "2025-06-12T20:02:15.451000",
            "lastUpdate": "2025-06-12T20:02:15.451000",
            "lastEvent": null,
            "brandData": {
                "id": "17497Ep69335r451",
                "code": "17497Ep69335r451",
                "name": "Festive",
                "active": true,
                "menuHome": true
            }
        },
        {
            "tenant": "00776574000660",
            "operator": "00776574000660",
            "account": null,
            "createDate": "2025-06-04T20:03:06.711000",
            "lastUpdate": "2025-06-04T20:03:06.711000",
            "lastEvent": null,
            "brandData": {
                "id": "1749078186dl71M1",
                "code": "1749078186dl71M1",
                "name": "Estofamar",
                "active": true,
                "menuHome": true
            }
        },
        {
            "tenant": "00776574000660",
            "operator": "00776574000660",
            "account": null,
            "createDate": "2025-06-04T20:03:06.693000",
            "lastUpdate": "2025-06-04T20:03:06.693000",
            "lastEvent": null,
            "brandData": {
                "id": "Lt174F9078186693",
                "code": "Lt174F9078186693",
                "name": "Estofados Teixeira",
                "active": true,
                "menuHome": true
            }
        }
    ]
}

```

#### Utilizando o limit e o offset

Por padrão, a consulta acima trará somente os primeiros 5 resultados (limit=5), porém pode ser passado na consulta um valor de no máximo 10, trazendo assim essa quantidade de marcas na busca.&#x20;

```
https://api.skyhub.com.br/brands?brandName=est&limit=10
```

Para passar a próxima página, deve-se utilizar o parâmetro offset. Por exemplo, se na requisição acima quiser passar para a segunda página, a consulta abaixo deve ser realizada:

```
https://api.skyhub.com.br/brands?brandName=est&limit=10&offset=10
```


---

# 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://desenvolvedores.skyhub.com.br/produtos/consultar-marcas.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.
