Back to top

Winker

Descrição da Winker.

API

Sobre

Aqui podemos descrever detalhes que são comuns a todos os serviços como formatos, headers, tipos de erros, etc

Retornos

Tipos de retorno esperado

HTTP status code summary
200 - OK Everything worked as expected.
204 - No Content A requisição foi bem sucedida mas não encontrou nenhum dado para retornar
207 - Multi-Status Se uma operação foi realizada em batch e algum dos itens não foi realizado com sucesso
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
403 - Forbidden No access to requested resource.
402 - Request Failed The parameters were valid but the request failed.
404 - Not Found The requested resource doesn`t exist.
409 - Conflict The request conflicts with another request (perhaps due to using the same idempotent key).
429 - Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 Server Errors Something went wrong on Stripe`s end. (These are rare.)

Corpo da mensagem de erro

As requisições que gerarem erro devem ter as informações abaixo no corpo da mensagem

{
  "code" : 1234,
  "message" : "Something bad happened :(",
  "description" : "More details about the error here"
}

O status code deve ser diferente de 200 e 201

Corpo da mensagem de sucesso na criação/atualização

As requisições que finalizaram com sucesso devem ter as informações abaixo no corpo da mensagem

{
  "uuid" : "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}

Se a operação foi realizada em batch, com vários dados sendo enviados para criação/atualização/exclusão, o retorno deve ser:

[
    {"uuid" : "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"},
    {"uuid" : "563977f3-b91e-4612-9dc8-6de80680240b"},
    {"uuid" : "3214b935-5484-45db-8890-a7c593b160df"},
    {"uuid" : "5e7dac7b-27c8-4d9c-832f-e451b2ae5d24"}
]

O status code em ambos os casos deve ser 200 ou 201

Corpo da mensagem de sucesso parcial

Se uma operação foi realizada em batch e algum dos itens não foi realizado com sucesso a resposta deve ter as informações abaixo no corpo da mensagem

[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
    "status": 200,
    "data" : { data returned for a single processing }
  },
  {
    "uuid": "d03e6e9f-6f1c-41ac-93eb-1df7f215a613",
    "status": 200,
    "data" : { data returned for a single processing }
  },
  {
    "uuid": "e2d27644-ce0d-41b2-9ead-db65f36f217e",
    "status": 400,
    "data" : { data returned for a single processing 400 error }
  }
]

O status code deve ser 207

Convenções

Valores padrão

Todos os serviços aceitam os parâmetros abaixo

Consultas

Parâmetro Significado Valor padrão
limit número de ítens retornados 10
page número da página a ser usada em conjunto com o limit 1
sort campos e modos de ordenação. Exemplo: /tickets?sort=-priority,created_at. Ordena em ordem descendente por prioridade e ascendente por created_at vazio
fields lista de campos a trazer na consulta vazio

Outros parâmetros enviados via url serão considerados como filtro. Exemplo:

/v1/resource?nome=seguro&id_portal=1,2,3

Demais operações

Parâmetro Significado Valor padrão
sync Se o parâmetro sync = false a API retorna 200 e executa o processo em background, usando filas Cada API tem configurado qual é seu comportamento padrão

Headers padrão

Parâmetro Significado Valores
Accept Indica para a API o formato que é esperado no retorno application/json
Content-Type Indica qual é o formato que está sendo usado para enviar os dados application/json ou multipart/form-data
Authorization Token usado para autenticação Mais detalhes na sessão Tokens
Pagination-Total-Items Usado nas respostas, para indicar o total de resultados
Pagination-Page-Size Usado nas respostas, para indicar número de resultados por página
Pagination-Total-Pages Usado nas respostas, para indicar o total de páginas de resultado

Tokens

O sistema suporta dois tipos de tokens:

Tokens de usuário

É um token no formato JWT que é gerado pela api /auth/login

O token de usuário no formato JWT contém o seguinte conteúdo:

{
  "privateData": {
    "key": 1298309864872831,
    "default_portal": {
      "id_portal": 2057,
      "name": "Condominio 2057"
    },
    "portals": [
      {
        "id_portal": 2057,
        "name": "Condominio 2057"
      },
      {
        "id_portal": 2302,
        "name": "Condominio 2057"
      }
    ],
    "user": {
      "id_user": 1,
      "name": "PJ 1",
      "photo": "http://gateway.winker.com.br./vendor/bin/themes/intra/img/sf_ele.gif",
      "user": "admin@winker.com.br",
      "session_id": "sdfsdfds2323sadsfd"
    },
    "user_token": "e961dd69097a517154db667e16d8db8f1d8947bd385752d2f5126840e59c8871f"
  }
}

Token de aplicação

É um token de uma aplicação instalada em um portal. Ele pode ser de dois formatos: JWT (preferencialmente), ou em texto puro.

O token de aplicação no formato JWT contém o seguinte conteúdo:

{
  "privateData": {
    "key": 1298309864872831,
    "default_portal": {
      "id_portal": 2057,
      "name": "Condominio 2057"
    },
    "portals": [
      {
        "id_portal": 2057,
        "name": "Condominio 2057",
      },
      {
        "id_portal": 2302,
        "name": "Condominio 2057",
      }
    ],
    "app_token": "32516a07380c6e5b36a556b587238a2816bd2eed550228fcfbcaf5b3724f65c20",
    "user": {
      "id_user": 1,
      "name": "PJ 1",
      "photo": "http://gateway.winker.com.br./vendor/bin/themes/intra/img/sf_ele.gif",
      "user": "admin@winker.com.br",
    }
  }
}

Nomenclatura de atributos

Todos os atributos enviados e recebidos pela API devem ser no formato snake_case.

O correto é id_message. Não usar formatos como message-id ou messageId.

Nomenclatura das ações

Na documentação da API preferir o uso de verbos:

Correto

  • Listar reservas

  • Listar reserva

  • Criar reserva

  • Atualizar reserva

  • Remover reserva

  • Realizar login

Incorreto

  • Lista reserva

  • Cria reserva

Autenticação

Login

Realizar login
POST/auth/login

Example URI

POST https://api.winker.com.br/v1/auth/login
Request  Login
HideShow
Headers
Accept: application/json
Content-Type: application/json
Body
{
  "username": "admin@winker.com.br",
  "password": "123",
  "key": 1298309864872831
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "description": "Username do usuário"
    },
    "password": {
      "type": "string",
      "description": "Senha"
    },
    "key": {
      "type": "number",
      "description": "App key"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
  "name": "Hello, world!",
  "token": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Identificador do usuário"
    },
    "name": {
      "type": "string",
      "description": "Nome do usuário"
    },
    "token": {
      "type": "string",
      "description": "Token do usuário conectado"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Logout

Realizar logout
POST/auth/logout

Example URI

POST https://api.winker.com.br/v1/auth/logout
Request  Logout
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  204

Recuperar Senha

Recuperar senha
POST/auth/recover-password

Example URI

POST https://api.winker.com.br/v1/auth/recover-password
Request  Recuperar senha
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "email": "admin@winker.com.br"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "E-mail do usuário"
    }
  }
}
Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Usuário autenticado

Me

Retornar dados do usuário autenticado
GET/me

Example URI

GET https://api.winker.com.br/v1/me
Request  Me
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_user": "1",
  "name": "John Doe",
  "photo_url": "https://wwww.photourl.com/johndoe",
  "portal_default": [
    {
      "id_portal": "1",
      "name": "Ilhas Belas",
      "photo_url": "https://www.photourl.com.br/portal/ilhasbelas"
    }
  ],
  "portals": [
    {
      "id_portal": "1",
      "name": "Ilhas Belas",
      "photo_url": "https://www.photourl.com.br/portal/ilhasbelas"
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_user": {
      "type": "string",
      "description": "Identificador do usuário"
    },
    "name": {
      "type": "string",
      "description": "Nome do usuário"
    },
    "photo_url": {
      "type": "string",
      "description": "Foto do usuário"
    },
    "portal_default": {
      "type": "array",
      "description": "Portal padrão"
    },
    "portals": {
      "type": "array",
      "description": "Portais do usuário"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Application

Listar

Listar os aplicativos disponíveis
GET/application{?target}

Example URI

GET https://api.winker.com.br/v1/application?target=portal
URI Parameters
HideShow
target
string (required) Example: portal

Alvo do aplicativo (portal, provider, user)

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_application": 1,
    "key": "55de77",
    "name": "Agora",
    "events": {
      "Winker/Event/AuthorizedVisitor/Added": {
        "api": "https://EventName1.winker.com.br/v1/configuration",
        "method": "GET",
        "on_install": true,
        "headers": "Authorization: app_token, Accept: application/json"
      },
      "Winker/Event/AuthorizedVisitor/Updated": {
        "api": "https://EventName2.winker.com.br/v1/configuration",
        "method": "PUT",
        "on_install": false,
        "headers": "Authorization: app_token, Accept: application/json"
      }
    },
    "pages": {
      "page1": "https://pages.winker.com.br/pages/page1",
      "page2": "https://pages.winker.com.br/pages/page2"
    },
    "permissions": {
      "PermissionGroup1": [
        "read"
      ],
      "PermissionGroup2": [
        "read"
      ]
    },
    "providers": [
      {
        "id_provider": 46,
        "configuration": {
          "server_api": "http://setupdemo.provider.com:9080/AGORA/"
        }
      },
      {
        "id_provider": 47,
        "configuration": {
          "server_api": "http://121.121.121.121/PSIM/"
        }
      }
    ],
    "version": "1"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_application": {
        "type": "number"
      },
      "key": {
        "type": "string"
      },
      "name": {
        "type": "string",
        "description": "Nome do aplicativo"
      },
      "events": {
        "type": "object",
        "properties": {
          "Winker/Event/AuthorizedVisitor/Added": {
            "type": "object",
            "properties": {
              "api": {
                "type": "string",
                "description": "Url do evento"
              },
              "method": {
                "type": "string",
                "description": "Método do evento"
              },
              "on_install": {
                "type": "boolean"
              },
              "headers": {
                "type": "string",
                "description": "Headers do evento"
              }
            },
            "description": "Exemplo de evento 1"
          },
          "Winker/Event/AuthorizedVisitor/Updated": {
            "type": "object",
            "properties": {
              "api": {
                "type": "string",
                "description": "Url do evento"
              },
              "method": {
                "type": "string",
                "description": "Método do evento"
              },
              "on_install": {
                "type": "boolean"
              },
              "headers": {
                "type": "string",
                "description": "Headers do evento"
              }
            },
            "description": "Exemplo de evento 2"
          }
        },
        "description": "Eventos"
      },
      "pages": {
        "type": "object",
        "properties": {
          "page1": {
            "type": "string"
          },
          "page2": {
            "type": "string"
          }
        },
        "description": "Páginas"
      },
      "permissions": {
        "type": "object",
        "properties": {
          "PermissionGroup1": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Exemplo de grupo de permissão 1"
          },
          "PermissionGroup2": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Exemplo de grupo de permissão 2"
          }
        },
        "description": "Permissões"
      },
      "providers": {
        "type": "array",
        "items": [
          {
            "type": "object",
            "properties": {
              "id_provider": {
                "type": "number",
                "description": "Id do Provider"
              },
              "configuration": {
                "type": "object",
                "properties": {
                  "server_api": {
                    "type": "string"
                  }
                },
                "description": "Configuração do Provider"
              }
            }
          },
          {
            "type": "object",
            "properties": {
              "id_provider": {
                "type": "number",
                "description": "Id do Provider"
              },
              "configuration": {
                "type": "object",
                "properties": {
                  "server_api": {
                    "type": "string"
                  }
                },
                "description": "Configuração do Provider"
              }
            }
          }
        ],
        "description": "Providers"
      },
      "version": {
        "type": "string",
        "description": "Versão do aplicativo"
      }
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar detalhes do aplicativo

Listar os detalhes do aplicativo
GET/application/{id_application}

Example URI

GET https://api.winker.com.br/v1/application/55de77
URI Parameters
HideShow
id_application
string (required) Example: 55de77

Identificador do aplicativo

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_application": 1,
  "key": "55de77",
  "name": "Agora",
  "events": {
    "Winker/Event/AuthorizedVisitor/Added": {
      "api": "https://EventName1.winker.com.br/v1/configuration",
      "method": "GET",
      "on_install": true,
      "headers": "Authorization: app_token, Accept: application/json"
    },
    "Winker/Event/AuthorizedVisitor/Updated": {
      "api": "https://EventName2.winker.com.br/v1/configuration",
      "method": "PUT",
      "on_install": false,
      "headers": "Authorization: app_token, Accept: application/json"
    }
  },
  "pages": {
    "page1": "https://pages.winker.com.br/pages/page1",
    "page2": "https://pages.winker.com.br/pages/page2"
  },
  "permissions": {
    "PermissionGroup1": [
      "read"
    ],
    "PermissionGroup2": [
      "read"
    ]
  },
  "providers": [
    {
      "id_provider": 46,
      "configuration": {
        "server_api": "http://setupdemo.provider.com:9080/AGORA/"
      }
    },
    {
      "id_provider": 47,
      "configuration": {
        "server_api": "http://121.121.121.121/PSIM/"
      }
    }
  ],
  "version": "1"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_application": {
      "type": "number"
    },
    "key": {
      "type": "string"
    },
    "name": {
      "type": "string",
      "description": "Nome do aplicativo"
    },
    "events": {
      "type": "object",
      "properties": {
        "Winker/Event/AuthorizedVisitor/Added": {
          "type": "object",
          "properties": {
            "api": {
              "type": "string",
              "description": "Url do evento"
            },
            "method": {
              "type": "string",
              "description": "Método do evento"
            },
            "on_install": {
              "type": "boolean"
            },
            "headers": {
              "type": "string",
              "description": "Headers do evento"
            }
          },
          "description": "Exemplo de evento 1"
        },
        "Winker/Event/AuthorizedVisitor/Updated": {
          "type": "object",
          "properties": {
            "api": {
              "type": "string",
              "description": "Url do evento"
            },
            "method": {
              "type": "string",
              "description": "Método do evento"
            },
            "on_install": {
              "type": "boolean"
            },
            "headers": {
              "type": "string",
              "description": "Headers do evento"
            }
          },
          "description": "Exemplo de evento 2"
        }
      },
      "description": "Eventos"
    },
    "pages": {
      "type": "object",
      "properties": {
        "page1": {
          "type": "string"
        },
        "page2": {
          "type": "string"
        }
      },
      "description": "Páginas"
    },
    "permissions": {
      "type": "object",
      "properties": {
        "PermissionGroup1": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Exemplo de grupo de permissão 1"
        },
        "PermissionGroup2": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Exemplo de grupo de permissão 2"
        }
      },
      "description": "Permissões"
    },
    "providers": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "id_provider": {
              "type": "number",
              "description": "Id do Provider"
            },
            "configuration": {
              "type": "object",
              "properties": {
                "server_api": {
                  "type": "string"
                }
              },
              "description": "Configuração do Provider"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "id_provider": {
              "type": "number",
              "description": "Id do Provider"
            },
            "configuration": {
              "type": "object",
              "properties": {
                "server_api": {
                  "type": "string"
                }
              },
              "description": "Configuração do Provider"
            }
          }
        }
      ],
      "description": "Providers"
    },
    "version": {
      "type": "string",
      "description": "Versão do aplicativo"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar providers

Listar os providers
GET/application/provider

Example URI

GET https://api.winker.com.br/v1/application/provider
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: app_token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_provider": 1,
  "configuration": {
    "server_api": "Hello, world!"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_provider": {
      "type": "number",
      "description": "Id do Provider"
    },
    "configuration": {
      "type": "object",
      "properties": {
        "server_api": {
          "type": "string",
          "description": "Endereço da API"
        }
      },
      "description": "Configuração do Provider"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar detalhes do provider

Listar os detalhes do provider
GET/application/provider/{id_provider}

Example URI

GET https://api.winker.com.br/v1/application/provider/1
URI Parameters
HideShow
id_provider
number (required) Example: 1

Identificador do provider

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_provider": 1,
  "configuration": {
    "server_api": "Hello, world!"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_provider": {
      "type": "number",
      "description": "Id do Provider"
    },
    "configuration": {
      "type": "object",
      "properties": {
        "server_api": {
          "type": "string",
          "description": "Endereço da API"
        }
      },
      "description": "Configuração do Provider"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar os labels das permissões do aplicativo

Listar permissões do aplicativo
GET/application/permission-labels{?id_application}

Example URI

GET https://api.winker.com.br/v1/application/permission-labels?id_application=55de77
URI Parameters
HideShow
id_application
string (required) Example: 55de77

Identificador do aplicativo

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "User": {
    "name": "Cadastro de usuários",
    "value": [
      "read"
    ]
  },
  "AuthorizedPeople": {
    "name": "Pessoas autorizadas",
    "value": [
      "read"
    ]
  },
  "Division": {
    "name": "Divisões",
    "value": [
      "read"
    ]
  },
  "ProviderPlugin": {
    "name": "Gestor portal que utiliza esse plugin",
    "value": [
      "read"
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "User": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "array"
        }
      },
      "description": "User"
    },
    "AuthorizedPeople": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "array"
        }
      },
      "description": "AuthorizedPeople"
    },
    "Division": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "array"
        }
      },
      "description": "Division"
    },
    "ProviderPlugin": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "array"
        }
      },
      "description": "ProviderPlugin"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Instalar aplicativo em um portal

Instalar aplicativo
POST/application/install/{id_portal}

Example URI

POST https://api.winker.com.br/v1/application/install/2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Body
{
  "id_application": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_application": {
      "type": "number",
      "description": "applicationId"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_portal": 2057,
  "id_install": 126,
  "application": {
    "id_application": 1,
    "key": "55de77",
    "name": "Agora",
    "events": {
      "Winker/Event/AuthorizedVisitor/Added": {
        "api": "https://EventName1.winker.com.br/v1/configuration",
        "method": "GET",
        "on_install": true,
        "headers": "Authorization: app_token, Accept: application/json"
      },
      "Winker/Event/AuthorizedVisitor/Updated": {
        "api": "https://EventName2.winker.com.br/v1/configuration",
        "method": "PUT",
        "on_install": false,
        "headers": "Authorization: app_token, Accept: application/json"
      }
    },
    "pages": {
      "page1": "https://pages.winker.com.br/pages/page1",
      "page2": "https://pages.winker.com.br/pages/page2"
    },
    "permissions": {
      "PermissionGroup1": [
        "read"
      ],
      "PermissionGroup2": [
        "read"
      ]
    },
    "providers": [
      {
        "id_provider": 46,
        "configuration": {
          "server_api": "http://setupdemo.provider.com:9080/AGORA/"
        }
      },
      {
        "id_provider": 47,
        "configuration": {
          "server_api": "http://121.121.121.121/PSIM/"
        }
      }
    ],
    "version": "1"
  },
  "status": {
    "code": "preparing",
    "value": "Preparando"
  },
  "token": "TOKEN-EXAMPLE",
  "created_at": "2017-10-04 17:25:03"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_portal": {
      "type": "number",
      "description": "Id Portal"
    },
    "id_install": {
      "type": "number",
      "description": "Id Instalação"
    },
    "application": {
      "type": "object",
      "properties": {
        "id_application": {
          "type": "number"
        },
        "key": {
          "type": "string"
        },
        "name": {
          "type": "string",
          "description": "Nome do aplicativo"
        },
        "events": {
          "type": "object",
          "properties": {
            "Winker/Event/AuthorizedVisitor/Added": {
              "type": "object",
              "properties": {
                "api": {
                  "type": "string",
                  "description": "Url do evento"
                },
                "method": {
                  "type": "string",
                  "description": "Método do evento"
                },
                "on_install": {
                  "type": "boolean"
                },
                "headers": {
                  "type": "string",
                  "description": "Headers do evento"
                }
              },
              "description": "Exemplo de evento 1"
            },
            "Winker/Event/AuthorizedVisitor/Updated": {
              "type": "object",
              "properties": {
                "api": {
                  "type": "string",
                  "description": "Url do evento"
                },
                "method": {
                  "type": "string",
                  "description": "Método do evento"
                },
                "on_install": {
                  "type": "boolean"
                },
                "headers": {
                  "type": "string",
                  "description": "Headers do evento"
                }
              },
              "description": "Exemplo de evento 2"
            }
          },
          "description": "Eventos"
        },
        "pages": {
          "type": "object",
          "properties": {
            "page1": {
              "type": "string"
            },
            "page2": {
              "type": "string"
            }
          },
          "description": "Páginas"
        },
        "permissions": {
          "type": "object",
          "properties": {
            "PermissionGroup1": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Exemplo de grupo de permissão 1"
            },
            "PermissionGroup2": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Exemplo de grupo de permissão 2"
            }
          },
          "description": "Permissões"
        },
        "providers": {
          "type": "array",
          "items": [
            {
              "type": "object",
              "properties": {
                "id_provider": {
                  "type": "number",
                  "description": "Id do Provider"
                },
                "configuration": {
                  "type": "object",
                  "properties": {
                    "server_api": {
                      "type": "string"
                    }
                  },
                  "description": "Configuração do Provider"
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "id_provider": {
                  "type": "number",
                  "description": "Id do Provider"
                },
                "configuration": {
                  "type": "object",
                  "properties": {
                    "server_api": {
                      "type": "string"
                    }
                  },
                  "description": "Configuração do Provider"
                }
              }
            }
          ],
          "description": "Providers"
        },
        "version": {
          "type": "string",
          "description": "Versão do aplicativo"
        }
      },
      "description": "Aplicação"
    },
    "status": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string",
          "enum": [
            "preparing",
            "installing",
            "installed",
            "uninstalling"
          ],
          "description": "status code"
        },
        "value": {
          "type": "string",
          "enum": [
            "Preparando",
            "Instalando",
            "Instalado",
            "Desinstalando"
          ],
          "description": "status value"
        }
      },
      "description": "Status"
    },
    "token": {
      "type": "string",
      "description": "Token"
    },
    "created_at": {
      "type": "string",
      "description": "Data de instalação"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Informar que o aplicativo foi configurado

Informar configuração finalizada
GET/application/configured

Example URI

GET https://api.winker.com.br/v1/application/configured
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Response  204
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Retornar informações do aplicativo pelo token

Retornar informações do aplicativo pelo token
GET/application/installed

Example URI

GET https://api.winker.com.br/v1/application/installed
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_portal": 2057,
    "id_install": 126,
    "application": {
      "id_application": 1,
      "key": "55de77",
      "name": "Agora",
      "events": {
        "Winker/Event/AuthorizedVisitor/Added": {
          "api": "https://EventName1.winker.com.br/v1/configuration",
          "method": "GET",
          "on_install": true,
          "headers": "Authorization: app_token, Accept: application/json"
        },
        "Winker/Event/AuthorizedVisitor/Updated": {
          "api": "https://EventName2.winker.com.br/v1/configuration",
          "method": "PUT",
          "on_install": false,
          "headers": "Authorization: app_token, Accept: application/json"
        }
      },
      "pages": {
        "page1": "https://pages.winker.com.br/pages/page1",
        "page2": "https://pages.winker.com.br/pages/page2"
      },
      "permissions": {
        "PermissionGroup1": [
          "read"
        ],
        "PermissionGroup2": [
          "read"
        ]
      },
      "providers": [
        {
          "id_provider": 46,
          "configuration": {
            "server_api": "http://setupdemo.provider.com:9080/AGORA/"
          }
        },
        {
          "id_provider": 47,
          "configuration": {
            "server_api": "http://121.121.121.121/PSIM/"
          }
        }
      ],
      "version": "1"
    },
    "status": {
      "code": "preparing",
      "value": "Preparando"
    },
    "token": "TOKEN-EXAMPLE",
    "created_at": "2017-10-04 17:25:03"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_portal": {
        "type": "number",
        "description": "Id Portal"
      },
      "id_install": {
        "type": "number",
        "description": "Id Instalação"
      },
      "application": {
        "type": "object",
        "properties": {
          "id_application": {
            "type": "number"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Nome do aplicativo"
          },
          "events": {
            "type": "object",
            "properties": {
              "Winker/Event/AuthorizedVisitor/Added": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 1"
              },
              "Winker/Event/AuthorizedVisitor/Updated": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 2"
              }
            },
            "description": "Eventos"
          },
          "pages": {
            "type": "object",
            "properties": {
              "page1": {
                "type": "string"
              },
              "page2": {
                "type": "string"
              }
            },
            "description": "Páginas"
          },
          "permissions": {
            "type": "object",
            "properties": {
              "PermissionGroup1": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 1"
              },
              "PermissionGroup2": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 2"
              }
            },
            "description": "Permissões"
          },
          "providers": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              }
            ],
            "description": "Providers"
          },
          "version": {
            "type": "string",
            "description": "Versão do aplicativo"
          }
        },
        "description": "Aplicação"
      },
      "status": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "preparing",
              "installing",
              "installed",
              "uninstalling"
            ],
            "description": "status code"
          },
          "value": {
            "type": "string",
            "enum": [
              "Preparando",
              "Instalando",
              "Instalado",
              "Desinstalando"
            ],
            "description": "status value"
          }
        },
        "description": "Status"
      },
      "token": {
        "type": "string",
        "description": "Token"
      },
      "created_at": {
        "type": "string",
        "description": "Data de instalação"
      }
    }
  }
}
Response  204
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar instalações pelo target

Listar instalações pelo target
GET/application/install/{target}/{id}

Example URI

GET https://api.winker.com.br/v1/application/install/portal/9
URI Parameters
HideShow
target
string (required) Example: portal

Tipo do aplicativo instalado (portal, provider, token, application)

id
string (required) Example: 9

Identificador do target

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_portal": 2057,
    "id_install": 126,
    "application": {
      "id_application": 1,
      "key": "55de77",
      "name": "Agora",
      "events": {
        "Winker/Event/AuthorizedVisitor/Added": {
          "api": "https://EventName1.winker.com.br/v1/configuration",
          "method": "GET",
          "on_install": true,
          "headers": "Authorization: app_token, Accept: application/json"
        },
        "Winker/Event/AuthorizedVisitor/Updated": {
          "api": "https://EventName2.winker.com.br/v1/configuration",
          "method": "PUT",
          "on_install": false,
          "headers": "Authorization: app_token, Accept: application/json"
        }
      },
      "pages": {
        "page1": "https://pages.winker.com.br/pages/page1",
        "page2": "https://pages.winker.com.br/pages/page2"
      },
      "permissions": {
        "PermissionGroup1": [
          "read"
        ],
        "PermissionGroup2": [
          "read"
        ]
      },
      "providers": [
        {
          "id_provider": 46,
          "configuration": {
            "server_api": "http://setupdemo.provider.com:9080/AGORA/"
          }
        },
        {
          "id_provider": 47,
          "configuration": {
            "server_api": "http://121.121.121.121/PSIM/"
          }
        }
      ],
      "version": "1"
    },
    "status": {
      "code": "preparing",
      "value": "Preparando"
    },
    "token": "TOKEN-EXAMPLE",
    "created_at": "2017-10-04 17:25:03"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_portal": {
        "type": "number",
        "description": "Id Portal"
      },
      "id_install": {
        "type": "number",
        "description": "Id Instalação"
      },
      "application": {
        "type": "object",
        "properties": {
          "id_application": {
            "type": "number"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Nome do aplicativo"
          },
          "events": {
            "type": "object",
            "properties": {
              "Winker/Event/AuthorizedVisitor/Added": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 1"
              },
              "Winker/Event/AuthorizedVisitor/Updated": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 2"
              }
            },
            "description": "Eventos"
          },
          "pages": {
            "type": "object",
            "properties": {
              "page1": {
                "type": "string"
              },
              "page2": {
                "type": "string"
              }
            },
            "description": "Páginas"
          },
          "permissions": {
            "type": "object",
            "properties": {
              "PermissionGroup1": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 1"
              },
              "PermissionGroup2": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 2"
              }
            },
            "description": "Permissões"
          },
          "providers": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              }
            ],
            "description": "Providers"
          },
          "version": {
            "type": "string",
            "description": "Versão do aplicativo"
          }
        },
        "description": "Aplicação"
      },
      "status": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "preparing",
              "installing",
              "installed",
              "uninstalling"
            ],
            "description": "status code"
          },
          "value": {
            "type": "string",
            "enum": [
              "Preparando",
              "Instalando",
              "Instalado",
              "Desinstalando"
            ],
            "description": "status value"
          }
        },
        "description": "Status"
      },
      "token": {
        "type": "string",
        "description": "Token"
      },
      "created_at": {
        "type": "string",
        "description": "Data de instalação"
      }
    }
  }
}
Response  204
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar instalações de um provider

Listar instalações de um provider
GET/application/install/provider/{id_provider}

Example URI

GET https://api.winker.com.br/v1/application/install/provider/9
URI Parameters
HideShow
id_provider
number (required) Example: 9

Identificador do provider

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_portal": 2057,
    "id_install": 126,
    "application": {
      "id_application": 1,
      "key": "55de77",
      "name": "Agora",
      "events": {
        "Winker/Event/AuthorizedVisitor/Added": {
          "api": "https://EventName1.winker.com.br/v1/configuration",
          "method": "GET",
          "on_install": true,
          "headers": "Authorization: app_token, Accept: application/json"
        },
        "Winker/Event/AuthorizedVisitor/Updated": {
          "api": "https://EventName2.winker.com.br/v1/configuration",
          "method": "PUT",
          "on_install": false,
          "headers": "Authorization: app_token, Accept: application/json"
        }
      },
      "pages": {
        "page1": "https://pages.winker.com.br/pages/page1",
        "page2": "https://pages.winker.com.br/pages/page2"
      },
      "permissions": {
        "PermissionGroup1": [
          "read"
        ],
        "PermissionGroup2": [
          "read"
        ]
      },
      "providers": [
        {
          "id_provider": 46,
          "configuration": {
            "server_api": "http://setupdemo.provider.com:9080/AGORA/"
          }
        },
        {
          "id_provider": 47,
          "configuration": {
            "server_api": "http://121.121.121.121/PSIM/"
          }
        }
      ],
      "version": "1"
    },
    "status": {
      "code": "preparing",
      "value": "Preparando"
    },
    "token": "TOKEN-EXAMPLE",
    "created_at": "2017-10-04 17:25:03"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_portal": {
        "type": "number",
        "description": "Id Portal"
      },
      "id_install": {
        "type": "number",
        "description": "Id Instalação"
      },
      "application": {
        "type": "object",
        "properties": {
          "id_application": {
            "type": "number"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Nome do aplicativo"
          },
          "events": {
            "type": "object",
            "properties": {
              "Winker/Event/AuthorizedVisitor/Added": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 1"
              },
              "Winker/Event/AuthorizedVisitor/Updated": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 2"
              }
            },
            "description": "Eventos"
          },
          "pages": {
            "type": "object",
            "properties": {
              "page1": {
                "type": "string"
              },
              "page2": {
                "type": "string"
              }
            },
            "description": "Páginas"
          },
          "permissions": {
            "type": "object",
            "properties": {
              "PermissionGroup1": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 1"
              },
              "PermissionGroup2": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 2"
              }
            },
            "description": "Permissões"
          },
          "providers": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              }
            ],
            "description": "Providers"
          },
          "version": {
            "type": "string",
            "description": "Versão do aplicativo"
          }
        },
        "description": "Aplicação"
      },
      "status": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "preparing",
              "installing",
              "installed",
              "uninstalling"
            ],
            "description": "status code"
          },
          "value": {
            "type": "string",
            "enum": [
              "Preparando",
              "Instalando",
              "Instalado",
              "Desinstalando"
            ],
            "description": "status value"
          }
        },
        "description": "Status"
      },
      "token": {
        "type": "string",
        "description": "Token"
      },
      "created_at": {
        "type": "string",
        "description": "Data de instalação"
      }
    }
  }
}
Response  204
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar eventos de uma instalação

Listar eventos
GET/application/event

Example URI

GET https://api.winker.com.br/v1/application/event
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "header": {
    "waiting": 2,
    "processing": 0,
    "failing": 0,
    "failed": 1,
    "canceled": 0,
    "success": 0
  },
  "events": [
    {
      "protocol": "3887a082",
      "event_name": "Aplicação removida",
      "event_class_name": "Winker/Event/Application/Uninstalled",
      "data": {
        "payload_item1": "111",
        "payload_item2": "222"
      },
      "status": "failed",
      "retries": 10,
      "created": "2014-12-06T16:15:13+0000",
      "updated": "2014-12-06T14:21:17+0000",
      "commands": [
        {
          "name": "Webhook",
          "class_name": "Domain/Command/OutputHook/OutputHook",
          "status": "failed",
          "errors": "Message dispatch failed during invoke-handler phase. Error: Error",
          "error_trace": "#0 /var/www/error.php(116): someClass->failed()\\n#1 /var/www/someClass.php(79): AnotherClass->handleException()",
          "created": "2014-12-06T16:21:13+0000",
          "updated": "2014-12-06T14:21:17+0000"
        }
      ]
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "header": {
      "type": "object",
      "properties": {
        "waiting": {
          "type": "number",
          "description": "Total de eventos com status `waiting`"
        },
        "processing": {
          "type": "number",
          "description": "Total de eventos com status `processing`"
        },
        "failing": {
          "type": "number",
          "description": "Total de eventos com status `failing`"
        },
        "failed": {
          "type": "number",
          "description": "Total de eventos com status `failed`"
        },
        "canceled": {
          "type": "number",
          "description": "Total de eventos com status `canceled`"
        },
        "success": {
          "type": "number",
          "description": "Total de eventos com status `success`"
        }
      },
      "description": "Total de eventos"
    },
    "events": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "protocol": {
            "type": "string",
            "description": "Identificador do evento"
          },
          "event_name": {
            "type": "string",
            "description": "Nome do evento"
          },
          "event_class_name": {
            "type": "string",
            "description": "Classe do evento"
          },
          "data": {
            "type": "object",
            "properties": {
              "payload_item1": {
                "type": "string"
              },
              "payload_item2": {
                "type": "string"
              }
            },
            "description": "Payload do evento"
          },
          "status": {
            "type": "string",
            "enum": [
              "waiting",
              "processing",
              "failing",
              "failed",
              "canceled",
              "success"
            ],
            "description": "status do evento"
          },
          "retries": {
            "type": "number",
            "description": "Número de tentativas"
          },
          "created": {
            "type": "string",
            "description": "Data da criação do evento"
          },
          "updated": {
            "type": "string",
            "description": "Data da última atualização do evento"
          },
          "commands": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "Nome do comando"
                },
                "class_name": {
                  "type": "string",
                  "description": "Classe do comando"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "waiting",
                    "processing",
                    "failing",
                    "failed",
                    "canceled",
                    "success"
                  ],
                  "description": "status do comando"
                },
                "errors": {
                  "type": "string",
                  "description": "Mensagem de erro"
                },
                "error_trace": {
                  "type": "string",
                  "description": "Trace da Exception"
                },
                "created": {
                  "type": "string",
                  "description": "Data da criação do evento"
                },
                "updated": {
                  "type": "string",
                  "description": "Data da última atualização do evento"
                }
              }
            },
            "description": "Comandos executados pelo evento"
          }
        }
      }
    }
  }
}
Response  204
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Remover a instalação de um aplicativo do portal

Remover instalação
DELETE/application/install/{id_portal}/{id_application}

Example URI

DELETE https://api.winker.com.br/v1/application/install/2057/1
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_application
number (required) Example: 1

Identificador do aplicativo

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Response  200
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Informar que o aplicativo foi desinstalado

Informar remoção concluida
GET/application/uninstalled

Example URI

GET https://api.winker.com.br/v1/application/uninstalled
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
Response  204
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Consumption

Informações do água/gás

Setup

Listar as configurações do portal
GET/consumption/setup?id_portal={id_portal}

Example URI

GET https://api.winker.com.br/v1/consumption/setup?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "unit_nomenclature": "Apartamento",
  "division_nomenclature": "Bloco",
  "manager": "Síndico",
  "active": "1",
  "consumption_variation_percentage": "30",
  "months_average_consumption": "6",
  "numerical_precision": "3",
  "type_reading": "`{\"active\":1,\"color\":\"#AC145A\",\"idtype\":1,\"identifier\":\"eletricidade\",\"measureunit\":\"kw/h\",\"name\":\"Eletricidade\"}",
  "structure": "{\"divisions\":[{\"id_division\":6121,\"name\":\"Administração\",\"administrative\":\"1\"},{\"id_division\":1,\"name\":\"Bloco 1\",\"administrative\":\"0\"},{\"id_division\":2,\"name\":\"Bloco 2\",\"administrative\":\"0\"},{\"id_division\":3,\"name\":\"Bloco 3\",\"administrative\":\"0\"}]}",
  "type_structure": "unidade",
  "validate": "1"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "unit_nomenclature": {
      "type": "string"
    },
    "division_nomenclature": {
      "type": "string"
    },
    "manager": {
      "type": "string"
    },
    "active": {
      "type": "string"
    },
    "consumption_variation_percentage": {
      "type": "string"
    },
    "months_average_consumption": {
      "type": "string"
    },
    "numerical_precision": {
      "type": "string"
    },
    "type_reading": {
      "type": "string"
    },
    "structure": {
      "type": "string"
    },
    "type_structure": {
      "type": "string"
    },
    "validate": {
      "type": "string"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Document

Listar documentos do portal

Listar documentos
GET/document

Example URI

GET https://api.winker.com.br/v1/document
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_document": 27539,
    "name": "Documento 27539",
    "created": "2018-02-20T16:39:53-0300",
    "id_document_type": 14932,
    "type": "Outros",
    "description": "descriptionnns",
    "file": 1111
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Download do documento do portal

Download do documento
GET/document/{uuid}/download

Example URI

GET https://api.winker.com.br/v1/document/11122/download
URI Parameters
HideShow
uuid
number (required) Example: 11122

Identificador do documento

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

FAQ

Perguntas e Respostas Frequentes

Setup

Listar as perguntas e respostas frequentes
GET/faq?id_portal={id_portal}

Example URI

GET https://api.winker.com.br/v1/faq?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_faq": "11",
  "question": "Qual o custo para alugar o salão de festas?",
  "answer": "Resposta1",
  "id_portal": "1"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_faq": {
      "type": "string"
    },
    "question": {
      "type": "string"
    },
    "answer": {
      "type": "string"
    },
    "id_portal": {
      "type": "string"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Portaria

Visitas agendadas, autorizadas e previsões de visita

Inserir nova previsão de visita

Nova visita
POST/gatekeeper?id_portal={id_portal}

Example URI

POST https://api.winker.com.br/v1/gatekeeper?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Body
{
  "name": "Pátio da Flores",
  "doc_cnpj": "49.520.741/0001-92",
  "phone": 489984571624,
  "adress": "Assis brasil",
  "adress_number": 6699,
  "adress_complement": "asdasd",
  "adress_neighborhood": "Ponta de Baixo",
  "adress_city": "São josé",
  "adress_state": "Sc",
  "adress_zipcode": 88104200,
  "email_portal": "portal@mail.com",
  "portal_type": "Condomínio",
  "plans": [],
  "active": true,
  "provider": {
    "id_provider": 1,
    "activities": [
      "27"
    ]
  },
  "application_portal": {
    "id_install": 123123
  },
  "configuration": {
    "models": [
      "portal",
      "division",
      "unit"
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nome"
    },
    "doc_cnpj": {
      "type": "string",
      "description": "Cnpj"
    },
    "phone": {
      "type": "number",
      "description": "Telefone"
    },
    "adress": {
      "type": "string",
      "description": "Endereço"
    },
    "adress_number": {
      "type": "number",
      "description": "Numero"
    },
    "adress_complement": {
      "type": "string",
      "description": "Complemento"
    },
    "adress_neighborhood": {
      "type": "string",
      "description": "Bairro"
    },
    "adress_city": {
      "type": "string",
      "description": "Cidade"
    },
    "adress_state": {
      "type": "string",
      "description": "Estado"
    },
    "adress_zipcode": {
      "type": "number",
      "description": "Cep"
    },
    "email_portal": {
      "type": "string",
      "description": "Email"
    },
    "portal_type": {
      "type": "string",
      "description": "Tipo portal [Condomínio,Associação,Clube de futebol,Coworking,Empresarial]"
    },
    "plans": {
      "description": "Planos [4,5]"
    },
    "active": {
      "type": "boolean",
      "description": "Ativo"
    },
    "provider": {
      "type": "object",
      "properties": {
        "id_provider": {
          "type": "number",
          "description": "id do provider"
        },
        "activities": {
          "type": "array"
        }
      },
      "description": "Provider"
    },
    "application_portal": {
      "type": "object",
      "properties": {
        "id_install": {
          "type": "number",
          "description": "id application Portal"
        }
      },
      "description": "application portal"
    },
    "configuration": {
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "description": "Models a integrar"
        }
      },
      "description": "Configuracao de integracao"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Identificador da entidade gerado"
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar pessoas autorizadas com previsão de visita

Listar visitas
GET/gatekeeper(?id_portal={id_portal})

Example URI

GET https://api.winker.com.br/v1/gatekeeper(?id_portal=2057)
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_visit_prevision": 27260,
    "visitor": "Evandro Carreira",
    "observation": "null",
    "showed": "null",
    "canceled": "null",
    "created": "2018-07-24T14:43:23-0300",
    "id_unit": 1,
    "prevision_start": "2019-07-07T20:00:00-0300",
    "prevision_end": "null",
    "prevision_hour": "20:00",
    "duration": "Unique",
    "date_canceled": "null",
    "notify_arrival": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Upload

Realizar upload de arquivos

multipart/form-data

Fazer upload (multipart/form-data)
POST/upload/multipart

Example URI

POST https://api.winker.com.br/v1/upload/multipart
Request  Upload de um arquivo
HideShow
Headers
Accept: application/json
Authorization: JWT
Content-Disposition: form-data; name="fieldname"; filename="filename.jpg"
Content-Type: image/jpeg
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Identificador da entidade gerado"
    }
  }
}

Base64

Fazer upload (Base64)
POST/upload/base64

Example URI

POST https://api.winker.com.br/v1/upload/base64
Request  Upload de um arquivo
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "name": "file.txt",
  "content": "ZmlsZSBjb250ZW50IGluIGJhc2U2NA=="
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nome do arquivo"
    },
    "content": {
      "type": "string",
      "description": "Conteúdo do arquivo formatado como Base64"
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Identificador da entidade gerado"
    }
  }
}
Request  Upload de arquivos em lote
HideShow
Headers
Accept: application/json
Content-Type: application/json
Body
[
  {
    "name": "file.txt",
    "content": "ZmlsZSBjb250ZW50IGluIGJhc2U2NA=="
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Nome do arquivo"
      },
      "content": {
        "type": "string",
        "description": "Conteúdo do arquivo formatado como Base64"
      }
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "uuid": {
        "type": "string",
        "description": "Identificador da entidade gerado"
      }
    }
  }
}
Response  207
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
    "code": 200,
    "message": "Hello, world!"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "uuid": {
        "type": "string",
        "description": "Identificador da entidade"
      },
      "code": {
        "type": "number",
        "description": "Status code"
      },
      "message": {
        "type": "string",
        "description": "Descrição do status"
      }
    }
  }
}

Mensagem

Mensagens

Criar/alterar mensagens
POST/message?id_portal={id_portal}

Parâmetros especiais

Para criar uma mensagem é necessário os parâmetros abaixo. Para encontrar os possíveis valores basta usar a url indicada

id_message_type - Tipo da mensagem. Valores em /portal/{id_portal}/config/message-categories

id_message_administrative_category - Sub-categoria da mensagem. Valores em /portal/{id_portal}/config/message-administrativeCategories

to - Destinatários da mensagem. Valores em /portal/{id_portal}/config/message-to

files - Array com os ids dos anexos. Valores em

Example URI

POST https://api.winker.com.br/v1/message?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Criar uma mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Body
{
  "subject": "New message",
  "to": [
    "all_users"
  ],
  "description": "New message body",
  "id_message_administrative_category": 15574,
  "files": [
    1
  ],
  "id_message_type": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "subject": {
      "type": "string",
      "description": "Assunto da mensagem"
    },
    "to": {
      "type": "array",
      "description": "Destinatário"
    },
    "description": {
      "type": "string",
      "description": "Corpo da mensagem"
    },
    "id_message_administrative_category": {
      "type": "number",
      "description": "Sub categoria da mensagem"
    },
    "files": {
      "type": "array",
      "description": "Arquivos anexados"
    },
    "id_message_type": {
      "type": "number",
      "description": "Tipo da mensagem"
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Identificador da entidade gerado"
    }
  }
}
Request  Criar mensagens em lote
HideShow
Headers
Accept: application/json
Content-Type: application/json
Body
[
  {
    "subject": "New message",
    "to": [
      "all_users"
    ],
    "description": "New message body",
    "id_message_administrative_category": 15574,
    "files": [
      1
    ],
    "id_message_type": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "subject": {
        "type": "string",
        "description": "Assunto da mensagem"
      },
      "to": {
        "type": "array",
        "description": "Destinatário"
      },
      "description": {
        "type": "string",
        "description": "Corpo da mensagem"
      },
      "id_message_administrative_category": {
        "type": "number",
        "description": "Sub categoria da mensagem"
      },
      "files": {
        "type": "array",
        "description": "Arquivos anexados"
      },
      "id_message_type": {
        "type": "number",
        "description": "Tipo da mensagem"
      }
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "uuid": {
        "type": "string",
        "description": "Identificador da entidade gerado"
      }
    }
  }
}
Response  207
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
    "code": 200,
    "message": "Hello, world!"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "uuid": {
        "type": "string",
        "description": "Identificador da entidade"
      },
      "code": {
        "type": "number",
        "description": "Status code"
      },
      "message": {
        "type": "string",
        "description": "Descrição do status"
      }
    }
  }
}

Mensagens

Listar mensagens
GET/message/{box}/{status}?id_portal={id_portal}

Example URI

GET https://api.winker.com.br/v1/message/box/status?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

box
string (optional) 

Caixa postal a listar

Choices: administrative_issues warning lost_and_found classifieds recommendations groups general snooze provider

status
string (optional) 

Situação da mensagem

Choices: waiting opened in_progress closed

Request  Listar mensagens
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "subject": "New message",
    "to": [
      "all_users"
    ],
    "description": "New message body",
    "id_message_administrative_category": 15574,
    "files": [
      1
    ],
    "id_message_type": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "subject": {
        "type": "string",
        "description": "Assunto da mensagem"
      },
      "to": {
        "type": "array",
        "description": "Destinatário"
      },
      "description": {
        "type": "string",
        "description": "Corpo da mensagem"
      },
      "id_message_administrative_category": {
        "type": "number",
        "description": "Sub categoria da mensagem"
      },
      "files": {
        "type": "array",
        "description": "Arquivos anexados"
      },
      "id_message_type": {
        "type": "number",
        "description": "Tipo da mensagem"
      }
    }
  }
}

Obter caixas de mensagens

Obter caixas
GET/message/boxes?id_message={id_message}

Example URI

GET https://api.winker.com.br/v1/message/boxes?id_message=1
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "categories": {
      "id_message_type": 1,
      "code": "administrative_issues",
      "title": "Assuntos administrativos",
      "provider": "null"
    }
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "categories": {
        "type": "object",
        "properties": {
          "id_message_type": {
            "type": "number",
            "description": "Identificador da Box"
          },
          "code": {
            "type": "string",
            "description": "Código administrativo"
          },
          "title": {
            "type": "string",
            "description": "Titulo da box"
          },
          "provider": {
            "type": "string",
            "description": "Fornecedor"
          }
        },
        "description": "Boxes"
      }
    }
  }
}
Response  207
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
    "code": 200,
    "message": "Hello, world!"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "uuid": {
        "type": "string",
        "description": "Identificador da entidade"
      },
      "code": {
        "type": "number",
        "description": "Status code"
      },
      "message": {
        "type": "string",
        "description": "Descrição do status"
      }
    }
  }
}

Mensagem

Ver mensagem
GET/message/{id_message}

Example URI

GET https://api.winker.com.br/v1/message/1
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Ver mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "subject": "New message",
  "to": [
    "all_users"
  ],
  "description": "New message body",
  "id_message_administrative_category": 15574,
  "files": [
    1
  ],
  "id_message_type": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "subject": {
      "type": "string",
      "description": "Assunto da mensagem"
    },
    "to": {
      "type": "array",
      "description": "Destinatário"
    },
    "description": {
      "type": "string",
      "description": "Corpo da mensagem"
    },
    "id_message_administrative_category": {
      "type": "number",
      "description": "Sub categoria da mensagem"
    },
    "files": {
      "type": "array",
      "description": "Arquivos anexados"
    },
    "id_message_type": {
      "type": "number",
      "description": "Tipo da mensagem"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Anexos

Listar anexos
GET/message/{id_message}/file

Example URI

GET https://api.winker.com.br/v1/message/1/file
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Listar anexos
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
    "original_name": "file.jpg",
    "type": "image/jpeg",
    "size": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "uuid": {
        "type": "string",
        "description": "Identificador do arquivo"
      },
      "original_name": {
        "type": "string",
        "description": "Nome do arquivo"
      },
      "type": {
        "type": "string",
        "description": "Tipo do arquivo"
      },
      "size": {
        "type": "number",
        "description": "Tamanho"
      }
    }
  }
}

Anexos

Ver anexo
GET/message/{id_message}/file/{file_id}

Example URI

GET https://api.winker.com.br/v1/message/1/file/1
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

file_id
number (required) Example: 1

Identificador do arquivo

Request  Ver anexo
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  302
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Remover anexo
DELETE/message/{id_message}/file/{file_id}

Example URI

DELETE https://api.winker.com.br/v1/message/1/file/1
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

file_id
number (required) Example: 1

Identificador do arquivo

Request  Remover anexo
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Responder

Responder
POST/message/{id_message}/reply

Example URI

POST https://api.winker.com.br/v1/message/1/reply
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Responder uma mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Body
{
  "description": "Message reply"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "description": {
      "type": "string",
      "description": "Resposta da mensagem"
    }
  }
}
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Identificador da entidade gerado"
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Respostas

Listar respostas
GET/message/{id_message}/replies

Example URI

GET https://api.winker.com.br/v1/message/1/replies
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Listar respostas
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "subject": "New message",
    "to": [
      "all_users"
    ],
    "description": "New message body",
    "id_message_administrative_category": 15574,
    "files": [
      1
    ],
    "id_message_type": 1,
    "id_message": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "subject": {
        "type": "string",
        "description": "Assunto da mensagem"
      },
      "to": {
        "type": "array",
        "description": "Destinatário"
      },
      "description": {
        "type": "string",
        "description": "Corpo da mensagem"
      },
      "id_message_administrative_category": {
        "type": "number",
        "description": "Sub categoria da mensagem"
      },
      "files": {
        "type": "array",
        "description": "Arquivos anexados"
      },
      "id_message_type": {
        "type": "number",
        "description": "Tipo da mensagem"
      },
      "id_message": {
        "type": "number",
        "description": "Identificador da mensagem"
      }
    }
  }
}

Seguidores

Listar seguidores
GET/message/{id_message}/followers

Example URI

GET https://api.winker.com.br/v1/message/1/followers
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Listar seguidores
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
    "name": "Hello, world!",
    "token": "Hello, world!"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "uuid": {
        "type": "string",
        "description": "Identificador do usuário"
      },
      "name": {
        "type": "string",
        "description": "Nome do usuário"
      },
      "token": {
        "type": "string",
        "description": "Token do usuário conectado"
      }
    }
  }
}

Favoritar

Favoritar mensagem
POST/message/{id_message}/toggle-star

Example URI

POST https://api.winker.com.br/v1/message/1/toggle-star
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Favoritar uma mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Seguir

Seguir mensagem
POST/message/{id_message}/toggle-follow

Example URI

POST https://api.winker.com.br/v1/message/1/toggle-follow
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Seguir uma mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Fechar

Fechar/abrir mensagem
POST/message/{id_message}/toggle-close

Example URI

POST https://api.winker.com.br/v1/message/1/toggle-close
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Fechar/abrir uma mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Moderar

Moderar mensagem
GET/message/{id_message}/approve/{approve}

Example URI

GET https://api.winker.com.br/v1/message/1/approve/true
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

approve
boolean (required) Example: true

Status da moderação

Request  Moderar uma mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Adiamento

Adiar mensagem
POST/message/{id_message}/snooze/{datetime}

Example URI

POST https://api.winker.com.br/v1/message/1/snooze/2099-07-23 10:15:19
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

datetime
string (required) Example: 2099-07-23 10:15:19

Data do adiamento

Request  Adiar uma mensagem
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Adiamento

Remover adiamento
DELETE/message/{id_message}/snooze

Example URI

DELETE https://api.winker.com.br/v1/message/1/snooze
URI Parameters
HideShow
id_message
number (required) Example: 1

Identificador da mensagem

Request  Remover adiamento
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Reservas

Lista todos os recursos disponíveis

Lista recursos
GET/booking?id_portal={id_portal}

Example URI

GET https://api.winker.com.br/v1/booking?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Listar recursos
HideShow
Headers
Accept: application/json
Content-Type: application/json
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_resource": 1,
    "name": "Salão de Festas",
    "description": "Mesa central, 20 mesas auxiliares, geladeira, fogão, talheres e pratos, banheiro masculino e feminino. A reserva ficará pendente até  entrega na portaria do",
    "hint": "Teste Almoço",
    "rules": "https://rededomus.s3-sa-east-1.amazonaws.com/runtime/upload/2016/10/19/5819.58077a84752221268_783bb2760.pdf",
    "active": true,
    "visualization_type": "month",
    "reservation_type: `fixed_time`": "Hello, world!",
    "duration": "05:00:00",
    "duration_schedule": "null",
    "startAvailableTime": "10:00",
    "endAvailableTime": "22:00",
    "capacity": "15",
    "booking_price": "150.00",
    "cancel_limit": "24",
    "has_guest_list": 1,
    "cancel_limit_guest_list": "12"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_resource": {
        "type": "number"
      },
      "name": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "hint": {
        "type": "string"
      },
      "rules": {
        "type": "string"
      },
      "active": {
        "type": "boolean"
      },
      "visualization_type": {
        "type": "string"
      },
      "reservation_type: `fixed_time`": {
        "type": "string"
      },
      "duration": {
        "type": "string"
      },
      "duration_schedule": {
        "type": "string"
      },
      "startAvailableTime": {
        "type": "string"
      },
      "endAvailableTime": {
        "type": "string"
      },
      "capacity": {
        "type": "string"
      },
      "booking_price": {
        "type": "string"
      },
      "cancel_limit": {
        "type": "string"
      },
      "has_guest_list": {
        "type": "number"
      },
      "cancel_limit_guest_list": {
        "type": "string"
      }
    }
  }
}

Lista todas as reservas de um recurso

Lista recursos
GET/booking/resourcebookings?id_portal={id_portal}

Example URI

GET https://api.winker.com.br/v1/booking/resourcebookings?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Listar recursos
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_resource": 1,
    "id_booking": "140650",
    "description": "descrissaum",
    "start_date": "2018-07-28T00:00:00-0300",
    "end_date": "2018-07-28T05:00:00-0300",
    "authorized": "1",
    "full_day": "0",
    "id_unit": "1",
    "can_edit": true,
    "requester": "101 - Bloco 3",
    "allowGuestList": true
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_resource": {
        "type": "number"
      },
      "id_booking": {
        "type": "string"
      },
      "description": {
        "type": "string"
      },
      "start_date": {
        "type": "string"
      },
      "end_date": {
        "type": "string"
      },
      "authorized": {
        "type": "string"
      },
      "full_day": {
        "type": "string"
      },
      "id_unit": {
        "type": "string"
      },
      "can_edit": {
        "type": "boolean"
      },
      "requester": {
        "type": "string"
      },
      "allowGuestList": {
        "type": "boolean"
      }
    }
  }
}

Lista todas as reservas do usuario atual

Lista reservas
GET/booking/mybookings?id_portal={id_portal}

Example URI

GET https://api.winker.com.br/v1/booking/mybookings?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Listar reservas
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "description": "Hello, world!"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "description": {
        "type": "string",
        "description": "Descrição da reserva"
      }
    }
  }
}

Lista os convidados disponiveis

Lista de convidados
GET/booking/listusers?id_portal={id_portal}

Example URI

GET https://api.winker.com.br/v1/booking/listusers?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Listar reservas
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_user": 1,
  "name": "Nome Sobrenome"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_user": {
      "type": "number",
      "description": "Identificador do usuário"
    },
    "name": {
      "type": "string",
      "description": "Nome do usuario"
    }
  }
}

Cancela reserva

Cancela reserva
DELETE/booking/cancel?id_portal={id_portal}

Example URI

DELETE https://api.winker.com.br/v1/booking/cancel?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Cancelar reserva
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200

Reserva um recurso

Reserva recurso
POST/booking(?id_portal={id_portal})

Example URI

POST https://api.winker.com.br/v1/booking(?id_portal=2057)
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Listar reservas
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "id_resource": 1,
  "description": "descriçao",
  "start_date": "2018-07-28",
  "end_date": "2018-07-29",
  "id_unit": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_resource": {
      "type": "number",
      "description": "Identificador do recurso"
    },
    "description": {
      "type": "string",
      "description": "Descrição da reserva"
    },
    "start_date": {
      "type": "string",
      "description": "Data de início"
    },
    "end_date": {
      "type": "string",
      "description": "Data de fim"
    },
    "id_unit": {
      "type": "number",
      "description": "Identificador da unidade"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_resource": 1,
  "id_booking": "140650",
  "description": "descrissaum",
  "start_date": "2018-07-28T00:00:00-0300",
  "end_date": "2018-07-28T05:00:00-0300",
  "authorized": "1",
  "full_day": "0",
  "id_unit": "1",
  "can_edit": true,
  "requester": "101 - Bloco 3",
  "allowGuestList": true
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_resource": {
      "type": "number"
    },
    "id_booking": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "start_date": {
      "type": "string"
    },
    "end_date": {
      "type": "string"
    },
    "authorized": {
      "type": "string"
    },
    "full_day": {
      "type": "string"
    },
    "id_unit": {
      "type": "string"
    },
    "can_edit": {
      "type": "boolean"
    },
    "requester": {
      "type": "string"
    },
    "allowGuestList": {
      "type": "boolean"
    }
  },
  "required": [
    "id_resource",
    "id_booking",
    "description",
    "start_date",
    "end_date",
    "authorized",
    "full_day",
    "id_unit",
    "can_edit",
    "requester",
    "allowGuestList"
  ],
  "additionalProperties": false
}

Boletos

Listar boletos do condominio

Listar boletos
GET/billing/{id_unidade}

Example URI

GET https://api.winker.com.br/v1/billing/1
URI Parameters
HideShow
id_unidade
number (required) Example: 1

Identificador da unidade

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_unit_billing": 1057256,
    "id_unit": 1,
    "reference": "201803",
    "year_reference": 2018,
    "month_reference": 3,
    "special_billing": "0",
    "file": {
      "type": "application/pdf",
      "size": "8447",
      "original_name: `arquivo_214780`": "Hello, world!"
    },
    "service_rate": 4.9,
    "situation": "opened",
    "link_bank": "null",
    "due_date": "2018-02-20T16:39:53-0300"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_unit_billing": {
        "type": "number",
        "description": "Identificador do boleto"
      },
      "id_unit": {
        "type": "number",
        "description": "Identificador da unidade"
      },
      "reference": {
        "type": "string",
        "description": "Informações de referência"
      },
      "year_reference": {
        "type": "number",
        "description": "Ano"
      },
      "month_reference": {
        "type": "number",
        "description": "Mês"
      },
      "special_billing": {
        "type": "string",
        "description": "Cobrança especial"
      },
      "file": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Tipo de arquivo"
          },
          "size": {
            "type": "string",
            "description": "Tamanho do arquivo"
          },
          "original_name: `arquivo_214780`": {
            "type": "string",
            "description": "Nome original do arquivo"
          }
        },
        "description": "Informações do arquivo"
      },
      "service_rate": {
        "type": "number",
        "description": "Taxa de serviço"
      },
      "situation": {
        "type": "string",
        "description": "Situação do arquivo"
      },
      "link_bank": {
        "type": "string",
        "description": "Link do banco"
      },
      "due_date": {
        "type": "string",
        "description": "Data de vencimento"
      }
    }
  }
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Redirecionar/Download boletos do condominio

Redirecionar/Download boletos
GET/billing/{id_boleto}/download

Example URI

GET https://api.winker.com.br/v1/billing/1/download
URI Parameters
HideShow
id_boleto
number (required) Example: 1

Identificador do boleto

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Condômino

Listar todos os condôminos

Listar todos
GET/responsible

Example URI

GET https://api.winker.com.br/v1/responsible
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "history": {
    "30/11/2017 23:27:04": {
      "operação": "09/02/2017",
      "usuario": "null",
      "atributos": {
        "inicio": "09/02/2017",
        "termino": "null",
        "perfil": "Proprietário: Responsável e morador"
      }
    }
  },
  "id_user_unit": 109197,
  "id_user": 4372,
  "name": "Pessoa 4362 Sobrenome 4362",
  "photo": "/themes/intra/img/sf_ele.gif",
  "responsibility": "Proprietário: Responsável e morador",
  "activation_start": "2017-02-09T00:00:00-0200",
  "activation_end": "null",
  "id_unit": 110129,
  "unit": "Desenvolvimento",
  "id_division": 5493,
  "division": "Principal"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "history": {
      "type": "object",
      "properties": {
        "30/11/2017 23:27:04": {
          "type": "object",
          "properties": {
            "operação": {
              "type": "string",
              "description": "Data da operação"
            },
            "usuario": {
              "type": "string",
              "description": "Nome do usuário"
            },
            "atributos": {
              "type": "object",
              "properties": {
                "inicio": {
                  "type": "string"
                },
                "termino": {
                  "type": "string"
                },
                "perfil": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "id_user_unit": {
      "type": "number"
    },
    "id_user": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "photo": {
      "type": "string"
    },
    "responsibility": {
      "type": "string"
    },
    "activation_start": {
      "type": "string"
    },
    "activation_end": {
      "type": "string"
    },
    "id_unit": {
      "type": "number"
    },
    "unit": {
      "type": "string"
    },
    "id_division": {
      "type": "number"
    },
    "division": {
      "type": "string"
    }
  }
}

Detalhar dados do Condômino

Detalhar dados
GET/responsible/{id_user}

Example URI

GET https://api.winker.com.br/v1/responsible/2057
URI Parameters
HideShow
id_user
number (required) Example: 2057

Identificador do usuário

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_user": 2,
  "name": "Pessoa 1 Sobrenome 1",
  "photo": "/themes/intra/img/sf_ele.gif",
  "type": "individual",
  "user": "usuario2@winker.com.br",
  "first_name": "Pessoa 1",
  "last_name": "Sobrenome 1",
  "email": "usuario2@winker.com.br",
  "gender": "M",
  "cpf": "null",
  "rg": "null",
  "occupation": "Empresário",
  "date_of_birth": "1986-06-12",
  "documents": {
    "cpf": "null",
    "rg": "null"
  },
  "phones": [
    {
      "id_phone": 192,
      "type": "Celular",
      "number": "(48) 99999-9999"
    }
  ],
  "vehicles": [
    {
      "id_vehicle": 35,
      "type": "null",
      "model": "Clio",
      "brand": {
        "id_vehicle_brand": 19,
        "brand": "Chevrolet"
      },
      "color": {
        "code": "Black",
        "label": "Preto"
      },
      "license_plate": "ASD-s232",
      "id_user": 12,
      "owner": "Pessoa 1974 Sobrenome 1974",
      "photo": "url"
    }
  ],
  "vehicles_ignore": true,
  "pets": [
    {
      "id_pet": 485,
      "name": "AuAu",
      "type": {
        "id_pet_type": 1,
        "type": "Cachorro"
      },
      "gender": {
        "code": "Male",
        "label": "Macho"
      },
      "size": {
        "code": "Medium",
        "label `Médio`": "Hello, world!"
      },
      "characteristics": "Branquinho",
      "id_user": 2,
      "owner": "Pessoa 1 Sobrenome 1",
      "photo": "https://rededomus.s3-sa-east-1.amazonaws.com/files/upload/2017/08/31/60613.59a81d6390b7b9.29021477_3fc10d10714b.jpeg"
    }
  ],
  "pets_ignore": true,
  "unit": {
    "id_unit": 2720,
    "name": "1110",
    "parking_spot": "null",
    "hobby_box": "null",
    "administrative": "0",
    "id_division": 108,
    "division": "Único",
    "usersPhoto": "``",
    "note": "null",
    "area": "null",
    "id_portal": 34,
    "portal": "Condominio 34",
    "activation_start": "2014-08-15T00:00:00-0300",
    "activation_end": "null",
    "id_unit_user": 2057,
    "id_user_unit": 2057,
    "profile": "null"
  },
  "history": {
    "30/11/2017 23:27:04": {
      "operacao": "-",
      "usuario": "Indefinido",
      "atributos": {
        "inicio": "15/08/2014",
        "termino": "null",
        "perfil": "null"
      }
    }
  },
  "id_user_unit": 2057
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_user": {
      "type": "number",
      "description": "Identificador do condômino"
    },
    "name": {
      "type": "string",
      "description": "Nome do condômino"
    },
    "photo": {
      "type": "string",
      "description": "Caminho da foto cadastrada"
    },
    "type": {
      "type": "string",
      "description": "Tipo de condômino"
    },
    "user": {
      "type": "string",
      "description": "E-mail de usuário"
    },
    "first_name": {
      "type": "string",
      "description": "Primeiro nome do condômino"
    },
    "last_name": {
      "type": "string",
      "description": "Sobrenome do condômino"
    },
    "email": {
      "type": "string",
      "description": "E-mail do usuário"
    },
    "gender": {
      "type": "string",
      "description": "Sexo"
    },
    "cpf": {
      "type": "string",
      "description": "CPF"
    },
    "rg": {
      "type": "string",
      "description": "RG"
    },
    "occupation": {
      "type": "string",
      "description": "Ocupação do condômino"
    },
    "date_of_birth": {
      "type": "string",
      "description": "Data de nascimento"
    },
    "documents": {
      "type": "object",
      "properties": {
        "cpf": {
          "type": "string",
          "description": "CPF"
        },
        "rg": {
          "type": "string",
          "description": "RG"
        }
      }
    },
    "phones": {
      "type": "array"
    },
    "vehicles": {
      "type": "array"
    },
    "vehicles_ignore": {
      "type": "boolean"
    },
    "pets": {
      "type": "array"
    },
    "pets_ignore": {
      "type": "boolean"
    },
    "unit": {
      "type": "object",
      "properties": {
        "id_unit": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "parking_spot": {
          "type": "string"
        },
        "hobby_box": {
          "type": "string"
        },
        "administrative": {
          "type": "string"
        },
        "id_division": {
          "type": "number"
        },
        "division": {
          "type": "string"
        },
        "usersPhoto": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "area": {
          "type": "string"
        },
        "id_portal": {
          "type": "number"
        },
        "portal": {
          "type": "string"
        },
        "activation_start": {
          "type": "string"
        },
        "activation_end": {
          "type": "string"
        },
        "id_unit_user": {
          "type": "number"
        },
        "id_user_unit": {
          "type": "number"
        },
        "profile": {
          "type": "string"
        }
      }
    },
    "history": {
      "type": "object",
      "properties": {
        "30/11/2017 23:27:04": {
          "type": "object",
          "properties": {
            "operacao": {
              "type": "string",
              "description": "Descrição da operação"
            },
            "usuario": {
              "type": "string"
            },
            "atributos": {
              "type": "object",
              "properties": {
                "inicio": {
                  "type": "string"
                },
                "termino": {
                  "type": "string"
                },
                "perfil": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "id_user_unit": {
      "type": "number",
      "description": "Identificador do usuário"
    }
  }
}

Provider

Listar atividades

Listar atividades
GET/provider/activities{?id_provider}

Example URI

GET https://api.winker.com.br/v1/provider/activities?id_provider=13
URI Parameters
HideShow
id_provider
number (required) Example: 13

Identificador do provider

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_provider": 2,
    "id_provider_activitie": 13,
    "activitie": "Administradora",
    "active": "1"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_provider": {
        "type": "number",
        "description": "Id do provider"
      },
      "id_provider_activitie": {
        "type": "number",
        "description": "Id do provider"
      },
      "activitie": {
        "type": "string",
        "description": "Atividade"
      },
      "active": {
        "type": "string",
        "description": "Status"
      }
    }
  }
}

Portal

Portais (condomínios, associações, clubes, etc)

Criar portal e application

Criar portal e application
POST/portal/application

Example URI

POST https://api.winker.com.br/v1/portal/application
Request  Criar um portal
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "name": "Pátio da Flores",
  "doc_cnpj": "49.520.741/0001-92",
  "phone": 489984571624,
  "adress": "Assis brasil",
  "adress_number": 6699,
  "adress_complement": "asdasd",
  "adress_neighborhood": "Ponta de Baixo",
  "adress_city": "São josé",
  "adress_state": "Sc",
  "adress_zipcode": 88104200,
  "email_portal": "portal@mail.com",
  "portal_type": "Condomínio",
  "plans": [],
  "active": true,
  "provider": {
    "id_provider": 1,
    "activities": [
      "27"
    ]
  },
  "application_portal": {
    "id_install": 123123
  },
  "configuration": {
    "models": [
      "portal",
      "division",
      "unit"
    ]
  }
}
Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nome"
    },
    "doc_cnpj": {
      "type": "string",
      "description": "Cnpj"
    },
    "phone": {
      "type": "number",
      "description": "Telefone"
    },
    "adress": {
      "type": "string",
      "description": "Endereço"
    },
    "adress_number": {
      "type": "number",
      "description": "Numero"
    },
    "adress_complement": {
      "type": "string",
      "description": "Complemento"
    },
    "adress_neighborhood": {
      "type": "string",
      "description": "Bairro"
    },
    "adress_city": {
      "type": "string",
      "description": "Cidade"
    },
    "adress_state": {
      "type": "string",
      "description": "Estado"
    },
    "adress_zipcode": {
      "type": "number",
      "description": "Cep"
    },
    "email_portal": {
      "type": "string",
      "description": "Email"
    },
    "portal_type": {
      "type": "string",
      "description": "Tipo portal [Condomínio,Associação,Clube de futebol,Coworking,Empresarial]"
    },
    "plans": {
      "type": "array",
      "description": "Planos [4,5]"
    },
    "active": {
      "type": "boolean",
      "description": "Ativo"
    },
    "provider": {
      "type": "object",
      "properties": {
        "id_provider": {
          "type": "number",
          "description": "id do provider"
        },
        "activities": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "administradora"
          }
        }
      },
      "description": "Provider"
    },
    "application_portal": {
      "type": "object",
      "properties": {
        "id_install": {
          "type": "number",
          "description": "id application Portal"
        }
      },
      "description": "application portal"
    },
    "configuration": {
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Models a integrar"
        }
      },
      "description": "Configuracao de integracao"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  201
HideShow
Body
{
  "id_install": 10233,
  "id_portal": 123123,
  "uuid": "dd90a09d-7fda-4a54-abad-4324323423",
  "token": "dd90a09d-7fda-4a54-abad-ASASASAS",
  "configuration": {
    "models": [
      "portal",
      "division",
      "unit"
    ],
    "id_portal_vendor": "123456"
  },
  "parent": {
    "uuid": "dd90a09d-7fda-4a54-abad-sdfsdfsdfsdf"
  },
  "application": {
    "id_application": "1234356",
    "name": "Agora Systems"
  },
  "status": "preparing",
  "active": true,
  "created_at": "2017-01-01 00:00:00"
}
Schema
{
  "type": "object",
  "properties": {
    "id_install": {
      "type": "number",
      "description": "Identificador da aplicação no portal"
    },
    "id_portal": {
      "type": "number",
      "description": "Identificador do portal"
    },
    "uuid": {
      "type": "string",
      "description": "Uuid"
    },
    "token": {
      "type": "string",
      "description": "Token"
    },
    "configuration": {
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Models a integrar"
        },
        "id_portal_vendor": {
          "type": "string"
        }
      },
      "description": "Configuração do Provider"
    },
    "parent": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "Uuid do provider"
        }
      },
      "description": "Configuração do Provider"
    },
    "application": {
      "type": "object",
      "properties": {
        "id_application": {
          "type": "string",
          "description": "Identificador da aplicação"
        },
        "name": {
          "type": "string",
          "description": "Nome da aplicação"
        }
      },
      "description": "Dados da aplicação"
    },
    "status": {
      "type": "string",
      "description": "Situação (preparing, installing, installed, uninstalling)"
    },
    "active": {
      "type": "boolean",
      "description": "Se está ativo"
    },
    "created_at": {
      "type": "string",
      "description": "Data de instalação"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Atualizar portal

Atualizar portal
PUT/portal/{id_portal}

Example URI

PUT https://api.winker.com.br/v1/portal/2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  atualizar um portal
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "name": "Pátio da Flores",
  "doc_cnpj": "49.520.741/0001-92",
  "phone": 489984571624,
  "adress": "Assis brasil",
  "adress_number": 6699,
  "adress_complement": "asdasd",
  "adress_neighborhood": "Ponta de Baixo",
  "adress_city": "São josé",
  "adress_state": "Sc",
  "adress_zipcode": 88104200,
  "email_portal": "portal@mail.com",
  "portal_type": "Condomínio",
  "plans": [],
  "active": true,
  "provider": {
    "id_provider": 1,
    "activities": [
      "27"
    ]
  },
  "application_portal": {
    "id_install": 123123
  },
  "configuration": {
    "models": [
      "portal",
      "division",
      "unit"
    ]
  }
}
Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nome"
    },
    "doc_cnpj": {
      "type": "string",
      "description": "Cnpj"
    },
    "phone": {
      "type": "number",
      "description": "Telefone"
    },
    "adress": {
      "type": "string",
      "description": "Endereço"
    },
    "adress_number": {
      "type": "number",
      "description": "Numero"
    },
    "adress_complement": {
      "type": "string",
      "description": "Complemento"
    },
    "adress_neighborhood": {
      "type": "string",
      "description": "Bairro"
    },
    "adress_city": {
      "type": "string",
      "description": "Cidade"
    },
    "adress_state": {
      "type": "string",
      "description": "Estado"
    },
    "adress_zipcode": {
      "type": "number",
      "description": "Cep"
    },
    "email_portal": {
      "type": "string",
      "description": "Email"
    },
    "portal_type": {
      "type": "string",
      "description": "Tipo portal [Condomínio,Associação,Clube de futebol,Coworking,Empresarial]"
    },
    "plans": {
      "type": "array",
      "description": "Planos [4,5]"
    },
    "active": {
      "type": "boolean",
      "description": "Ativo"
    },
    "provider": {
      "type": "object",
      "properties": {
        "id_provider": {
          "type": "number",
          "description": "id do provider"
        },
        "activities": {
          "type": "array",
          "items": {
            "type": "string",
            "description": "administradora"
          }
        }
      },
      "description": "Provider"
    },
    "application_portal": {
      "type": "object",
      "properties": {
        "id_install": {
          "type": "number",
          "description": "id application Portal"
        }
      },
      "description": "application portal"
    },
    "configuration": {
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Models a integrar"
        }
      },
      "description": "Configuracao de integracao"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  202
HideShow
Body
{
  "id_install": 10233,
  "id_portal": 123123,
  "uuid": "dd90a09d-7fda-4a54-abad-4324323423",
  "token": "dd90a09d-7fda-4a54-abad-ASASASAS",
  "configuration": {
    "models": [
      "portal",
      "division",
      "unit"
    ],
    "id_portal_vendor": "123456"
  },
  "parent": {
    "uuid": "dd90a09d-7fda-4a54-abad-sdfsdfsdfsdf"
  },
  "application": {
    "id_application": "1234356",
    "name": "Agora Systems"
  },
  "status": "preparing",
  "active": true,
  "created_at": "2017-01-01 00:00:00"
}
Schema
{
  "type": "object",
  "properties": {
    "id_install": {
      "type": "number",
      "description": "Identificador da aplicação no portal"
    },
    "id_portal": {
      "type": "number",
      "description": "Identificador do portal"
    },
    "uuid": {
      "type": "string",
      "description": "Uuid"
    },
    "token": {
      "type": "string",
      "description": "Token"
    },
    "configuration": {
      "type": "object",
      "properties": {
        "models": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Models a integrar"
        },
        "id_portal_vendor": {
          "type": "string"
        }
      },
      "description": "Configuração do Provider"
    },
    "parent": {
      "type": "object",
      "properties": {
        "uuid": {
          "type": "string",
          "description": "Uuid do provider"
        }
      },
      "description": "Configuração do Provider"
    },
    "application": {
      "type": "object",
      "properties": {
        "id_application": {
          "type": "string",
          "description": "Identificador da aplicação"
        },
        "name": {
          "type": "string",
          "description": "Nome da aplicação"
        }
      },
      "description": "Dados da aplicação"
    },
    "status": {
      "type": "string",
      "description": "Situação (preparing, installing, installed, uninstalling)"
    },
    "active": {
      "type": "boolean",
      "description": "Se está ativo"
    },
    "created_at": {
      "type": "string",
      "description": "Data de instalação"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Sobre

Informações de um portal
GET/portal/{id_portal}/about

Example URI

GET https://api.winker.com.br/v1/portal/2057/about
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "phones": [
    "(48) 9999-9999"
  ],
  "users": {
    "manager": {
      "id_user": 1,
      "name": "Hello, world!",
      "photo": "Hello, world!",
      "type": "Hello, world!",
      "user": "Hello, world!",
      "title": "Hello, world!"
    },
    "employees": [
      {
        "id_user": 1,
        "name": "Hello, world!",
        "photo": "Hello, world!",
        "type": "Hello, world!",
        "user": "Hello, world!",
        "occupation": "Hello, world!",
        "groups": [
          {
            "id_group": 1,
            "name": "Hello, world!"
          }
        ],
        "work_details": [
          {
            "work_schedule": "Hello, world!",
            "work_activities": "Hello, world!"
          }
        ]
      }
    ],
    "boardMembers": [
      {
        "id_user": 1,
        "name": "Hello, world!",
        "photo": "Hello, world!",
        "type": "Hello, world!",
        "user": "Hello, world!",
        "groups": [
          {
            "id_group": 1,
            "name": "Hello, world!"
          }
        ]
      }
    ],
    "providers": [
      {
        "id_provider": 9,
        "name": "Grupo Embracon",
        "photo": "http://api.winker.dev:8001/themes/intra/img/sf_adm.jpg",
        "photo_profile": "http://api.winker.dev:8001/themes/intra/img/sf_adm.jpg",
        "activities": [
          "Hello, world!"
        ]
      }
    ]
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "phones": {
      "type": "array",
      "description": "Telefones"
    },
    "users": {
      "type": "object",
      "properties": {
        "manager": {
          "type": "object",
          "properties": {
            "id_user": {
              "type": "number",
              "description": "Identificador do usuário"
            },
            "name": {
              "type": "string",
              "description": "Nome do usuário"
            },
            "photo": {
              "type": "string",
              "description": "Foto"
            },
            "type": {
              "type": "string",
              "description": "Tipo do usuário"
            },
            "user": {
              "type": "string",
              "description": "E-mail"
            },
            "title": {
              "type": "string",
              "description": "Título"
            }
          }
        },
        "employees": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id_user": {
                "type": "number",
                "description": "Identificador do usuário"
              },
              "name": {
                "type": "string",
                "description": "Nome do usuário"
              },
              "photo": {
                "type": "string",
                "description": "Foto"
              },
              "type": {
                "type": "string",
                "description": "Tipo do usuário"
              },
              "user": {
                "type": "string",
                "description": "E-mail"
              },
              "occupation": {
                "type": "string",
                "description": "Ocupação"
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id_group": {
                      "type": "number",
                      "description": "Identificador"
                    },
                    "name": {
                      "type": "string",
                      "description": "Nome do grupo"
                    }
                  }
                },
                "description": "Grupos do usuário"
              },
              "work_details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "work_schedule": {
                      "type": "string",
                      "description": "Horário"
                    },
                    "work_activities": {
                      "type": "string",
                      "description": "Atividades"
                    }
                  }
                },
                "description": "Detalhes do trabalho"
              }
            }
          }
        },
        "boardMembers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id_user": {
                "type": "number",
                "description": "Identificador do usuário"
              },
              "name": {
                "type": "string",
                "description": "Nome do usuário"
              },
              "photo": {
                "type": "string",
                "description": "Foto"
              },
              "type": {
                "type": "string",
                "description": "Tipo do usuário"
              },
              "user": {
                "type": "string",
                "description": "E-mail"
              },
              "groups": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id_group": {
                      "type": "number",
                      "description": "Identificador"
                    },
                    "name": {
                      "type": "string",
                      "description": "Nome do grupo"
                    }
                  }
                },
                "description": "Grupos do usuário"
              }
            }
          }
        },
        "providers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id_provider": {
                "type": "number",
                "description": "Identificador"
              },
              "name": {
                "type": "string",
                "description": "Nome"
              },
              "photo": {
                "type": "string",
                "description": "Foto"
              },
              "photo_profile": {
                "type": "string",
                "description": "Foto"
              },
              "activities": {
                "type": "array",
                "description": "Atividades"
              }
            }
          }
        }
      }
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Criar documento

Criar documento
POST/portal/{id_portal}/document

Example URI

POST https://api.winker.com.br/v1/portal/2057/document
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Criar um documento
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "name": "Balancete 01/2018",
  "description": "...",
  "id_document_type": 9,
  "file": "59a06a12-89ae-4052-918e-e447719a93e7"
}
Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nome do documento"
    },
    "description": {
      "type": "string",
      "description": "Descrição do documento"
    },
    "id_document_type": {
      "type": "number",
      "description": "Identificador do tipo do documento"
    },
    "file": {
      "type": "string",
      "description": "Identificador do arquivo"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  201

Listar documentos

Listar documentos
GET/portal/{id_portal}/document{?name}

Example URI

GET https://api.winker.com.br/v1/portal/2057/document?name=Balancetes
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

name
string (optional) Example: Balancetes

Nome do Documento

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "name": "Balancete 01/2018",
    "description": "...",
    "id_document_type": 9,
    "id_document": 110,
    "type": "Atas",
    "created": "2018-02-20T16:39:53-0300"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "description": "Nome do documento"
      },
      "description": {
        "type": "string",
        "description": "Descrição do documento"
      },
      "id_document_type": {
        "type": "number",
        "description": "Identificador do tipo do documento"
      },
      "id_document": {
        "type": "number",
        "description": "Identificador do documento"
      },
      "type": {
        "type": "string",
        "description": "Tipo do documento"
      },
      "created": {
        "type": "string",
        "description": "Data da criação do documento"
      }
    }
  }
}

Baixar documento anexo

Baixar documento anexo
GET/portal/{id_portal}/document/{id_document}/download

Example URI

GET https://api.winker.com.br/v1/portal/2057/document/110/download
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_document
number (required) Example: 110

Identificador do ocumento

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200

Remover documento

Remover documento
DELETE/portal/{id_portal}/document/{id_document}

Example URI

DELETE https://api.winker.com.br/v1/portal/2057/document/1
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_document
number (required) Example: 1

Identificador do arquivo

Request  Remover documento
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  204
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Documentos

Listar documentos de implantação
GET/portal/{id_portal}/document/implantation

Example URI

GET https://api.winker.com.br/v1/portal/2057/document/implantation
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  204
HideShow
Body
[
  {
    "type": "Hello, world!",
    "documents": [
      {
        "id_document": 1,
        "name": "Hello, world!",
        "document_url": "Hello, world!"
      }
    ]
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "type": {
        "type": "string",
        "description": "Tipo do documento"
      },
      "documents": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id_document": {
              "type": "number",
              "description": "Identificador do documento"
            },
            "name": {
              "type": "string",
              "description": "Descrição do documento"
            },
            "document_url": {
              "type": "string",
              "description": "Caminho do documento"
            }
          }
        },
        "description": "Documentos"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  400
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Tipos de Documentos

Listar tipos de documentos
GET/portal/{id_portal}/document-type?name={name}&active={active}

Example URI

GET https://api.winker.com.br/v1/portal/2057/document-type?name=Balancetes&active=[1: apenas os ativos | 0: apenas os inativos]
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

name
string (optional) Example: Balancetes

Nome do Tipo de Documento

active
number (optional) Example: [1: apenas os ativos | 0: apenas os inativos]

Por padrão retornam todos

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_document_type": 14927,
    "name": "Balancetes",
    "active": 1
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_document_type": {
        "type": "number",
        "description": "Identificador do tipo de documento"
      },
      "name": {
        "type": "string",
        "description": "Descrição do tipo de documento"
      },
      "active": {
        "type": "number",
        "description": "Documento Ativo"
      }
    }
  }
}

Configurações

Configurações de um portal
GET/portal/{id_portal}/config/{config}

Example URI

GET https://api.winker.com.br/v1/portal/2057/config/config
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

config
string (required) 

Categoria e sub-categoria de configurações

Choices: portal-administration portal-users portal-profiles message-me message-categories message-menu message-starred message-administrativeCategories message-indicationTypeCategories message-to message-isModuleActive message-isAdministrator profile-phone_types vehicle-types vehicle-brands vehicle-colors pet-types pet-genders pet-sizes

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "portal": {},
  "message": {},
  "profile": {},
  "vehicle": {},
  "pet": {}
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "portal": {
      "type": "object",
      "properties": {},
      "description": "Array com as configurações solicitadas"
    },
    "message": {
      "type": "object",
      "properties": {},
      "description": "Array com as configurações solicitadas"
    },
    "profile": {
      "type": "object",
      "properties": {},
      "description": "Array com as configurações solicitadas"
    },
    "vehicle": {
      "type": "object",
      "properties": {},
      "description": "Array com as configurações solicitadas"
    },
    "pet": {
      "type": "object",
      "properties": {},
      "description": "Array com as configurações solicitadas"
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Provider

Provider de um portal
GET/portal/{id_portal}/provider

Example URI

GET https://api.winker.com.br/v1/portal/2057/provider
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_provider": 9,
    "name": "Grupo Embracon",
    "photo": "http://api.winker.dev:8001/themes/intra/img/sf_adm.jpg",
    "photo_profile": "http://api.winker.dev:8001/themes/intra/img/sf_adm.jpg",
    "activities": [
      "Hello, world!"
    ],
    "phone": "(48) 3035-4000",
    "id_provider_portal": 1835
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_provider": {
        "type": "number",
        "description": "Identificador"
      },
      "name": {
        "type": "string",
        "description": "Nome"
      },
      "photo": {
        "type": "string",
        "description": "Foto"
      },
      "photo_profile": {
        "type": "string",
        "description": "Foto"
      },
      "activities": {
        "type": "array",
        "description": "Atividades"
      },
      "phone": {
        "type": "string"
      },
      "id_provider_portal": {
        "type": "number"
      }
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar aplicativos instalados no portal

Listar todos os aplicativos instalados no portal
GET/portal/{id_portal}/application

Example URI

GET https://api.winker.com.br/v1/portal/2057/application
URI Parameters
HideShow
id_portal
number (optional) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_portal": 2057,
    "id_install": 126,
    "application": {
      "id_application": 1,
      "key": "55de77",
      "name": "Agora",
      "events": {
        "Winker/Event/AuthorizedVisitor/Added": {
          "api": "https://EventName1.winker.com.br/v1/configuration",
          "method": "GET",
          "on_install": true,
          "headers": "Authorization: app_token, Accept: application/json"
        },
        "Winker/Event/AuthorizedVisitor/Updated": {
          "api": "https://EventName2.winker.com.br/v1/configuration",
          "method": "PUT",
          "on_install": false,
          "headers": "Authorization: app_token, Accept: application/json"
        }
      },
      "pages": {
        "page1": "https://pages.winker.com.br/pages/page1",
        "page2": "https://pages.winker.com.br/pages/page2"
      },
      "permissions": {
        "PermissionGroup1": [
          "read"
        ],
        "PermissionGroup2": [
          "read"
        ]
      },
      "providers": [
        {
          "id_provider": 46,
          "configuration": {
            "server_api": "http://setupdemo.provider.com:9080/AGORA/"
          }
        },
        {
          "id_provider": 47,
          "configuration": {
            "server_api": "http://121.121.121.121/PSIM/"
          }
        }
      ],
      "version": "1"
    },
    "status": {
      "code": "preparing",
      "value": "Preparando"
    },
    "token": "TOKEN-EXAMPLE",
    "created_at": "2017-10-04 17:25:03"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_portal": {
        "type": "number",
        "description": "Id Portal"
      },
      "id_install": {
        "type": "number",
        "description": "Id Instalação"
      },
      "application": {
        "type": "object",
        "properties": {
          "id_application": {
            "type": "number"
          },
          "key": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Nome do aplicativo"
          },
          "events": {
            "type": "object",
            "properties": {
              "Winker/Event/AuthorizedVisitor/Added": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 1"
              },
              "Winker/Event/AuthorizedVisitor/Updated": {
                "type": "object",
                "properties": {
                  "api": {
                    "type": "string",
                    "description": "Url do evento"
                  },
                  "method": {
                    "type": "string",
                    "description": "Método do evento"
                  },
                  "on_install": {
                    "type": "boolean"
                  },
                  "headers": {
                    "type": "string",
                    "description": "Headers do evento"
                  }
                },
                "description": "Exemplo de evento 2"
              }
            },
            "description": "Eventos"
          },
          "pages": {
            "type": "object",
            "properties": {
              "page1": {
                "type": "string"
              },
              "page2": {
                "type": "string"
              }
            },
            "description": "Páginas"
          },
          "permissions": {
            "type": "object",
            "properties": {
              "PermissionGroup1": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 1"
              },
              "PermissionGroup2": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Exemplo de grupo de permissão 2"
              }
            },
            "description": "Permissões"
          },
          "providers": {
            "type": "array",
            "items": [
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              },
              {
                "type": "object",
                "properties": {
                  "id_provider": {
                    "type": "number",
                    "description": "Id do Provider"
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "server_api": {
                        "type": "string"
                      }
                    },
                    "description": "Configuração do Provider"
                  }
                }
              }
            ],
            "description": "Providers"
          },
          "version": {
            "type": "string",
            "description": "Versão do aplicativo"
          }
        },
        "description": "Aplicação"
      },
      "status": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "preparing",
              "installing",
              "installed",
              "uninstalling"
            ],
            "description": "status code"
          },
          "value": {
            "type": "string",
            "enum": [
              "Preparando",
              "Instalando",
              "Instalado",
              "Desinstalando"
            ],
            "description": "status value"
          }
        },
        "description": "Status"
      },
      "token": {
        "type": "string",
        "description": "Token"
      },
      "created_at": {
        "type": "string",
        "description": "Data de instalação"
      }
    }
  }
}
Response  500
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Plans

Listar as planos

Listar planos
GET/plan

Example URI

GET https://api.winker.com.br/v1/plan
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_plan": 9,
    "name": "Premium",
    "code": "primium",
    "type": "condominio"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_plan": {
        "type": "number",
        "description": "Identificador"
      },
      "name": {
        "type": "string",
        "description": "Plano"
      },
      "code": {
        "type": "string",
        "description": "Codigo"
      },
      "type": {
        "type": "string",
        "description": "Tipo"
      }
    }
  }
}

Divisões

Divisões (Blocos)

Criar Divisão

Criar Divisão
POST/portal/{id_portal}/division

Example URI

POST https://api.winker.com.br/v1/portal/2057/division
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Criar uma Divisão
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "id_division": 5493,
  "name": "Principal",
  "administrative": "0",
  "division": "Principal",
  "units": [
    {
      "id_unit": 110130,
      "name": "Atendimento",
      "parking_spot": "``",
      "hobby_box": "``",
      "administrative": 0,
      "id_division": 5493,
      "division": "UNICA",
      "usersPhoto": [],
      "note": "Sem moradores",
      "area": ""
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "id_division": {
      "type": "number",
      "description": "Identificador da divisão"
    },
    "name": {
      "type": "string",
      "description": "Nome da divisão"
    },
    "administrative": {
      "enum": [
        "0",
        "1"
      ],
      "description": "Identifica se é administradora ou não"
    },
    "division": {
      "type": "string",
      "description": "division"
    },
    "units": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id_unit": {
            "type": "number",
            "description": "Identificador da Unidade"
          },
          "name": {
            "type": "string",
            "description": "Nome da Unidade"
          },
          "parking_spot": {
            "type": "string",
            "description": "Vaga Garagem"
          },
          "hobby_box": {
            "type": "string",
            "description": "Hobby box"
          },
          "administrative": {
            "enum": [
              0,
              1
            ],
            "description": "Identifica se é administradora ou não"
          },
          "id_division": {
            "type": "number",
            "description": "id da divisão pertencente"
          },
          "division": {
            "type": "string",
            "description": "nome da divisão pertencente"
          },
          "usersPhoto": {
            "type": "array",
            "description": "fotos dos usuários"
          },
          "note": {
            "type": "string",
            "description": "Observações"
          },
          "area": {
            "enum": [
              "",
              "Garagem",
              "Box"
            ],
            "description": "Extensão"
          }
        }
      },
      "description": "units"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  201
HideShow
Body
{
  "id_division": 5493,
  "name": "Principal",
  "administrative": "0",
  "division": "Principal",
  "units": [
    {
      "id_unit": 110130,
      "name": "Atendimento",
      "parking_spot": "``",
      "hobby_box": "``",
      "administrative": 0,
      "id_division": 5493,
      "division": "UNICA",
      "usersPhoto": [],
      "note": "Sem moradores",
      "area": ""
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "id_division": {
      "type": "number",
      "description": "Identificador da divisão"
    },
    "name": {
      "type": "string",
      "description": "Nome da divisão"
    },
    "administrative": {
      "enum": [
        "0",
        "1"
      ],
      "description": "Identifica se é administradora ou não"
    },
    "division": {
      "type": "string",
      "description": "division"
    },
    "units": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id_unit": {
            "type": "number",
            "description": "Identificador da Unidade"
          },
          "name": {
            "type": "string",
            "description": "Nome da Unidade"
          },
          "parking_spot": {
            "type": "string",
            "description": "Vaga Garagem"
          },
          "hobby_box": {
            "type": "string",
            "description": "Hobby box"
          },
          "administrative": {
            "enum": [
              0,
              1
            ],
            "description": "Identifica se é administradora ou não"
          },
          "id_division": {
            "type": "number",
            "description": "id da divisão pertencente"
          },
          "division": {
            "type": "string",
            "description": "nome da divisão pertencente"
          },
          "usersPhoto": {
            "type": "array",
            "description": "fotos dos usuários"
          },
          "note": {
            "type": "string",
            "description": "Observações"
          },
          "area": {
            "enum": [
              "",
              "Garagem",
              "Box"
            ],
            "description": "Extensão"
          }
        }
      },
      "description": "units"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Divisão

Atualizar Divisão
PUT/portal/{id_portal}/division/{id_division}

Example URI

PUT https://api.winker.com.br/v1/portal/2057/division/1212
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_division
number (required) Example: 1212

Identificador do portal

Request  Atualizar uma Divisão
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "id_division": 5493,
  "name": "Principal",
  "administrative": "0",
  "division": "Principal",
  "units": [
    {
      "id_unit": 110130,
      "name": "Atendimento",
      "parking_spot": "``",
      "hobby_box": "``",
      "administrative": 0,
      "id_division": 5493,
      "division": "UNICA",
      "usersPhoto": [],
      "note": "Sem moradores",
      "area": ""
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "id_division": {
      "type": "number",
      "description": "Identificador da divisão"
    },
    "name": {
      "type": "string",
      "description": "Nome da divisão"
    },
    "administrative": {
      "enum": [
        "0",
        "1"
      ],
      "description": "Identifica se é administradora ou não"
    },
    "division": {
      "type": "string",
      "description": "division"
    },
    "units": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id_unit": {
            "type": "number",
            "description": "Identificador da Unidade"
          },
          "name": {
            "type": "string",
            "description": "Nome da Unidade"
          },
          "parking_spot": {
            "type": "string",
            "description": "Vaga Garagem"
          },
          "hobby_box": {
            "type": "string",
            "description": "Hobby box"
          },
          "administrative": {
            "enum": [
              0,
              1
            ],
            "description": "Identifica se é administradora ou não"
          },
          "id_division": {
            "type": "number",
            "description": "id da divisão pertencente"
          },
          "division": {
            "type": "string",
            "description": "nome da divisão pertencente"
          },
          "usersPhoto": {
            "type": "array",
            "description": "fotos dos usuários"
          },
          "note": {
            "type": "string",
            "description": "Observações"
          },
          "area": {
            "enum": [
              "",
              "Garagem",
              "Box"
            ],
            "description": "Extensão"
          }
        }
      },
      "description": "units"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  202
HideShow
Body
{
  "id_division": 5493,
  "name": "Principal",
  "administrative": "0",
  "division": "Principal",
  "units": [
    {
      "id_unit": 110130,
      "name": "Atendimento",
      "parking_spot": "``",
      "hobby_box": "``",
      "administrative": 0,
      "id_division": 5493,
      "division": "UNICA",
      "usersPhoto": [],
      "note": "Sem moradores",
      "area": ""
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "id_division": {
      "type": "number",
      "description": "Identificador da divisão"
    },
    "name": {
      "type": "string",
      "description": "Nome da divisão"
    },
    "administrative": {
      "enum": [
        "0",
        "1"
      ],
      "description": "Identifica se é administradora ou não"
    },
    "division": {
      "type": "string",
      "description": "division"
    },
    "units": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id_unit": {
            "type": "number",
            "description": "Identificador da Unidade"
          },
          "name": {
            "type": "string",
            "description": "Nome da Unidade"
          },
          "parking_spot": {
            "type": "string",
            "description": "Vaga Garagem"
          },
          "hobby_box": {
            "type": "string",
            "description": "Hobby box"
          },
          "administrative": {
            "enum": [
              0,
              1
            ],
            "description": "Identifica se é administradora ou não"
          },
          "id_division": {
            "type": "number",
            "description": "id da divisão pertencente"
          },
          "division": {
            "type": "string",
            "description": "nome da divisão pertencente"
          },
          "usersPhoto": {
            "type": "array",
            "description": "fotos dos usuários"
          },
          "note": {
            "type": "string",
            "description": "Observações"
          },
          "area": {
            "enum": [
              "",
              "Garagem",
              "Box"
            ],
            "description": "Extensão"
          }
        }
      },
      "description": "units"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Remover Divisão
DELETE/portal/{id_portal}/division/{id_division}

Example URI

DELETE https://api.winker.com.br/v1/portal/2057/division/1212
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_division
number (required) Example: 1212

Identificador do portal

Request  Atualizar uma Divisão
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Response  204
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Divisões

Listar Divisões
GET/division{?id_portal,without_admin,with_units}

Example URI

GET https://api.winker.com.br/v1/division?id_portal=2057&without_admin=true&with_units=false
URI Parameters
HideShow
id_portal
number (optional) Example: 2057

Identificador do portal

without_admin
boolean (optional) Example: true

Busca somente divisões não administrativas

with_units
boolean (optional) Example: false

Busca detalhes das unidades

Request  Com unidades
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_division": 5493,
    "name": "Principal",
    "administrative": "0",
    "division": "Principal",
    "units": [
      {
        "id_unit": 110130,
        "name": "Atendimento",
        "parking_spot": "``",
        "hobby_box": "``",
        "administrative": 0,
        "id_division": 5493,
        "division": "UNICA",
        "usersPhoto": [],
        "note": "Sem moradores",
        "area": ""
      }
    ]
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_division": {
        "type": "number",
        "description": "Identificador da divisão"
      },
      "name": {
        "type": "string",
        "description": "Nome da divisão"
      },
      "administrative": {
        "type": "string",
        "enum": [
          "0",
          "1"
        ],
        "description": "Identifica se é administradora ou não"
      },
      "division": {
        "type": "string",
        "description": "division"
      },
      "units": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id_unit": {
              "type": "number",
              "description": "Identificador da Unidade"
            },
            "name": {
              "type": "string",
              "description": "Nome da Unidade"
            },
            "parking_spot": {
              "type": "string",
              "description": "Vaga Garagem"
            },
            "hobby_box": {
              "type": "string",
              "description": "Hobby box"
            },
            "administrative": {
              "type": "number",
              "enum": [
                0,
                1
              ],
              "description": "Identifica se é administradora ou não"
            },
            "id_division": {
              "type": "number",
              "description": "id da divisão pertencente"
            },
            "division": {
              "type": "string",
              "description": "nome da divisão pertencente"
            },
            "usersPhoto": {
              "description": "fotos dos usuários"
            },
            "note": {
              "type": "string",
              "description": "Observações"
            },
            "area": {
              "type": "string",
              "enum": [
                "",
                "Garagem",
                "Box"
              ],
              "description": "Extensão"
            }
          }
        },
        "description": "units"
      }
    }
  }
}
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_division": 5493,
    "name": "Principal",
    "administrative": "0",
    "division": "Principal",
    "units": [
      {
        "id_unit": 110130,
        "name": "Atendimento",
        "parking_spot": "``",
        "hobby_box": "``",
        "administrative": 0,
        "id_division": 5493,
        "division": "UNICA",
        "usersPhoto": [],
        "note": "Sem moradores",
        "area": ""
      }
    ]
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_division": {
        "type": "number",
        "description": "Identificador da divisão"
      },
      "name": {
        "type": "string",
        "description": "Nome da divisão"
      },
      "administrative": {
        "type": "string",
        "enum": [
          "0",
          "1"
        ],
        "description": "Identifica se é administradora ou não"
      },
      "division": {
        "type": "string",
        "description": "division"
      },
      "units": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id_unit": {
              "type": "number",
              "description": "Identificador da Unidade"
            },
            "name": {
              "type": "string",
              "description": "Nome da Unidade"
            },
            "parking_spot": {
              "type": "string",
              "description": "Vaga Garagem"
            },
            "hobby_box": {
              "type": "string",
              "description": "Hobby box"
            },
            "administrative": {
              "type": "number",
              "enum": [
                0,
                1
              ],
              "description": "Identifica se é administradora ou não"
            },
            "id_division": {
              "type": "number",
              "description": "id da divisão pertencente"
            },
            "division": {
              "type": "string",
              "description": "nome da divisão pertencente"
            },
            "usersPhoto": {
              "description": "fotos dos usuários"
            },
            "note": {
              "type": "string",
              "description": "Observações"
            },
            "area": {
              "type": "string",
              "enum": [
                "",
                "Garagem",
                "Box"
              ],
              "description": "Extensão"
            }
          }
        },
        "description": "units"
      }
    }
  }
}

Meus Dados

Listar tipos disponíveis de veículos

Listar tipos disponíveis
GET/me/vehicle/type

Example URI

GET https://api.winker.com.br/v1/me/vehicle/type
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json

Listar configurações/Completar Cadastro do usuário

Configurações/Completar do Usuário
GET/me/get-configuration

Example URI

GET https://api.winker.com.br/v1/me/get-configuration
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "user": [],
  "devices": [],
  "portal": {
    "units": [],
    "responsabilities": [],
    "modules": []
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user": {},
    "devices": {},
    "portal": {
      "type": "object",
      "properties": {
        "units": {},
        "responsabilities": {},
        "modules": {}
      }
    }
  }
}

Listar cores disponíveis veículos

Listar cores disponíveis
GET/me/vehicle/color

Example URI

GET https://api.winker.com.br/v1/me/vehicle/color
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json

Adicionar veículo do usuário

Adicionar veículo
POST/me/vehicle/add

Example URI

POST https://api.winker.com.br/v1/me/vehicle/add
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
[
  {
    "model": "algum modelo",
    "license_plate": "null",
    "brand": {
      "id_vehicle_brand": 1
    },
    "color": {
      "code": [
        "Yellow",
        "Blue",
        "Beige",
        "Bordeaux",
        "White",
        "Gray",
        "Orange",
        "Brown",
        "Silver",
        "Black",
        "Pink",
        "Green",
        "Red",
        "Other"
      ]
    },
    "type": {
      "code": [
        "Bicycle",
        "Automobile",
        "Motorcycle",
        "Other"
      ]
    }
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_vehicle": 95509,
  "model": "kas",
  "brand": [
    "id_vehicle_brand: 1",
    "brand: `Acura`"
  ],
  "type": {
    "code": "Bicycle",
    "label": "Bicicleta"
  },
  "color": [
    "code: `White`",
    "label: `Branco`"
  ],
  "license_plate": "null",
  "id_user": 1,
  "owner": "PJ 1",
  "photo": "null"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_vehicle": {
      "type": "number",
      "description": "Identificador do veículo"
    },
    "model": {
      "type": "string",
      "description": "Descrição do modelo"
    },
    "brand": {
      "type": "array"
    },
    "type": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "label": {
          "type": "string"
        }
      },
      "description": "Descrição do tipo (obrigatório)"
    },
    "color": {
      "type": "array"
    },
    "license_plate": {
      "type": "string",
      "description": "Descrição da placa"
    },
    "id_user": {
      "type": "number",
      "description": "Identificador do usuário"
    },
    "owner": {
      "type": "string",
      "description": "Nome do dono do veiculo"
    },
    "photo": {
      "type": "string",
      "description": "Foto do veiculo"
    }
  }
}

Adicionar pet do usuário

Adicionar pet
POST/me/pet/add

Example URI

POST https://api.winker.com.br/v1/me/pet/add
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
[
  {
    "name": "nome do pet",
    "characteristics": "null",
    "type": {
      "id_pet_type": 2
    },
    "gender": {
      "code": [
        "Male",
        "Female"
      ]
    },
    "size": {
      "code": [
        "Big",
        "Médio",
        "Pequeno"
      ]
    }
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "nome do pet",
  "characteristics": "null",
  "owner": "PJ!",
  "photo": "null",
  "type": {
    "id_pet_type": 2,
    "type": "Gato"
  },
  "gender": {
    "code": {
      "code": "Male",
      "label": "Macho"
    }
  },
  "size": {
    "code": {
      "code": "Big",
      "label": "Grande"
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Modelo do veículo (Obrigatório)"
    },
    "characteristics": {
      "type": "string",
      "description": "Placa do veículo"
    },
    "owner": {
      "type": "string",
      "description": "Dono do pet registrado"
    },
    "photo": {
      "type": "string",
      "description": "Caminho da foto"
    },
    "type": {
      "type": "object",
      "properties": {
        "id_pet_type": {
          "type": "number",
          "description": "Identificador do tipo de pet"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "gender": {
      "type": "object",
      "properties": {
        "code": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "label": {
              "type": "string"
            }
          }
        }
      }
    },
    "size": {
      "type": "object",
      "properties": {
        "code": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "label": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}

Trocar portal do usuário

Trocar portal
POST/me/change-portal

Example URI

POST https://api.winker.com.br/v1/me/change-portal
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "id_portal": 2
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_portal": {
      "type": "number",
      "description": "Identificador do portal que será carregado"
    }
  },
  "required": [
    "id_portal"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object"
}

Salvar dados do usuário

Salvar Dados
POST/me/update

Example URI

POST https://api.winker.com.br/v1/me/update
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
[
  {
    "id_user": 192,
    "documents": {
      "cpf": "111111",
      "cnpj": "212121"
    },
    "first_name": "Pessoa 1",
    "last_name": "Da silva",
    "email": "usuario@email.com",
    "gender": "M",
    "occupation": "Administrador",
    "date_of_birth": "null",
    "cpf": "null",
    "cnpj": "null",
    "phones": [
      "[]"
    ],
    "id_user_unit": "null",
    "responsability": "null"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_user": 192,
    "name": "Pessoa 1 condominio 2",
    "photo": "/themes/intra/img/sf_ele.gif",
    "type": "individual",
    "user": "user223@winker.com.br",
    "first_name": "Pessoa 1",
    "last_name": "Condominio 2",
    "email": "user223@winker.com.br",
    "gender": "M",
    "cpf": "21212121",
    "rg": "131212121",
    "occupation": "null",
    "date_of_birth": "null",
    "documents": {
      "cpf": "21212121",
      "rg": "131212121"
    },
    "phones": [
      "id_phone: `3232`",
      "type: `Comercial`",
      "numer: `number`"
    ],
    "vehicles": [],
    "vehicle_ignore": true,
    "pets": [],
    "pets_ignore": true,
    "devices": []
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}

Alterar foto do perfil

Alterar foto (multipart/form-data)
POST/me/photo

Example URI

POST https://api.winker.com.br/v1/me/photo
Request  Upload de um arquivo
HideShow
Headers
Accept: application/json
Authorization: JWT
Content-Disposition: form-data; name="fieldname"; filename="filename.jpg"
Content-Type: image/jpeg
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "uuid": {
      "type": "string",
      "description": "Identificador da entidade gerado"
    }
  }
}

Alterar senha

Alterar
POST/me/password/{password}

Example URI

POST https://api.winker.com.br/v1/me/password/1111
URI Parameters
HideShow
password
string (required) Example: 1111

Nova senha

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  201
HideShow
Headers
Content-Type: application/json
Body
{
  "success": true,
  "return": [
    "Password changed!"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "success": {
      "type": "boolean"
    },
    "return": {
      "type": "array"
    }
  }
}

Outros Usuários

Busca todos os usuários

Será apresentado os usuários relacionados ao login

Busca todos
GET/otheruser

Example URI

GET https://api.winker.com.br/v1/otheruser
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "history": {
    "30/11/2017 23:27:04": {
      "operacao": "-",
      "usuario": "Indefinido",
      "atributos": {
        "inicio": "15/08/2014",
        "termino": "null",
        "perfil": "null"
      }
    }
  },
  "id_user_unit": 109197,
  "id_user": 4372,
  "name": "Pessoa 4362 Sobrenome 4362",
  "photo": "/themes/intra/img/sf_ele.gif",
  "responsibility": "Proprietário: Responsável e morador",
  "activation_start": "2017-02-09T00:00:00-0200",
  "activation_end": "null",
  "id_unit": 110129,
  "unit": "Desenvolvimento",
  "id_division": 5493,
  "division": "Principal"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "history": {
      "type": "object",
      "properties": {
        "30/11/2017 23:27:04": {
          "type": "object",
          "properties": {
            "operacao": {
              "type": "string",
              "description": "Descrição da operação"
            },
            "usuario": {
              "type": "string"
            },
            "atributos": {
              "type": "object",
              "properties": {
                "inicio": {
                  "type": "string"
                },
                "termino": {
                  "type": "string"
                },
                "perfil": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "id_user_unit": {
      "type": "number"
    },
    "id_user": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "photo": {
      "type": "string"
    },
    "responsibility": {
      "type": "string"
    },
    "activation_start": {
      "type": "string"
    },
    "activation_end": {
      "type": "string"
    },
    "id_unit": {
      "type": "number"
    },
    "unit": {
      "type": "string"
    },
    "id_division": {
      "type": "number"
    },
    "division": {
      "type": "string"
    }
  }
}

Busca todos os profiles

Atributo de responsabilidade que são usados no cadastro de usuário

Busca todos os profiles
GET/otheruser/profiles

Example URI

GET https://api.winker.com.br/v1/otheruser/profiles
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "Condomínio": {
    "Proprietário": {
      "Proprietário: Responsável e morador": "Responsável e morador",
      "Proprietário: Responsável não morador": "Responsável não morador",
      "Proprietário: Cônjuge": "Cônjuge",
      "Proprietário: Filho": "Filho",
      "Proprietário: Outro parentesco": "Outro parentesco",
      "Proprietário: Sem parentesco": "Sem parentesco"
    },
    "Inquilino": {
      "Inquilino: Responsável contratualmente": "Responsável contratualmente",
      "Inquilino: Cônjuge": "Cônjuge",
      "Inquilino: Filho": "Filho",
      "Inquilino: Outro parentesco": "Outro parentesco",
      "Inquilino: Sem parentesco": "Sem parentesco"
    },
    "Associação": {
      "Associado": {
        "Associado": "Associado"
      },
      "Dependente": {
        "Dependente": "Dependente"
      }
    },
    "Clube de futebol": {
      "Associado": {
        "Associado": "Associado"
      }
    },
    "Coworking": {
      "Usuário": {
        "Usuário": "Usuário"
      }
    },
    "Empresarial": {
      "Usuário": {
        "Usuário": "Usuário"
      }
    }
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "Condomínio": {
      "type": "object",
      "properties": {
        "Proprietário": {
          "type": "object",
          "properties": {
            "Proprietário: Responsável e morador": {
              "type": "string"
            },
            "Proprietário: Responsável não morador": {
              "type": "string"
            },
            "Proprietário: Cônjuge": {
              "type": "string"
            },
            "Proprietário: Filho": {
              "type": "string"
            },
            "Proprietário: Outro parentesco": {
              "type": "string"
            },
            "Proprietário: Sem parentesco": {
              "type": "string"
            }
          }
        },
        "Inquilino": {
          "type": "object",
          "properties": {
            "Inquilino: Responsável contratualmente": {
              "type": "string"
            },
            "Inquilino: Cônjuge": {
              "type": "string"
            },
            "Inquilino: Filho": {
              "type": "string"
            },
            "Inquilino: Outro parentesco": {
              "type": "string"
            },
            "Inquilino: Sem parentesco": {
              "type": "string"
            }
          }
        },
        "Associação": {
          "type": "object",
          "properties": {
            "Associado": {
              "type": "object",
              "properties": {
                "Associado": {
                  "type": "string"
                }
              }
            },
            "Dependente": {
              "type": "object",
              "properties": {
                "Dependente": {
                  "type": "string"
                }
              }
            }
          }
        },
        "Clube de futebol": {
          "type": "object",
          "properties": {
            "Associado": {
              "type": "object",
              "properties": {
                "Associado": {
                  "type": "string"
                }
              }
            }
          }
        },
        "Coworking": {
          "type": "object",
          "properties": {
            "Usuário": {
              "type": "object",
              "properties": {
                "Usuário": {
                  "type": "string"
                }
              }
            }
          }
        },
        "Empresarial": {
          "type": "object",
          "properties": {
            "Usuário": {
              "type": "object",
              "properties": {
                "Usuário": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}

Registrar outro usuário

Registrar
POST/otheruser/add

Example URI

POST https://api.winker.com.br/v1/otheruser/add
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object"
}

Moradores

Criar Morador

Criar Morador
POST/portal/{id_portal}/division/{id_division}/unit/{id_unit}/user_unit

Example URI

POST https://api.winker.com.br/v1/portal/2057/division/3057/unit/4057/user_unit
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_division
number (required) Example: 3057

Identificador da divisao

id_unit
number (required) Example: 4057

Identificador da unidade

Request
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "name": "Pessoa",
  "surname": "4362 Sobrenome 4362",
  "email": "usuario2@winker.com.br",
  "doc_type: `pessoa_fisica`": "Hello, world!",
  "doc_cpf": "641.847.832-01",
  "doc_cnpj": "81.447.579/0001-37",
  "profile": "Proprietário: Responsável e morador",
  "id_unit": 110129,
  "phones": [
    {
      "id_phone": 192,
      "type": "Celular",
      "number": "(48) 99999-9999"
    }
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nome do Usuario"
    },
    "surname": {
      "type": "string",
      "description": "Sobre nome do Usuário"
    },
    "email": {
      "type": "string",
      "description": "E-mail do usuário"
    },
    "doc_type: `pessoa_fisica`": {
      "type": "string"
    },
    "doc_cpf": {
      "type": "string",
      "description": "CPF do usuário"
    },
    "doc_cnpj": {
      "type": "string",
      "description": "CNPJ do usuário"
    },
    "profile": {
      "type": "string"
    },
    "id_unit": {
      "type": "number"
    },
    "phones": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id_phone": {
            "type": "number",
            "description": "Identificador do telefone"
          },
          "type": {
            "type": "string",
            "description": "Tipo de telefone"
          },
          "number": {
            "type": "string",
            "description": "Numero de telefone"
          }
        }
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  201
HideShow
Body
{
  "history": {
    "30/11/2017 23:27:04": {
      "operação": "09/02/2017",
      "usuario": "null",
      "atributos": {
        "inicio": "09/02/2017",
        "termino": "null",
        "perfil": "Proprietário: Responsável e morador"
      }
    }
  },
  "id_user_unit": 109197,
  "id_user": 4372,
  "name": "Pessoa 4362 Sobrenome 4362",
  "photo": "/themes/intra/img/sf_ele.gif",
  "responsibility": "Proprietário: Responsável e morador",
  "activation_start": "2017-02-09T00:00:00-0200",
  "activation_end": "null",
  "id_unit": 110129,
  "unit": "Desenvolvimento",
  "id_division": 5493,
  "division": "Principal"
}
Schema
{
  "type": "object",
  "properties": {
    "history": {
      "type": "object",
      "properties": {
        "30/11/2017 23:27:04": {
          "type": "object",
          "properties": {
            "operação": {
              "type": "string",
              "description": "Data da operação"
            },
            "usuario": {
              "type": "string",
              "description": "Nome do usuário"
            },
            "atributos": {
              "type": "object",
              "properties": {
                "inicio": {
                  "type": "string"
                },
                "termino": {
                  "type": "string"
                },
                "perfil": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "id_user_unit": {
      "type": "number"
    },
    "id_user": {
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "photo": {
      "type": "string"
    },
    "responsibility": {
      "type": "string"
    },
    "activation_start": {
      "type": "string"
    },
    "activation_end": {
      "type": "string"
    },
    "id_unit": {
      "type": "number"
    },
    "unit": {
      "type": "string"
    },
    "id_division": {
      "type": "number"
    },
    "division": {
      "type": "string"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar moradores ativos

Listar moradores ativos
GET/user_unit/active?id_portal={id_portal}&full_profile={full_profile}=1

Example URI

GET https://api.winker.com.br/v1/user_unit/active?id_portal=2057&full_profile=[1 | 0]=1
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

full_profile
number (optional) Example: [1 | 0]

Identificador do portal

Request  Listar todos moradores do portal
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Response  204
HideShow
Body
[
  {
    "history": {
      "30/11/2017 23:27:04": {
        "operação": "09/02/2017",
        "usuario": "null",
        "atributos": {
          "inicio": "09/02/2017",
          "termino": "null",
          "perfil": "Proprietário: Responsável e morador"
        }
      }
    },
    "id_user_unit": 109197,
    "id_user": 4372,
    "name": "Pessoa 4362 Sobrenome 4362",
    "photo": "/themes/intra/img/sf_ele.gif",
    "responsibility": "Proprietário: Responsável e morador",
    "activation_start": "2017-02-09T00:00:00-0200",
    "activation_end": "null",
    "id_unit": 110129,
    "unit": "Desenvolvimento",
    "id_division": 5493,
    "division": "Principal"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "history": {
        "type": "object",
        "properties": {
          "30/11/2017 23:27:04": {
            "type": "object",
            "properties": {
              "operação": {
                "type": "string",
                "description": "Data da operação"
              },
              "usuario": {
                "type": "string",
                "description": "Nome do usuário"
              },
              "atributos": {
                "type": "object",
                "properties": {
                  "inicio": {
                    "type": "string"
                  },
                  "termino": {
                    "type": "string"
                  },
                  "perfil": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "id_user_unit": {
        "type": "number"
      },
      "id_user": {
        "type": "number"
      },
      "name": {
        "type": "string"
      },
      "photo": {
        "type": "string"
      },
      "responsibility": {
        "type": "string"
      },
      "activation_start": {
        "type": "string"
      },
      "activation_end": {
        "type": "string"
      },
      "id_unit": {
        "type": "number"
      },
      "unit": {
        "type": "string"
      },
      "id_division": {
        "type": "number"
      },
      "division": {
        "type": "string"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar moradores inativos

Listar moradores inativos
GET/user_unit/inactive?id_portal={id_portal}&full_profile={full_profile}=1

Example URI

GET https://api.winker.com.br/v1/user_unit/inactive?id_portal=2057&full_profile=[1 | 0]=1
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

full_profile
number (optional) Example: [1 | 0]

Identificador do portal

Request  Listar todos moradores do portal
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Response  204
HideShow
Body
[
  {
    "history": {
      "30/11/2017 23:27:04": {
        "operação": "09/02/2017",
        "usuario": "null",
        "atributos": {
          "inicio": "09/02/2017",
          "termino": "null",
          "perfil": "Proprietário: Responsável e morador"
        }
      }
    },
    "id_user_unit": 109197,
    "id_user": 4372,
    "name": "Pessoa 4362 Sobrenome 4362",
    "photo": "/themes/intra/img/sf_ele.gif",
    "responsibility": "Proprietário: Responsável e morador",
    "activation_start": "2017-02-09T00:00:00-0200",
    "activation_end": "null",
    "id_unit": 110129,
    "unit": "Desenvolvimento",
    "id_division": 5493,
    "division": "Principal"
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "history": {
        "type": "object",
        "properties": {
          "30/11/2017 23:27:04": {
            "type": "object",
            "properties": {
              "operação": {
                "type": "string",
                "description": "Data da operação"
              },
              "usuario": {
                "type": "string",
                "description": "Nome do usuário"
              },
              "atributos": {
                "type": "object",
                "properties": {
                  "inicio": {
                    "type": "string"
                  },
                  "termino": {
                    "type": "string"
                  },
                  "perfil": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "id_user_unit": {
        "type": "number"
      },
      "id_user": {
        "type": "number"
      },
      "name": {
        "type": "string"
      },
      "photo": {
        "type": "string"
      },
      "responsibility": {
        "type": "string"
      },
      "activation_start": {
        "type": "string"
      },
      "activation_end": {
        "type": "string"
      },
      "id_unit": {
        "type": "number"
      },
      "unit": {
        "type": "string"
      },
      "id_division": {
        "type": "number"
      },
      "division": {
        "type": "string"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Lista detalhes dos moradores

Lista detalhes
GET/user_unit/{id_user}

Example URI

GET https://api.winker.com.br/v1/user_unit/2057
URI Parameters
HideShow
id_user
number (required) Example: 2057

Identificador do usuario

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_user": 2,
  "name": "Pessoa 1 Sobrenome 1",
  "photo": "/themes/intra/img/sf_ele.gif",
  "type": "individual",
  "user": "usuario2@winker.com.br",
  "first_name": "Pessoa 1",
  "last_name": "Sobrenome 1",
  "email": "usuario2@winker.com.br",
  "gender": "M",
  "cpf": "null",
  "rg": "null",
  "occupation": "Empresário",
  "date_of_birth": "1986-06-12",
  "documents": {
    "cpf": "null",
    "rg": "null"
  },
  "phones": [
    {
      "id_phone": 192,
      "type": "Celular",
      "number": "(48) 99999-9999"
    }
  ],
  "vehicles": [
    {
      "id_vehicle": 35,
      "type": "null",
      "model": "Clio",
      "brand": {
        "id_vehicle_brand": 19,
        "brand": "Chevrolet"
      },
      "color": {
        "code": "Black",
        "label": "Preto"
      },
      "license_plate": "ASD-s232",
      "id_user": 12,
      "owner": "Pessoa 1974 Sobrenome 1974",
      "photo": "url"
    }
  ],
  "vehicles_ignore": true,
  "pets": [
    {
      "id_pet": 485,
      "name": "AuAu",
      "type": {
        "id_pet_type": 1,
        "type": "Cachorro"
      },
      "gender": {
        "code": "Male",
        "label": "Macho"
      },
      "size": {
        "code": "Medium",
        "label `Médio`": "Hello, world!"
      },
      "characteristics": "Branquinho",
      "id_user": 2,
      "owner": "Pessoa 1 Sobrenome 1",
      "photo": "https://rededomus.s3-sa-east-1.amazonaws.com/files/upload/2017/08/31/60613.59a81d6390b7b9.29021477_3fc10d10714b.jpeg"
    }
  ],
  "pets_ignore": true,
  "unit": {
    "id_unit": 2720,
    "name": "1110",
    "parking_spot": "null",
    "hobby_box": "null",
    "administrative": "0",
    "id_division": 108,
    "division": "Único",
    "usersPhoto": "``",
    "note": "null",
    "area": "null",
    "id_portal": 34,
    "portal": "Condominio 34",
    "activation_start": "2014-08-15T00:00:00-0300",
    "activation_end": "null",
    "id_unit_user": 2057,
    "id_user_unit": 2057,
    "profile": "null"
  },
  "history": {
    "30/11/2017 23:27:04": {
      "operacao": "-",
      "usuario": "Indefinido",
      "atributos": {
        "inicio": "15/08/2014",
        "termino": "null",
        "perfil": "null"
      }
    }
  },
  "id_user_unit": 2057
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_user": {
      "type": "number",
      "description": "Identificador do condômino"
    },
    "name": {
      "type": "string",
      "description": "Nome do condômino"
    },
    "photo": {
      "type": "string",
      "description": "Caminho da foto cadastrada"
    },
    "type": {
      "type": "string",
      "description": "Tipo de condômino"
    },
    "user": {
      "type": "string",
      "description": "E-mail de usuário"
    },
    "first_name": {
      "type": "string",
      "description": "Primeiro nome do condômino"
    },
    "last_name": {
      "type": "string",
      "description": "Sobrenome do condômino"
    },
    "email": {
      "type": "string",
      "description": "E-mail do usuário"
    },
    "gender": {
      "type": "string",
      "description": "Sexo"
    },
    "cpf": {
      "type": "string",
      "description": "CPF"
    },
    "rg": {
      "type": "string",
      "description": "RG"
    },
    "occupation": {
      "type": "string",
      "description": "Ocupação do condômino"
    },
    "date_of_birth": {
      "type": "string",
      "description": "Data de nascimento"
    },
    "documents": {
      "type": "object",
      "properties": {
        "cpf": {
          "type": "string",
          "description": "CPF"
        },
        "rg": {
          "type": "string",
          "description": "RG"
        }
      }
    },
    "phones": {
      "type": "array"
    },
    "vehicles": {
      "type": "array"
    },
    "vehicles_ignore": {
      "type": "boolean"
    },
    "pets": {
      "type": "array"
    },
    "pets_ignore": {
      "type": "boolean"
    },
    "unit": {
      "type": "object",
      "properties": {
        "id_unit": {
          "type": "number"
        },
        "name": {
          "type": "string"
        },
        "parking_spot": {
          "type": "string"
        },
        "hobby_box": {
          "type": "string"
        },
        "administrative": {
          "type": "string"
        },
        "id_division": {
          "type": "number"
        },
        "division": {
          "type": "string"
        },
        "usersPhoto": {
          "type": "string"
        },
        "note": {
          "type": "string"
        },
        "area": {
          "type": "string"
        },
        "id_portal": {
          "type": "number"
        },
        "portal": {
          "type": "string"
        },
        "activation_start": {
          "type": "string"
        },
        "activation_end": {
          "type": "string"
        },
        "id_unit_user": {
          "type": "number"
        },
        "id_user_unit": {
          "type": "number"
        },
        "profile": {
          "type": "string"
        }
      }
    },
    "history": {
      "type": "object",
      "properties": {
        "30/11/2017 23:27:04": {
          "type": "object",
          "properties": {
            "operacao": {
              "type": "string",
              "description": "Descrição da operação"
            },
            "usuario": {
              "type": "string"
            },
            "atributos": {
              "type": "object",
              "properties": {
                "inicio": {
                  "type": "string"
                },
                "termino": {
                  "type": "string"
                },
                "perfil": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "id_user_unit": {
      "type": "number",
      "description": "Identificador do usuário"
    }
  }
}

Transferir morador para outra unidade

Transferir morador
POST/users/transfer

Example URI

POST https://api.winker.com.br/v1/users/transfer
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "id_user_unit": 2057,
  "id_division": 11,
  "id_unit": 2057
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_user_unit": {
      "type": "number",
      "description": "Identificador do morador da unidade"
    },
    "id_division": {
      "type": "number",
      "description": "Identificador do morador da unidade"
    },
    "id_unit": {
      "type": "number",
      "description": "Identificador do morador da unidade"
    }
  },
  "required": [
    "id_user_unit",
    "id_division",
    "id_unit"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "sucess": "true"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "sucess": {
      "type": "string"
    }
  }
}

Ativar morador

Ativar
POST/users/activate

Example URI

POST https://api.winker.com.br/v1/users/activate
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "id_user_unit": 2057
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_user_unit": {
      "type": "number",
      "description": "Identificador do morador da unidade"
    }
  },
  "required": [
    "id_user_unit"
  ]
}
Response  204
HideShow
Headers
Content-Type: application/json

Intivar morador

Inativa
POST/users/inactivate

Example URI

POST https://api.winker.com.br/v1/users/inactivate
Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "id_user_unit": 2057
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_user_unit": {
      "type": "number",
      "description": "Identificador do morador da unidade"
    }
  },
  "required": [
    "id_user_unit"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "sucess": "true"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "sucess": {
      "type": "string"
    }
  }
}

Unidades

Unidades

Criar Unidade

Criar Unidade
POST/portal/{id_portal}/division/{id_division}/Unit

Example URI

POST https://api.winker.com.br/v1/portal/2057/division/3030/Unit
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_division
number (required) Example: 3030

Identificador do Divsão

Request  Criar uma Unidade
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "id_unit": 110130,
  "name": "Atendimento",
  "parking_spot": "``",
  "hobby_box": "``",
  "administrative": 0,
  "id_division": 5493,
  "division": "UNICA",
  "usersPhoto": [],
  "note": "Sem moradores",
  "area": ""
}
Schema
{
  "type": "object",
  "properties": {
    "id_unit": {
      "type": "number",
      "description": "Identificador da Unidade"
    },
    "name": {
      "type": "string",
      "description": "Nome da Unidade"
    },
    "parking_spot": {
      "type": "string",
      "description": "Vaga Garagem"
    },
    "hobby_box": {
      "type": "string",
      "description": "Hobby box"
    },
    "administrative": {
      "enum": [
        0,
        1
      ],
      "description": "Identifica se é administradora ou não"
    },
    "id_division": {
      "type": "number",
      "description": "id da divisão pertencente"
    },
    "division": {
      "type": "string",
      "description": "nome da divisão pertencente"
    },
    "usersPhoto": {
      "type": "array",
      "description": "fotos dos usuários"
    },
    "note": {
      "type": "string",
      "description": "Observações"
    },
    "area": {
      "enum": [
        "",
        "Garagem",
        "Box"
      ],
      "description": "Extensão"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  201
HideShow
Body
{
  "id_unit": 110130,
  "name": "Atendimento",
  "parking_spot": "``",
  "hobby_box": "``",
  "administrative": 0,
  "id_division": 5493,
  "division": "UNICA",
  "usersPhoto": [],
  "note": "Sem moradores",
  "area": ""
}
Schema
{
  "type": "object",
  "properties": {
    "id_unit": {
      "type": "number",
      "description": "Identificador da Unidade"
    },
    "name": {
      "type": "string",
      "description": "Nome da Unidade"
    },
    "parking_spot": {
      "type": "string",
      "description": "Vaga Garagem"
    },
    "hobby_box": {
      "type": "string",
      "description": "Hobby box"
    },
    "administrative": {
      "enum": [
        0,
        1
      ],
      "description": "Identifica se é administradora ou não"
    },
    "id_division": {
      "type": "number",
      "description": "id da divisão pertencente"
    },
    "division": {
      "type": "string",
      "description": "nome da divisão pertencente"
    },
    "usersPhoto": {
      "type": "array",
      "description": "fotos dos usuários"
    },
    "note": {
      "type": "string",
      "description": "Observações"
    },
    "area": {
      "enum": [
        "",
        "Garagem",
        "Box"
      ],
      "description": "Extensão"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Unidade

Atualizar Unidade
PUT/portal/{id_portal}/division/{id_division}/Unit/{id_unit}

Example URI

PUT https://api.winker.com.br/v1/portal/2057/division/3030/Unit/104332
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_division
number (required) Example: 3030

Identificador do Divsão

id_unit
number (required) Example: 104332

Identificador do Unit

Request  Atualizar uma Unidade
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "id_unit": 110130,
  "name": "Atendimento",
  "parking_spot": "``",
  "hobby_box": "``",
  "administrative": 0,
  "id_division": 5493,
  "division": "UNICA",
  "usersPhoto": [],
  "note": "Sem moradores",
  "area": ""
}
Schema
{
  "type": "object",
  "properties": {
    "id_unit": {
      "type": "number",
      "description": "Identificador da Unidade"
    },
    "name": {
      "type": "string",
      "description": "Nome da Unidade"
    },
    "parking_spot": {
      "type": "string",
      "description": "Vaga Garagem"
    },
    "hobby_box": {
      "type": "string",
      "description": "Hobby box"
    },
    "administrative": {
      "enum": [
        0,
        1
      ],
      "description": "Identifica se é administradora ou não"
    },
    "id_division": {
      "type": "number",
      "description": "id da divisão pertencente"
    },
    "division": {
      "type": "string",
      "description": "nome da divisão pertencente"
    },
    "usersPhoto": {
      "type": "array",
      "description": "fotos dos usuários"
    },
    "note": {
      "type": "string",
      "description": "Observações"
    },
    "area": {
      "enum": [
        "",
        "Garagem",
        "Box"
      ],
      "description": "Extensão"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  202
HideShow
Body
{
  "id_unit": 110130,
  "name": "Atendimento",
  "parking_spot": "``",
  "hobby_box": "``",
  "administrative": 0,
  "id_division": 5493,
  "division": "UNICA",
  "usersPhoto": [],
  "note": "Sem moradores",
  "area": ""
}
Schema
{
  "type": "object",
  "properties": {
    "id_unit": {
      "type": "number",
      "description": "Identificador da Unidade"
    },
    "name": {
      "type": "string",
      "description": "Nome da Unidade"
    },
    "parking_spot": {
      "type": "string",
      "description": "Vaga Garagem"
    },
    "hobby_box": {
      "type": "string",
      "description": "Hobby box"
    },
    "administrative": {
      "enum": [
        0,
        1
      ],
      "description": "Identifica se é administradora ou não"
    },
    "id_division": {
      "type": "number",
      "description": "id da divisão pertencente"
    },
    "division": {
      "type": "string",
      "description": "nome da divisão pertencente"
    },
    "usersPhoto": {
      "type": "array",
      "description": "fotos dos usuários"
    },
    "note": {
      "type": "string",
      "description": "Observações"
    },
    "area": {
      "enum": [
        "",
        "Garagem",
        "Box"
      ],
      "description": "Extensão"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Deletar Unidade
DELETE/portal/{id_portal}/division/{id_division}/Unit/{id_unit}

Example URI

DELETE https://api.winker.com.br/v1/portal/2057/division/3030/Unit/104332
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_division
number (required) Example: 3030

Identificador do Divsão

id_unit
number (required) Example: 104332

Identificador do Unit

Request  Remover uma Unidade
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Response  204
HideShow
Body
{
  "id_unit": 110130,
  "name": "Atendimento",
  "parking_spot": "``",
  "hobby_box": "``",
  "administrative": 0,
  "id_division": 5493,
  "division": "UNICA",
  "usersPhoto": [],
  "note": "Sem moradores",
  "area": ""
}
Schema
{
  "type": "object",
  "properties": {
    "id_unit": {
      "type": "number",
      "description": "Identificador da Unidade"
    },
    "name": {
      "type": "string",
      "description": "Nome da Unidade"
    },
    "parking_spot": {
      "type": "string",
      "description": "Vaga Garagem"
    },
    "hobby_box": {
      "type": "string",
      "description": "Hobby box"
    },
    "administrative": {
      "enum": [
        0,
        1
      ],
      "description": "Identifica se é administradora ou não"
    },
    "id_division": {
      "type": "number",
      "description": "id da divisão pertencente"
    },
    "division": {
      "type": "string",
      "description": "nome da divisão pertencente"
    },
    "usersPhoto": {
      "type": "array",
      "description": "fotos dos usuários"
    },
    "note": {
      "type": "string",
      "description": "Observações"
    },
    "area": {
      "enum": [
        "",
        "Garagem",
        "Box"
      ],
      "description": "Extensão"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Listar Unidade por Portal

Listar por portal
GET/v1/portal/{id_portal}/unit

Example URI

GET https://api.winker.com.br/v1/v1/portal/2057/unit
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request  Listar todas Unidade por portal
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Response  204
HideShow
Body
[
  {
    "id_unit": 110130,
    "name": "Atendimento",
    "parking_spot": "``",
    "hobby_box": "``",
    "administrative": 0,
    "id_division": 5493,
    "division": "UNICA",
    "usersPhoto": [],
    "note": "Sem moradores",
    "area": ""
  }
]
Schema
{
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_unit": {
        "type": "number",
        "description": "Identificador da Unidade"
      },
      "name": {
        "type": "string",
        "description": "Nome da Unidade"
      },
      "parking_spot": {
        "type": "string",
        "description": "Vaga Garagem"
      },
      "hobby_box": {
        "type": "string",
        "description": "Hobby box"
      },
      "administrative": {
        "enum": [
          0,
          1
        ],
        "description": "Identifica se é administradora ou não"
      },
      "id_division": {
        "type": "number",
        "description": "id da divisão pertencente"
      },
      "division": {
        "type": "string",
        "description": "nome da divisão pertencente"
      },
      "usersPhoto": {
        "type": "array",
        "description": "fotos dos usuários"
      },
      "note": {
        "type": "string",
        "description": "Observações"
      },
      "area": {
        "enum": [
          "",
          "Garagem",
          "Box"
        ],
        "description": "Extensão"
      }
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "code": 400,
  "message": "Hello, world!",
  "description": "Hello, world!"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "code": {
      "type": "number",
      "description": "Status code"
    },
    "message": {
      "type": "string",
      "description": "Mensagem do status"
    },
    "description": {
      "type": "string",
      "description": "Descrição do status"
    }
  }
}

Contratos de Fornecedores

Listar todos os contratos de fornecedores

Listar contratos
GET/provider-contract{?id_portal}

Example URI

GET https://api.winker.com.br/v1/provider-contract?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_portal": "1288",
    "name": "Fornecedor 1288",
    "start": "2019-03-31T00:00:00-0300",
    "end": "2019-03-31T00:00:00-0300",
    "provider": "Fornecedor 9643",
    "id_file": "1112",
    "description": "Descrição - 128",
    "value": "3000.00",
    "payment_type": "Anual"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_portal": {
        "type": "string",
        "description": "Identificação do Fornecedor"
      },
      "name": {
        "type": "string",
        "description": "Nome do Fornecedor"
      },
      "start": {
        "type": "string",
        "description": "Data de Inicio"
      },
      "end": {
        "type": "string",
        "description": "Data de Encerramento"
      },
      "provider": {
        "type": "string",
        "description": "Fornecedor"
      },
      "id_file": {
        "type": "string",
        "description": "Identificação do arquivo"
      },
      "description": {
        "type": "string",
        "description": "Descrição do contrato"
      },
      "value": {
        "type": "string",
        "description": "Valor do contrato"
      },
      "payment_type": {
        "type": "string",
        "description": "Tipo de pagamento"
      }
    }
  }
}

Listar os detalhes do contrato de fornecedor

Listar detalhes do contrato
GET/provider-contract/{id_provider_contract}

Example URI

GET https://api.winker.com.br/v1/provider-contract/2057
URI Parameters
HideShow
id_provider_contract
number (required) Example: 2057

Identificador do contrato do fornecedor

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_portal": "1288",
  "name": "Fornecedor 1288",
  "start": "2019-03-31T00:00:00-0300",
  "end": "2019-03-31T00:00:00-0300",
  "provider": "Fornecedor 9643",
  "id_file": "1112",
  "description": "Descrição - 128",
  "value": "3000.00",
  "payment_type": "Anual"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_portal": {
      "type": "string",
      "description": "Identificação do Fornecedor"
    },
    "name": {
      "type": "string",
      "description": "Nome do Fornecedor"
    },
    "start": {
      "type": "string",
      "description": "Data de Inicio"
    },
    "end": {
      "type": "string",
      "description": "Data de Encerramento"
    },
    "provider": {
      "type": "string",
      "description": "Fornecedor"
    },
    "id_file": {
      "type": "string",
      "description": "Identificação do arquivo"
    },
    "description": {
      "type": "string",
      "description": "Descrição do contrato"
    },
    "value": {
      "type": "string",
      "description": "Valor do contrato"
    },
    "payment_type": {
      "type": "string",
      "description": "Tipo de pagamento"
    }
  },
  "required": [
    "id_portal",
    "name",
    "start",
    "end",
    "provider",
    "id_file",
    "description",
    "value",
    "payment_type"
  ],
  "additionalProperties": false
}

Baixar contrato anexo

Baixar contrato anexo
GET/provider-contract/document/{id_document}/download

Example URI

GET https://api.winker.com.br/v1/provider-contract/document/110/download
URI Parameters
HideShow
id_document
number (required) Example: 110

Identificador do documento

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200

Correspondências

Listar os detalhes da correspondência

Listar Informações
GET/package/info{?id_portal,id_package}

Example URI

GET https://api.winker.com.br/v1/package/info?id_portal=2057&id_package=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

id_package
number (required) Example: 2057

Identificador da correspondência

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_package": "1",
  "receiver": {
    "unit": "101 - Bloco 1",
    "name": "Pessoa 1023 Sobrenome 2312"
  },
  "sender": "Remetente 234234",
  "note_incoming": "Embalagem chegou rasgada",
  "note_delivery": "Entregue com sucesso",
  "user_incoming": "Pessoa 1023 Sobrenome 2312",
  "user_delivery": "Entregador 12312",
  "since": "77d",
  "created_at": "2019-03-31T00:00:00-0300",
  "delivered_at": "2019-03-31T00:00:00-0300"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_package": {
      "type": "string",
      "description": "Identificação da correspondência"
    },
    "receiver": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "description": "Unidade"
        },
        "name": {
          "type": "string",
          "description": "Nome e sobrenome do Usuário"
        }
      },
      "description": "Receiver"
    },
    "sender": {
      "type": "string",
      "description": "Remetente"
    },
    "note_incoming": {
      "type": "string",
      "description": "Nota de recebimento"
    },
    "note_delivery": {
      "type": "string",
      "description": "Nota de entrega"
    },
    "user_incoming": {
      "type": "string",
      "description": "Usuário que recebeu"
    },
    "user_delivery": {
      "type": "string",
      "description": "Usuário que entregou"
    },
    "since": {
      "type": "string",
      "description": "Quantos dias fazem que foi criado"
    },
    "created_at": {
      "type": "string",
      "description": "Data de criação"
    },
    "delivered_at": {
      "type": "string",
      "description": "Data de entrega"
    }
  },
  "required": [
    "id_package",
    "receiver",
    "sender",
    "note_incoming",
    "note_delivery",
    "user_incoming",
    "user_delivery",
    "since",
    "created_at",
    "delivered_at"
  ],
  "additionalProperties": false
}

Entrega a correspondência

Listar Informações
PATCH/package/deliver{?id_portal}

Example URI

PATCH https://api.winker.com.br/v1/package/deliver?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Body
{
  "id_package": 2057,
  "note_delivery": "Entregue em mãos"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_package": {
      "type": "number",
      "description": "Identificador da correspondência"
    },
    "note_delivery": {
      "type": "string",
      "description": "Nota de entrega"
    }
  },
  "required": [
    "id_package"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_package": "1",
  "receiver": {
    "unit": "101 - Bloco 1",
    "name": "Pessoa 1023 Sobrenome 2312"
  },
  "sender": "Remetente 234234",
  "note_incoming": "Embalagem chegou rasgada",
  "note_delivery": "Entregue com sucesso",
  "user_incoming": "Pessoa 1023 Sobrenome 2312",
  "user_delivery": "Entregador 12312",
  "since": "77d",
  "created_at": "2019-03-31T00:00:00-0300",
  "delivered_at": "2019-03-31T00:00:00-0300"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_package": {
      "type": "string",
      "description": "Identificação da correspondência"
    },
    "receiver": {
      "type": "object",
      "properties": {
        "unit": {
          "type": "string",
          "description": "Unidade"
        },
        "name": {
          "type": "string",
          "description": "Nome e sobrenome do Usuário"
        }
      },
      "description": "Receiver"
    },
    "sender": {
      "type": "string",
      "description": "Remetente"
    },
    "note_incoming": {
      "type": "string",
      "description": "Nota de recebimento"
    },
    "note_delivery": {
      "type": "string",
      "description": "Nota de entrega"
    },
    "user_incoming": {
      "type": "string",
      "description": "Usuário que recebeu"
    },
    "user_delivery": {
      "type": "string",
      "description": "Usuário que entregou"
    },
    "since": {
      "type": "string",
      "description": "Quantos dias fazem que foi criado"
    },
    "created_at": {
      "type": "string",
      "description": "Data de criação"
    },
    "delivered_at": {
      "type": "string",
      "description": "Data de entrega"
    }
  },
  "required": [
    "id_package",
    "receiver",
    "sender",
    "note_incoming",
    "note_delivery",
    "user_incoming",
    "user_delivery",
    "since",
    "created_at",
    "delivered_at"
  ],
  "additionalProperties": false
}

Listar as correspondências entregues

Listar correspondências
GET/package/delivered{?id_portal}

Example URI

GET https://api.winker.com.br/v1/package/delivered?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_package": "1",
    "receiver": {
      "unit": "101 - Bloco 1",
      "name": "Pessoa 1023 Sobrenome 2312"
    },
    "sender": "Remetente 234234",
    "note_incoming": "Embalagem chegou rasgada",
    "note_delivery": "Entregue com sucesso",
    "user_incoming": "Pessoa 1023 Sobrenome 2312",
    "user_delivery": "Entregador 12312",
    "since": "77d",
    "created_at": "2019-03-31T00:00:00-0300",
    "delivered_at": "2019-03-31T00:00:00-0300"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_package": {
        "type": "string",
        "description": "Identificação da correspondência"
      },
      "receiver": {
        "type": "object",
        "properties": {
          "unit": {
            "type": "string",
            "description": "Unidade"
          },
          "name": {
            "type": "string",
            "description": "Nome e sobrenome do Usuário"
          }
        },
        "description": "Receiver"
      },
      "sender": {
        "type": "string",
        "description": "Remetente"
      },
      "note_incoming": {
        "type": "string",
        "description": "Nota de recebimento"
      },
      "note_delivery": {
        "type": "string",
        "description": "Nota de entrega"
      },
      "user_incoming": {
        "type": "string",
        "description": "Usuário que recebeu"
      },
      "user_delivery": {
        "type": "string",
        "description": "Usuário que entregou"
      },
      "since": {
        "type": "string",
        "description": "Quantos dias fazem que foi criado"
      },
      "created_at": {
        "type": "string",
        "description": "Data de criação"
      },
      "delivered_at": {
        "type": "string",
        "description": "Data de entrega"
      }
    }
  }
}

Listar correspondências não entregues

Listar correspondências não entregues
GET/package/todeliver{?id_portal}

Example URI

GET https://api.winker.com.br/v1/package/todeliver?id_portal=2057
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_package": "1",
    "receiver": {
      "unit": "101 - Bloco 1",
      "name": "Pessoa 1023 Sobrenome 2312"
    },
    "sender": "Remetente 234234",
    "note_incoming": "Embalagem chegou rasgada",
    "note_delivery": "Entregue com sucesso",
    "user_incoming": "Pessoa 1023 Sobrenome 2312",
    "user_delivery": "Entregador 12312",
    "since": "77d",
    "created_at": "2019-03-31T00:00:00-0300",
    "delivered_at": "2019-03-31T00:00:00-0300"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_package": {
        "type": "string",
        "description": "Identificação da correspondência"
      },
      "receiver": {
        "type": "object",
        "properties": {
          "unit": {
            "type": "string",
            "description": "Unidade"
          },
          "name": {
            "type": "string",
            "description": "Nome e sobrenome do Usuário"
          }
        },
        "description": "Receiver"
      },
      "sender": {
        "type": "string",
        "description": "Remetente"
      },
      "note_incoming": {
        "type": "string",
        "description": "Nota de recebimento"
      },
      "note_delivery": {
        "type": "string",
        "description": "Nota de entrega"
      },
      "user_incoming": {
        "type": "string",
        "description": "Usuário que recebeu"
      },
      "user_delivery": {
        "type": "string",
        "description": "Usuário que entregou"
      },
      "since": {
        "type": "string",
        "description": "Quantos dias fazem que foi criado"
      },
      "created_at": {
        "type": "string",
        "description": "Data de criação"
      },
      "delivered_at": {
        "type": "string",
        "description": "Data de entrega"
      }
    }
  }
}

Câmeras

Acessar todas as câmeras do usuário no portal

Acessar todas as câmeras
GET/camera{?id_portal}

Example URI

GET https://api.winker.com.br/v1/camera?id_portal=2
URI Parameters
HideShow
id_portal
number (required) Example: 2

Identificador do portal

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  null
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {}
  }
}

Listar câmera do portal

Listar câmera
GET/camera/read{?id_portal,id_camera}

Example URI

GET https://api.winker.com.br/v1/camera/read?id_portal=2&id_camera=1
URI Parameters
HideShow
id_portal
number (required) Example: 2

Identificador do portal

id_camera
number (required) Example: 1

Identificador da câmera

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  null
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {}
  }
}

Iniciar câmera do portal

Iniciar câmera
GET/camera/start{?id_portal,id_camera}

Example URI

GET https://api.winker.com.br/v1/camera/start?id_portal=2&id_camera=1
URI Parameters
HideShow
id_portal
number (required) Example: 2

Identificador do portal

id_camera
number (required) Example: 1

Identificador da câmera

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  null
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {}
  }
}

Manutenções

Listar as manutenções

Listar manutenções
GET/maintenance{?id_portal,name}

Example URI

GET https://api.winker.com.br/v1/maintenance?id_portal=2057&name=Caixa
URI Parameters
HideShow
id_portal
number (required) Example: 2057

Identificador do portal

name
string (optional) Example: Caixa

Filtra pelo nome da manutenção

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
[
  {
    "id_maintenance": 986,
    "name": "Extintores",
    "description": "Aqui vai a descrição",
    "next_maintenance": "2019-03-31T00:00:00-0300",
    "provider": "Ricardo Extintores",
    "id_provider": 10,
    "id_portal": 1,
    "active": 1,
    "repetition_type": "month",
    "repetition_value": 3
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id_maintenance": {
        "type": "number",
        "description": "Identificador da manutenção"
      },
      "name": {
        "type": "string",
        "description": "Nome da manutenção"
      },
      "description": {
        "type": "string",
        "description": "Descrição da manutenção"
      },
      "next_maintenance": {
        "type": "string",
        "description": "Data de quando será a próxima manutenção"
      },
      "provider": {
        "type": "string",
        "description": "Nome do fornecedor padrão dessa manutenção"
      },
      "id_provider": {
        "type": "number",
        "description": "Identificador do fornecedor"
      },
      "id_portal": {
        "type": "number",
        "description": "Identificador do portal"
      },
      "active": {
        "type": "number",
        "description": "Ativo = 1 / Inativo = 0"
      },
      "repetition_type": {
        "type": "string",
        "description": "Tipo da mautenção (day, month, year)"
      },
      "repetition_value": {
        "type": "number",
        "description": "Irá repetir a cada"
      }
    }
  }
}

Manutenção

Visualizar
GET/maintenance/{id_maintenance}

Example URI

GET https://api.winker.com.br/v1/maintenance/986
URI Parameters
HideShow
id_maintenance
number (required) Example: 986

Identificador da manutenção

Request
HideShow
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id_maintenance": 986,
  "name": "Extintores",
  "description": "Aqui vai a descrição",
  "next_maintenance": "2019-03-31T00:00:00-0300",
  "provider": "Ricardo Extintores",
  "id_provider": 10,
  "id_portal": 1,
  "active": 1,
  "repetition_type": "month",
  "repetition_value": 3,
  "historic": [
    {
      "type": "fulfilled",
      "description": "Descrição",
      "date": "2019-03-31T00:00:00-0300",
      "value": 123.45,
      "provider": "Michelin Obras"
    },
    {
      "type": "postponed",
      "description": "Descrição",
      "date": "2019-03-31T00:00:00-0300"
    }
  ],
  "files": [
    {
      "uuid": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5",
      "original_name": "file.jpg",
      "type": "image/jpeg",
      "size": 1
    }
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id_maintenance": {
      "type": "number",
      "description": "Identificador da manutenção"
    },
    "name": {
      "type": "string",
      "description": "Nome da manutenção"
    },
    "description": {
      "type": "string",
      "description": "Descrição da manutenção"
    },
    "next_maintenance": {
      "type": "string",
      "description": "Data de quando será a próxima manutenção"
    },
    "provider": {
      "type": "string",
      "description": "Nome do fornecedor padrão dessa manutenção"
    },
    "id_provider": {
      "type": "number",
      "description": "Identificador do fornecedor"
    },
    "id_portal": {
      "type": "number",
      "description": "Identificador do portal"
    },
    "active": {
      "type": "number",
      "description": "Ativo = 1 / Inativo = 0"
    },
    "repetition_type": {
      "type": "string",
      "description": "Tipo da mautenção (day, month, year)"
    },
    "repetition_value": {
      "type": "number",
      "description": "Irá repetir a cada"
    },
    "historic": {
      "type": "array",
      "items": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Indica o tipo da manutenção (fulfilled, postponed)"
            },
            "description": {
              "type": "string",
              "description": "Descrição da manutenção"
            },
            "date": {
              "type": "string",
              "description": "Data de quando foi realizada ou adiada a manutenção"
            },
            "value": {
              "type": "number",
              "description": "Valor da manutenção"
            },
            "provider": {
              "type": "string",
              "description": "Nome do fornecedor que realizou a manutenção"
            }
          }
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Indica o tipo da manutenção (fulfilled, postponed)"
            },
            "description": {
              "type": "string",
              "description": "Descrição da manutenção"
            },
            "date": {
              "type": "string",
              "description": "Data de quando foi realizada ou adiada a manutenção"
            }
          }
        }
      ],
      "description": "Histórico das manutenções (Pode ser dois tipos: fulfilled e postponed)"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "uuid": {
            "type": "string",
            "description": "Identificador do arquivo"
          },
          "original_name": {
            "type": "string",
            "description": "Nome do arquivo"
          },
          "type": {
            "type": "string",
            "description": "Tipo do arquivo"
          },
          "size": {
            "type": "number",
            "description": "Tamanho"
          }
        }
      },
      "description": "Arquivos da manutenção"
    }
  }
}

Alterar
PUT/maintenance/{id_maintenance}

Example URI

PUT https://api.winker.com.br/v1/maintenance/986
URI Parameters
HideShow
id_maintenance
number (required) Example: 986

Identificador da manutenção

Request
HideShow
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
  "name": "Extintores",
  "description": "Aqui vai a descrição",
  "next_maintenance": "2019-03-31T00:00:00-0300",
  "id_provider": 10,
  "active": 1,
  "repetition_type": "month",
  "repetition_value": 3,
  "files": [
    "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
  ]
}
Schema
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Nome da manutenção"
    },
    "description": {
      "type": "string",
      "description": "Descrição da manutenção"
    },
    "next_maintenance": {
      "type": "string",
      "description": "Data de quando será a próxima manutenção"
    },
    "id_provider": {
      "type": "number",
      "description": "Identificador do fornecedor"
    },
    "active": {
      "type": "number",
      "description": "Ativo = 1 / Inativo = 0"
    },
    "repetition_type": {
      "type": "string",
      "description": "Tipo da mautenção (day, month, year)"
    },
    "repetition_value": {
      "type": "number",
      "description": "Irá repetir a cada"
    },
    "files": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Arquivos da manutenção"
    }
  },
  "$schema": "http://json-schema.org/draft-04/schema#"
}
Response  201

Remover
DELETE/maintenance/{id_maintenance}

Example URI

DELETE https://api.winker.com.br/v1/maintenance/986
URI Parameters
HideShow
id_maintenance
number