# White Label

## Resumo

A API de W*hite Label* é um serviço da GoTokens utilizada para a parametrização da loja e personalização das diferentes interfaces disponívies no sistema através da gestão de templates, é possível personalizar o Painel Administrativo, Loja e App.

#### Como funciona

O cliente deve passar como parâmetro suas credenciais de usuário e caso ela esteja ativo e possua o serviço de White Label da GoBlockchain ele poderá definir parâmetros da loja e listar, criar, editar e excluir templates.<br>

**O que são Temas?**

São Layouts disponibilizados pela GoBlockchain para serem usado como base do template.

#### **O que são Templates?**

São personalizaçẽos criadas pela empresa, possuem o código do tema a ser usado e as variáveis de personalizações, pode-se criar multiplos templates com o mesmo tema e personalizações diferentes ou multiplos templates com themas diferentes. \
\
\**Podem serem usados em datas comemorativas por exemplo.*

#### **Configurações**

As configurações armazenam dados usados no preenchimento e montagem das telas, dados como links de redes sociais, meios de pagamento aceitos, logotipo, cores principais, etc. Estão diretamente no objeto *settings,* após a empresa finalizar a configuração inicial o white label já está pronto para operar  com uma Loja Padrão.

#### Templates

A criação de templates é um processo separado, a empresa deverá escolher o tema para o template que está criando e personalizar para web e mobile, depois a empresa poderá atribuir esse template a uma Company (todas as comunidades da emrpesa passam a usar esse template como padrão) e/ou Comunidade (caso queria usar templates distintos em diferentes comunidades)

O Objeto template recebe dados de personalização separados em header/page/card/footer e são utilizados em Cascata, ou seja o frontend da loja dará preferência para as variáveis seguindo a seguinte hierarquia de prioridades: \
\
Template da Comunidades, Template da Empresa, e Default (caso não configure no template)

#### Objeto Settings

<details>

<summary>Exemplo de Objeto de Configurações</summary>

```javascript
{
  "companyId": "",
  "title": "StockCar",
  "description": "StockCar is a decentralized platform for trading and investing in sports cars.",
  "termsAndConditions": "https://stockcar.io/terms-and-conditions",
  "privacyPolicy": "https://stockcar.io/privacy-policy",
  "supportEmail": "",
  "supportUrl": "https://stockcar.io/contact-us",
  "googleAnalyticsId": "",
  "GTMTrackinID": "GTM-NSBFS33",
  "logo": "https://stockcar.io/assets/img/logo.png",
  "mainColor": "#e0c160",
  "secondaryColor": "#e0c160",
  "theme": "default",
  "websiteUrl": "https://www.stockproseries.com.br",
  "twitterUrl": "https://twitter.com/stock_car?lang=en",
  "facebookUrl": "https://www.facebook.com/stockcaroficial",
  "instagramUrl": "https://www.instagram.com/stock_car/?hl=en",
  "youtubeUrl": "https://www.youtube.com/user/stockcarchannel",
  "telegramUrl": "https://t.me/+pmcn19QEC2s0ZWIx"
  "walletProviders": ["metamask"],
  "socialLogin": ["google", "facebook"],
  "socialLoginActive": true
}

```

</details>

### Objeto Template

<details>

<summary>Exemplo de Objeto de Template</summary>

```javascript
{
  "id": "123123",
  "companyId": "1234234234",
  "web": {
    "theme": "default",
    "mainColorLight": "#e0c160",
    "secondaryColorLight": "#e0c160",
    "mainColorDark": "#e0c160",
    "secondaryColorDark": "#e0c160",
    "header": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "footer": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "page": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    },
    "card": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    }
  },
  "mobile": {}
}

```

</details>

### Endpoints

#### Configurações

* **GET**   /v1/white-label/settings/:companyId
* **PATCH** /v1/white-label/settings/:companyId

#### Templates

* **POST** /v1/white-label/templates
* **GET** /v1/white-label/templates
* **GET** /v1/white-label/templates/:templateId
* **PATCH** /v1/white-label/tempaltes/:templateId
* **DELETE** /v1/white-label/templates/:templateId

#### Atribuição de templates

* **POST** /v1/white-label/templates/community/:communityId

### Configurações

## Configurações da empresa

<mark style="color:blue;">`GET`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/settings/:companyId`

Nível de autorização necessário: público

#### Path Parameters

| Name                                        | Type   | Description   |
| ------------------------------------------- | ------ | ------------- |
| companyId<mark style="color:red;">\*</mark> | String | ID da empresa |

{% tabs %}
{% tab title="200: OK " %}
{% tabs %}
{% tab title="Exemplo de Resposta" %}

```javascript
{
  "companyId": "",
  "title": "StockCar",
  "description": "StockCar is a decentralized platform for trading and investing in sports cars.",
  "termsAndConditions": "https://stockcar.io/terms-and-conditions",
  "privacyPolicy": "https://stockcar.io/privacy-policy",
  "supportEmail": "",
  "supportUrl": "https://stockcar.io/contact-us",
  "googleAnalyticsId": "",
  "GTMTrackinID": "GTM-NSBFS33", 
  "logo": "https://stockcar.io/assets/img/logo.png",
  "mainColor": "#e0c160",
  "secondaryColor": "#e0c160",
  "defaultTheme": "default",
  "socialLinks": {
    "websiteUrl": "https://www.stockproseries.com.br",
    "twitterUrl": "https://twitter.com/stock_car?lang=en",
    "facebookUrl": "https://www.facebook.com/stockcaroficial",
    "instagramUrl": "https://www.instagram.com/stock_car/?hl=en",
    "youtubeUrl": "https://www.youtube.com/user/stockcarchannel",
    "telegramUrl": "https://t.me/+pmcn19QEC2s0ZWIx"
  },
  "walletProviders": ["metamask"],
  "socialLogin": ["google", "facebook"],
  "socialLoginActive": true
}
```

{% endtab %}

{% tab title="Campos da Resposta" %}

* **`companyId`** - String \
  Identificador da empresa
* **`title`** - String \
  Título da empresa
* **`description`** - String \
  Descrição da empresa
* &#x20;**`termsAndConditions`** - String\
  &#x20;Termos e condições da empresa
* &#x20;**`privacyPolicy`** - String \
  Política de privacidade da empresa
* &#x20;**`supportEmail`** - String\
  &#x20;Email de suporte da empresa&#x20;
* **`supportUrl`** - String\
  Url de suporte da empresa
* **`googleAnalyticsId`** - String\
  Identificador do Google Analytics&#x20;
* **GTMTrackinID** - String \
  Identificador do Google Tag Manager&#x20;
* **`logo`** - String \
  Logo da empresa&#x20;
* **`mainColor`** - String \
  Cor principal da empresa&#x20;
* **`secondaryColor`** - String\
  Cor secundária da empresa&#x20;
* **`defaultThema`**- String\
  Thema padrão utilizado quando nenhum template e definido
* **`socialLinks`** - Object\
  Redes sociais da empresa
  * &#x20;**`websiteUrl`** - String \
    Url do site da empresa&#x20;
  * **`twitterUrl`** - String \
    Url do twitter da empresa&#x20;
  * **`facebookUrl`** - String\
    Url do facebook da empresa
  * &#x20;**`instagramUrl`** - String\
    Url do instagram da empresa
  * &#x20;**`youtubeUrl`** - String\
    &#x20;Url do youtube da empresa&#x20;
  * **`telegramUrl`** - String \
    Url do telegram da empresa&#x20;
* **`walletProviders`** -Array \<String>\
  Provedores de carteira&#x20;
* **`socialLogin`** - Array\<String>\
  Login social&#x20;
* **`socialLoginActive`** - bool\
  Login social ativo
  {% endtab %}
  {% endtabs %}
  {% endtab %}
  {% endtabs %}

## (JWT) Altera configurações da empresa

<mark style="color:purple;">`PATCH`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/settings/:companyId`

Nível de autorização necessário: **`company_admin`**

#### Path Parameters

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| companyId<mark style="color:red;">\*</mark> | String |             |

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| authorization<mark style="color:red;">\*</mark> | Bearer | JWT         |

#### Request Body

| Name                                    | Type   | Description                                              |
| --------------------------------------- | ------ | -------------------------------------------------------- |
| title<mark style="color:red;">\*</mark> | String | Título da empresa                                        |
| description                             | String | Descrição da empresa                                     |
| termsAndConditions                      | String | Termos e condições da empresa                            |
| privacyPolicy                           | String | Política de privacidade da empresa                       |
| supportEmail                            | String | Email de suporte da empresa                              |
| supportUrl                              | String | Url de suporte da empresa                                |
| googleAnalyticsId                       | String | Identificador do Google Analytics                        |
| logo                                    | String | Logo da empresa                                          |
| socialLoginActive                       | String | Status do login social                                   |
| socialLogin                             | String | Lista de logins sociais integrados                       |
| walletProviders                         | Array  | Lista de provedores de wallets integrados                |
| socialLinks                             | Object | Redes sociais da empresa                                 |
| secondaryColor                          | String | Cor secundária da empresa                                |
| mainColor                               | String | Cor principal da empresa                                 |
| GTMTrackinID                            | String | Identificador do Google Tag Manager                      |
| defaultTheme                            | String | Thema padrão utilizado quando nenhum template e definido |

{% tabs %}
{% tab title="200: OK " %}
{% tabs %}
{% tab title="Exemplo de Resposta" %}

```javascript
{
  "companyId": "",
  "title": "StockCar",
  "description": "StockCar is a decentralized platform for trading and investing in sports cars.",
  "termsAndConditions": "https://stockcar.io/terms-and-conditions",
  "privacyPolicy": "https://stockcar.io/privacy-policy",
  "supportEmail": "",
  "supportUrl": "https://stockcar.io/contact-us",
  "googleAnalyticsId": "",
  "GTMTrackinID": "GTM-NSBFS33", 
  "logo": "https://stockcar.io/assets/img/logo.png",
  "mainColor": "#e0c160",
  "secondaryColor": "#e0c160",
  "defaultTheme": "default",
  "socialLinks": {
    "websiteUrl": "https://www.stockproseries.com.br",
    "twitterUrl": "https://twitter.com/stock_car?lang=en",
    "facebookUrl": "https://www.facebook.com/stockcaroficial",
    "instagramUrl": "https://www.instagram.com/stock_car/?hl=en",
    "youtubeUrl": "https://www.youtube.com/user/stockcarchannel",
    "telegramUrl": "https://t.me/+pmcn19QEC2s0ZWIx"
  },
  "walletProviders": ["metamask"],
  "socialLogin": ["google", "facebook"],
  "socialLoginActive": true
}
```

{% endtab %}

{% tab title="Campos da Resposta" %}

* **`companyId`** - String \
  Identificador da empresa
* **`title`** - String \
  Título da empresa
* **`description`** - String \
  Descrição da empresa
* &#x20;**`termsAndConditions`** - String\
  &#x20;Termos e condições da empresa
* &#x20;**`privacyPolicy`** - String \
  Política de privacidade da empresa
* &#x20;**`supportEmail`** - String\
  &#x20;Email de suporte da empresa&#x20;
* **`supportUrl`** - String\
  Url de suporte da empresa
* **`googleAnalyticsId`** - String\
  Identificador do Google Analytics&#x20;
* **GTMTrackinID** - String \
  Identificador do Google Tag Manager&#x20;
* **`logo`** - String \
  Logo da empresa&#x20;
* **`mainColor`** - String \
  Cor principal da empresa&#x20;
* **`secondaryColor`** - String\
  Cor secundária da empresa&#x20;
* **`defaultThema`**- String\
  Thema padrão utilizado quando nenhum template e definido
* **`socialLinks`** - Object\
  Redes sociais da empresa
  * &#x20;**`websiteUrl`** - String \
    Url do site da empresa&#x20;
  * **`twitterUrl`** - String \
    Url do twitter da empresa&#x20;
  * **`facebookUrl`** - String\
    Url do facebook da empresa
  * &#x20;**`instagramUrl`** - String\
    Url do instagram da empresa
  * &#x20;**`youtubeUrl`** - String\
    &#x20;Url do youtube da empresa&#x20;
  * **`telegramUrl`** - String \
    Url do telegram da empresa&#x20;
* **`walletProviders`** -Array \<String>\
  Provedores de carteira&#x20;
* **`socialLogin`** - Array\<String>\
  Login social&#x20;
* **`socialLoginActive`** - bool\
  Login social ativo
  {% endtab %}
  {% endtabs %}
  {% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}

{% tab title="401: Unauthorized " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 401" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Credenciais de acesso necessárias. Por favor, execute sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% endtab %}

{% tab title="403: Forbidden " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 403" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Acesso restrito ao recurso.</td></tr><tr><td align="center">10</td><td>Credenciais de acesso expiradas. Por favor, execute novamente sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### Templates

## (JWT) Cria um template com as informações enviadas

<mark style="color:green;">`POST`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/templates`

Nível de autorização necessário: **`company_admin`**

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| authorization<mark style="color:red;">\*</mark> | Bearer | JWT         |

#### Request Body

| Name                                        | Type   | Description                              |
| ------------------------------------------- | ------ | ---------------------------------------- |
| mobile<mark style="color:red;">\*</mark>    | Object | Personalização do ambiente mobile        |
| web<mark style="color:red;">\*</mark>       | Object | Personalização do ambiente web           |
| companyId<mark style="color:red;">\*</mark> | String | ID da empresa onde será usado o template |

{% tabs %}
{% tab title="201: Created " %}
{% tabs %}
{% tab title="Exemplo de Resposta" %}

```javascript
{
  "id": "123123",
  "companyId": "1234234234",
  "mobile": {
    "theme": "default",
    "mainColorLight": "#e0c160",
    "secondaryColorLight": "#e0c160",
    "mainColorDark": "#e0c160",
    "secondaryColorDark": "#e0c160",
    "header": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "footer": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "page": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    },
    "card": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    }
  },
  "web": {}
}

```

{% endtab %}

{% tab title="Campos da Resposta" %}

* **`id`** *- String*

  Identificador próprio do template.
* **`companyId`** *- String*

  Identificador da empresa
* **`mobile`** *- String*

  Personalização do ambiente Mobile.
* **`web`** *- String*

  Personalização do ambiente Web.
  {% endtab %}
  {% endtabs %}
  {% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}

{% tab title="401: Unauthorized " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 401" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Credenciais de acesso necessárias. Por favor, execute sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% endtab %}

{% tab title="403: Forbidden " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 403" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Acesso restrito ao recurso.</td></tr><tr><td align="center">10</td><td>Credenciais de acesso expiradas. Por favor, execute novamente sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## (JWT) Lista de templates da empresa&#x20;

<mark style="color:blue;">`GET`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/templates`

Nível de autorização necessário: **`company_admin`**

#### Query Parameters

| Name      | Type   | Description                                    |
| --------- | ------ | ---------------------------------------------- |
| limit     | String | Limite de resultados na busca                  |
| offset    | String | Quantidade de resultados para avançar da busca |
| companyId | String | ID da Empresa                                  |

{% tabs %}
{% tab title="200: OK " %}
{% tabs %}
{% tab title="Exemplo de Resposta" %}

```javascript
{
  "templates": [
    {
      "mobile": {
        "theme": "default",
        "mainColorLight": "#e0c160",
        "secondaryColorLight": "#e0c160",
        "mainColorDark": "#e0c160",
        "secondaryColorDark": "#e0c160",
        "header": {
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "titles": [
            {
              "tag": "h1",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "24px"
            },
            {
              "tag": "h2",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "18px"
            }
          ],
          "text": {
            "color": "#ffffff",
            "font": "Arial",
            "style": "bold",
            "size": "12px"
          },
          "buttons": [
            {
              "name": "primary",
              "type": "circle",
              "backgroundColor": "#1a1a1a",
              "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
              "icon": "fa fa-lightbulb-o",
              "iconPosition": "left",
              "borderColor": "#ffffff",
              "borderEffect": "none",
              "color": "#ffffff",
              "font": "Arial",
              "size": "12px",
              "style": "bold",
              "hover": {
                "borderColor": "#ffffff",
                "borderEffect": "none",
                "backgroundColor": "#1a1a1a",
                "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
                "color": "#ffffff",
                "font": "Arial",
                "size": "12px",
                "style": "bold"
              }
            }
          ],
          "logo": {
            "url": "https://i.imgur.com/mWkGKDB.jpeg",
            "width": "100px",
            "height": "100px",
            "position": "left"
          }
        },
        "footer": {
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "titles": [
            {
              "tag": "h1",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "24px"
            },
            {
              "tag": "h2",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "18px"
            }
          ],
          "text": {
            "color": "#ffffff",
            "font": "Arial",
            "style": "bold",
            "size": "12px"
          },
          "buttons": [
            {
              "name": "primary",
              "type": "circle",
              "backgroundColor": "#1a1a1a",
              "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
              "icon": "fa fa-lightbulb-o",
              "iconPosition": "left",
              "borderColor": "#ffffff",
              "borderEffect": "none",
              "color": "#ffffff",
              "font": "Arial",
              "size": "12px",
              "style": "bold",
              "hover": {
                "borderColor": "#ffffff",
                "borderEffect": "none",
                "backgroundColor": "#1a1a1a",
                "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
                "color": "#ffffff",
                "font": "Arial",
                "size": "12px",
                "style": "bold"
              }
            }
          ],
          "logo": {
            "url": "https://i.imgur.com/mWkGKDB.jpeg",
            "width": "100px",
            "height": "100px",
            "position": "left"
          }
        },
        "page": {
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "titles": [
            {
              "tag": "h1",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "24px"
            },
            {
              "tag": "h2",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "18px"
            }
          ],
          "text": {
            "color": "#ffffff",
            "font": "Arial",
            "style": "bold",
            "size": "12px"
          },
          "buttons": [
            {
              "name": "primary",
              "type": "circle",
              "backgroundColor": "#1a1a1a",
              "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
              "icon": "fa fa-lightbulb-o",
              "iconPosition": "left",
              "borderColor": "#ffffff",
              "borderEffect": "none",
              "color": "#ffffff",
              "font": "Arial",
              "size": "12px",
              "style": "bold",
              "hover": {
                "borderColor": "#ffffff",
                "borderEffect": "none",
                "backgroundColor": "#1a1a1a",
                "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
                "color": "#ffffff",
                "font": "Arial",
                "size": "12px",
                "style": "bold"
              }
            }
          ]
        },
        "card": {
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "titles": [
            {
              "tag": "h1",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "24px"
            },
            {
              "tag": "h2",
              "color": "#ffffff",
              "font": "Arial",
              "style": "bold",
              "size": "18px"
            }
          ],
          "text": {
            "color": "#ffffff",
            "font": "Arial",
            "style": "bold",
            "size": "12px"
          },
          "buttons": [
            {
              "name": "primary",
              "type": "circle",
              "backgroundColor": "#1a1a1a",
              "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
              "icon": "fa fa-lightbulb-o",
              "iconPosition": "left",
              "borderColor": "#ffffff",
              "borderEffect": "none",
              "color": "#ffffff",
              "font": "Arial",
              "size": "12px",
              "style": "bold",
              "hover": {
                "borderColor": "#ffffff",
                "borderEffect": "none",
                "backgroundColor": "#1a1a1a",
                "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
                "color": "#ffffff",
                "font": "Arial",
                "size": "12px",
                "style": "bold"
              }
            }
          ]
        }
      },
      "web": {
        /* mesmo padrão do mobile */
      }
    }
  ]
}

```

{% endtab %}

{% tab title="Campos da Resposta" %}

* **`templates`** *- Array of Objects*

  Armazena as informações de cada template da empresa solicitada.

  * **`id`** *- String*

    Identificador próprio do template.
  * **`mobile`** *- String*

    Personalização do ambiente Mobile.
  * **`web`** *- String*

    Personalização do ambiente Web.
    {% endtab %}
    {% endtabs %}
    {% endtab %}
    {% endtabs %}

## Detalhes do template

<mark style="color:blue;">`GET`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/templates/:templateId`

Nível de autorização necessário: **`qualquer`**

#### Path Parameters

| Name                                         | Type   | Description    |
| -------------------------------------------- | ------ | -------------- |
| templateId<mark style="color:red;">\*</mark> | String | Id do template |

{% tabs %}
{% tab title="200: OK " %}
{% tabs %}
{% tab title="Exemplo de Resposta" %}

```javascript
{
  "id": "1234124",
  "companyId": "123123",
  "mobile": {
    "theme": "default",
    "mainColorLight": "#e0c160",
    "secondaryColorLight": "#e0c160",
    "mainColorDark": "#e0c160",
    "secondaryColorDark": "#e0c160",
    "header": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "footer": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "page": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    },
    "card": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    }
  },
  "web": {
    /* mesmo padrão do mobile */
  }
}

```

{% endtab %}

{% tab title="Campos da Resposta" %}

* **`id`** *- String*

  Identificador próprio do template.
* **`companyId`** *- String*

  Identificador da empresa
* **`mobile`** *- String*

  Personalização do ambiente Mobile.
* **`web`** *- String*

  Personalização do ambiente Web.
  {% endtab %}
  {% endtabs %}
  {% endtab %}
  {% endtabs %}

## (JWT) Atualiza um template com as informações enviadas

<mark style="color:purple;">`PATCH`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/templates/:templateId`

Nível de permissionamento necessário: **`company_admin`**

#### Path Parameters

| Name                                         | Type   | Description    |
| -------------------------------------------- | ------ | -------------- |
| templateId<mark style="color:red;">\*</mark> | String | ID do Template |

#### Request Body

| Name      | Type   | Description                       |
| --------- | ------ | --------------------------------- |
| mobile    | Object | Personalização do ambiente mobile |
| web       | Array  | Personalização do ambiente web    |
| companyId | Object | Identificador da empresa          |

{% tabs %}
{% tab title="200: OK " %}
{% tabs %}
{% tab title="Exemplo de Resposta" %}

```javascript
{
  "id": "1234",
  "companyId": "123",
  "mobile": {
    "theme": "default",
    "mainColorLight": "#e0c160",
    "secondaryColorLight": "#e0c160",
    "mainColorDark": "#e0c160",
    "secondaryColorDark": "#e0c160",
    "header": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "footer": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ],
      "logo": {
        "url": "https://i.imgur.com/mWkGKDB.jpeg",
        "width": "100px",
        "height": "100px",
        "position": "left"
      }
    },
    "page": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    },
    "card": {
      "backgroundColor": "#1a1a1a",
      "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
      "titles": [
        {
          "tag": "h1",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "24px"
        },
        {
          "tag": "h2",
          "color": "#ffffff",
          "font": "Arial",
          "style": "bold",
          "size": "18px"
        }
      ],
      "text": {
        "color": "#ffffff",
        "font": "Arial",
        "style": "bold",
        "size": "12px"
      },
      "buttons": [
        {
          "name": "primary",
          "type": "circle",
          "backgroundColor": "#1a1a1a",
          "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
          "icon": "fa fa-lightbulb-o",
          "iconPosition": "left",
          "borderColor": "#ffffff",
          "borderEffect": "none",
          "color": "#ffffff",
          "font": "Arial",
          "size": "12px",
          "style": "bold",
          "hover": {
            "borderColor": "#ffffff",
            "borderEffect": "none",
            "backgroundColor": "#1a1a1a",
            "backgroundUrl": "https://i.imgur.com/mWkGKDB.jpeg",
            "color": "#ffffff",
            "font": "Arial",
            "size": "12px",
            "style": "bold"
          }
        }
      ]
    }
  },
  "web": {
    /* mesmo padrão do mobile */
  }
}

```

{% endtab %}

{% tab title="Campos da Resposta" %}

* **`id`** *- String*

  Identificador próprio do template.
* **`companyId`** *- String*

  Identificador da empresa
* **`mobile`** *- String*

  Personalização do ambiente Mobile.
* **`web`** *- String*

  Personalização do ambiente Web.
  {% endtab %}
  {% endtabs %}
  {% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}

{% tab title="403: Forbidden " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 403" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Acesso restrito ao recurso.</td></tr><tr><td align="center">10</td><td>Credenciais de acesso expiradas. Por favor, execute novamente sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401: Unauthorized " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 401" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Credenciais de acesso necessárias. Por favor, execute sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

## (JWT) Remove um template

<mark style="color:red;">`DELETE`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/templates/:templateId`

Nível de autorização necessário: **`company_admin`**

#### Path Parameters

| Name                                         | Type   | Description    |
| -------------------------------------------- | ------ | -------------- |
| templateId<mark style="color:red;">\*</mark> | String | ID fo Template |

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| authorization<mark style="color:red;">\*</mark> | Bearer | JWT         |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}

{% tab title="400: Bad Request " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 400" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1001</td><td>Parâmetro "<em>id</em>" inválido. O campo é obrigatório e deve ser do tipo <em>String</em>.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}

{% endtab %}

{% tab title="401: Unauthorized " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 401" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Credenciais de acesso necessárias. Por favor, execute sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="403: Forbidden " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 403" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Acesso restrito ao recurso.</td></tr><tr><td align="center">10</td><td>Credenciais de acesso expiradas. Por favor, execute novamente sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### Atribuição de Templates

## (JWT) Atribui um template a uma comunidade especifica da empresa

<mark style="color:green;">`POST`</mark> `https://goblockchain.io/gotokens-api/v1/white-label/templates/community/:communityId`

Nível de autorização necessário: **`company_admin`**

#### Path Parameters

| Name                                          | Type   | Description      |
| --------------------------------------------- | ------ | ---------------- |
| communityId<mark style="color:red;">\*</mark> | String | ID da Comunidade |

#### Headers

| Name                                            | Type   | Description |
| ----------------------------------------------- | ------ | ----------- |
| authorization<mark style="color:red;">\*</mark> | Bearer | JWT         |

#### Request Body

| Name                                         | Type   | Description    |
| -------------------------------------------- | ------ | -------------- |
| templateId<mark style="color:red;">\*</mark> | String | ID do template |

{% tabs %}
{% tab title="204: No Content " %}

{% endtab %}

{% tab title="401: Unauthorized " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 401" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Credenciais de acesso necessárias. Por favor, execute sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="403: Forbidden " %}
{% tabs %}
{% tab title="Possíveis Erros HTTP - 403" %}

<table><thead><tr><th width="152" align="center">Código</th><th>Descrição</th></tr></thead><tbody><tr><td align="center">1</td><td>Acesso restrito ao recurso.</td></tr><tr><td align="center">10</td><td>Credenciais de acesso expiradas. Por favor, execute novamente sua autenticação na plataforma.</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}


---

# 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://docs.gotokens.io/gotokens/api-fidelidade/white-label.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.
