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 loginPOST/auth/login
Example URI
Login
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"
}
}
}
200
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"
}
}
}
404
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 logoutPOST/auth/logout
Example URI
Logout
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
204
Recuperar Senha ¶
Recuperar senhaPOST/auth/recover-password
Example URI
Recuperar senha
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"
}
}
}
204
404
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 autenticadoGET/me
Example URI
Me
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
404
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íveisGET/application{?target}
Example URI
- target
string
(required) Example: portalAlvo do aplicativo (portal, provider, user)
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
}
}
}
500
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 aplicativoGET/application/{id_application}
Example URI
- id_application
string
(required) Example: 55de77Identificador do aplicativo
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
}
}
500
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 providersGET/application/provider
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: app_token
200
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"
}
}
}
500
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 providerGET/application/provider/{id_provider}
Example URI
- id_provider
number
(required) Example: 1Identificador do provider
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
}
}
500
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 aplicativoGET/application/permission-labels{?id_application}
Example URI
- id_application
string
(required) Example: 55de77Identificador do aplicativo
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
}
}
500
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 aplicativoPOST/application/install/{id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
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"
}
}
}
200
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"
}
}
}
500
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 finalizadaGET/application/configured
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
204
Headers
Content-Type: application/json
500
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 tokenGET/application/installed
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
200
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"
}
}
}
}
204
500
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 targetGET/application/install/{target}/{id}
Example URI
- target
string
(required) Example: portalTipo do aplicativo instalado (portal, provider, token, application)
- id
string
(required) Example: 9Identificador do target
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
200
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"
}
}
}
}
204
500
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 providerGET/application/install/provider/{id_provider}
Example URI
- id_provider
number
(required) Example: 9Identificador do provider
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
200
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"
}
}
}
}
204
500
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 eventosGET/application/event
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
200
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"
}
}
}
}
}
}
204
500
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çãoDELETE/application/install/{id_portal}/{id_application}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_application
number
(required) Example: 1Identificador do aplicativo
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
200
Headers
Content-Type: application/json
500
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 concluidaGET/application/uninstalled
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: appToken
204
Headers
Content-Type: application/json
500
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 portalGET/consumption/setup?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
}
}
500
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 documentosGET/document
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
500
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 documentoGET/document/{uuid}/download
Example URI
- uuid
number
(required) Example: 11122Identificador do documento
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Headers
Content-Type: application/json
500
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 frequentesGET/faq?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
}
}
500
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 visitaPOST/gatekeeper?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
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"
}
}
}
200
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"
}
}
}
500
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 visitasGET/gatekeeper(?id_portal={id_portal})
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
500
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
Upload de um arquivo
Headers
Accept: application/json
Authorization: JWT
Content-Disposition: form-data; name="fieldname"; filename="filename.jpg"
Content-Type: image/jpeg
201
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
Upload de um arquivo
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"
}
}
}
201
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"
}
}
}
Upload de arquivos em lote
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"
}
}
}
}
201
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"
}
}
}
}
207
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 mensagensPOST/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
- id_portal
number
(required) Example: 2057Identificador do portal
Criar uma mensagem
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"
}
}
}
201
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"
}
}
}
Criar mensagens em lote
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"
}
}
}
}
201
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"
}
}
}
}
207
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 mensagensGET/message/{box}/{status}?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador 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
Listar mensagens
Headers
Accept: application/json
Content-Type: application/json
200
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 caixasGET/message/boxes?id_message={id_message}
Example URI
- id_message
number
(required) Example: 1Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
}
207
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 mensagemGET/message/{id_message}
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Ver mensagem
Headers
Accept: application/json
Content-Type: application/json
200
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"
}
}
}
404
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 anexosGET/message/{id_message}/file
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Listar anexos
Headers
Accept: application/json
Content-Type: application/json
200
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 anexoGET/message/{id_message}/file/{file_id}
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
- file_id
number
(required) Example: 1Identificador do arquivo
Ver anexo
Headers
Accept: application/json
Content-Type: application/json
302
404
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 anexoDELETE/message/{id_message}/file/{file_id}
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
- file_id
number
(required) Example: 1Identificador do arquivo
Remover anexo
Headers
Accept: application/json
Content-Type: application/json
204
400
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 ¶
ResponderPOST/message/{id_message}/reply
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Responder uma mensagem
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"
}
}
}
201
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"
}
}
}
400
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 respostasGET/message/{id_message}/replies
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Listar respostas
Headers
Accept: application/json
Content-Type: application/json
200
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 seguidoresGET/message/{id_message}/followers
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Listar seguidores
Headers
Accept: application/json
Content-Type: application/json
200
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 mensagemPOST/message/{id_message}/toggle-star
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Favoritar uma mensagem
Headers
Accept: application/json
Content-Type: application/json
204
400
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 mensagemPOST/message/{id_message}/toggle-follow
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Seguir uma mensagem
Headers
Accept: application/json
Content-Type: application/json
204
400
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 mensagemPOST/message/{id_message}/toggle-close
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Fechar/abrir uma mensagem
Headers
Accept: application/json
Content-Type: application/json
204
400
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 mensagemGET/message/{id_message}/approve/{approve}
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
- approve
boolean
(required) Example: trueStatus da moderação
Moderar uma mensagem
Headers
Accept: application/json
Content-Type: application/json
204
400
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 mensagemPOST/message/{id_message}/snooze/{datetime}
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
- datetime
string
(required) Example: 2099-07-23 10:15:19Data do adiamento
Adiar uma mensagem
Headers
Accept: application/json
Content-Type: application/json
204
400
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 adiamentoDELETE/message/{id_message}/snooze
Example URI
- id_message
number
(required) Example: 1Identificador da mensagem
Remover adiamento
Headers
Accept: application/json
Content-Type: application/json
204
400
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 recursosGET/booking?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Listar recursos
Headers
Accept: application/json
Content-Type: application/json
200
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 recursosGET/booking/resourcebookings?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Listar recursos
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 reservasGET/booking/mybookings?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Listar reservas
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 convidadosGET/booking/listusers?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Listar reservas
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 reservaDELETE/booking/cancel?id_portal={id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Cancelar reserva
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Reserva um recurso ¶
Reserva recursoPOST/booking(?id_portal={id_portal})
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Listar reservas
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"
}
}
}
200
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 boletosGET/billing/{id_unidade}
Example URI
- id_unidade
number
(required) Example: 1Identificador da unidade
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
}
400
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 boletosGET/billing/{id_boleto}/download
Example URI
- id_boleto
number
(required) Example: 1Identificador do boleto
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Headers
Content-Type: application/json
400
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 todosGET/responsible
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 dadosGET/responsible/{id_user}
Example URI
- id_user
number
(required) Example: 2057Identificador do usuário
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 atividadesGET/provider/activities{?id_provider}
Example URI
- id_provider
number
(required) Example: 13Identificador do provider
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 applicationPOST/portal/application
Example URI
Criar um portal
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#"
}
201
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#"
}
404
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 portalPUT/portal/{id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
atualizar um portal
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#"
}
202
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#"
}
404
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 portalGET/portal/{id_portal}/about
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
}
}
}
}
}
404
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 documentoPOST/portal/{id_portal}/document
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Criar um documento
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#"
}
201
Listar documentos ¶
Listar documentosGET/portal/{id_portal}/document{?name}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- name
string
(optional) Example: BalancetesNome do Documento
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 anexoGET/portal/{id_portal}/document/{id_document}/download
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_document
number
(required) Example: 110Identificador do ocumento
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Remover documento ¶
Remover documentoDELETE/portal/{id_portal}/document/{id_document}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_document
number
(required) Example: 1Identificador do arquivo
Remover documento
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
204
400
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çãoGET/portal/{id_portal}/document/implantation
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
204
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#"
}
400
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 documentosGET/portal/{id_portal}/document-type?name={name}&active={active}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- name
string
(optional) Example: BalancetesNome do Tipo de Documento
- active
number
(optional) Example: [1: apenas os ativos | 0: apenas os inativos]Por padrão retornam todos
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 portalGET/portal/{id_portal}/config/{config}
Example URI
- id_portal
number
(required) Example: 2057Identificador 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
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
404
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 portalGET/portal/{id_portal}/provider
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
}
404
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 portalGET/portal/{id_portal}/application
Example URI
- id_portal
number
(optional) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: token
200
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"
}
}
}
}
500
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 planosGET/plan
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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ãoPOST/portal/{id_portal}/division
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Criar uma Divisão
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#"
}
201
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#"
}
404
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ãoPUT/portal/{id_portal}/division/{id_division}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_division
number
(required) Example: 1212Identificador do portal
Atualizar uma Divisão
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#"
}
202
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#"
}
404
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ãoDELETE/portal/{id_portal}/division/{id_division}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_division
number
(required) Example: 1212Identificador do portal
Atualizar uma Divisão
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
204
404
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õesGET/division{?id_portal,without_admin,with_units}
Example URI
- id_portal
number
(optional) Example: 2057Identificador do portal
- without_admin
boolean
(optional) Example: trueBusca somente divisões não administrativas
- with_units
boolean
(optional) Example: falseBusca detalhes das unidades
Com unidades
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
}
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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íveisGET/me/vehicle/type
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Headers
Content-Type: application/json
Listar configurações/Completar Cadastro do usuário ¶
Configurações/Completar do UsuárioGET/me/get-configuration
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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íveisGET/me/vehicle/color
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Headers
Content-Type: application/json
Adicionar veículo do usuário ¶
Adicionar veículoPOST/me/vehicle/add
Example URI
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"
}
200
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 petPOST/me/pet/add
Example URI
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"
}
200
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 portalPOST/me/change-portal
Example URI
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"
]
}
200
Headers
Content-Type: application/json
Body
[]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object"
}
Salvar dados do usuário ¶
Salvar DadosPOST/me/update
Example URI
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"
}
200
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
Upload de um arquivo
Headers
Accept: application/json
Authorization: JWT
Content-Disposition: form-data; name="fieldname"; filename="filename.jpg"
Content-Type: image/jpeg
201
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 ¶
AlterarPOST/me/password/{password}
Example URI
- password
string
(required) Example: 1111Nova senha
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
201
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 todosGET/otheruser
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 profilesGET/otheruser/profiles
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 ¶
RegistrarPOST/otheruser/add
Example URI
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Headers
Content-Type: application/json
Body
[]
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object"
}
Moradores ¶
Criar Morador ¶
Criar MoradorPOST/portal/{id_portal}/division/{id_division}/unit/{id_unit}/user_unit
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_division
number
(required) Example: 3057Identificador da divisao
- id_unit
number
(required) Example: 4057Identificador da unidade
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#"
}
201
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#"
}
404
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 ativosGET/user_unit/active?id_portal={id_portal}&full_profile={full_profile}=1
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- full_profile
number
(optional) Example: [1 | 0]Identificador do portal
Listar todos moradores do portal
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
204
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#"
}
404
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 inativosGET/user_unit/inactive?id_portal={id_portal}&full_profile={full_profile}=1
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- full_profile
number
(optional) Example: [1 | 0]Identificador do portal
Listar todos moradores do portal
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
204
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#"
}
404
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 detalhesGET/user_unit/{id_user}
Example URI
- id_user
number
(required) Example: 2057Identificador do usuario
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 moradorPOST/users/transfer
Example URI
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"
]
}
200
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 ¶
AtivarPOST/users/activate
Example URI
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"
]
}
204
Headers
Content-Type: application/json
Intivar morador ¶
InativaPOST/users/inactivate
Example URI
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"
]
}
200
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 UnidadePOST/portal/{id_portal}/division/{id_division}/Unit
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_division
number
(required) Example: 3030Identificador do Divsão
Criar uma Unidade
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#"
}
201
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#"
}
404
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 UnidadePUT/portal/{id_portal}/division/{id_division}/Unit/{id_unit}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_division
number
(required) Example: 3030Identificador do Divsão
- id_unit
number
(required) Example: 104332Identificador do Unit
Atualizar uma Unidade
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#"
}
202
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#"
}
404
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 UnidadeDELETE/portal/{id_portal}/division/{id_division}/Unit/{id_unit}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_division
number
(required) Example: 3030Identificador do Divsão
- id_unit
number
(required) Example: 104332Identificador do Unit
Remover uma Unidade
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
204
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#"
}
404
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 portalGET/v1/portal/{id_portal}/unit
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Listar todas Unidade por portal
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
204
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#"
}
404
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 contratosGET/provider-contract{?id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 contratoGET/provider-contract/{id_provider_contract}
Example URI
- id_provider_contract
number
(required) Example: 2057Identificador do contrato do fornecedor
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 anexoGET/provider-contract/document/{id_document}/download
Example URI
- id_document
number
(required) Example: 110Identificador do documento
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
Correspondências ¶
Listar os detalhes da correspondência ¶
Listar InformaçõesGET/package/info{?id_portal,id_package}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- id_package
number
(required) Example: 2057Identificador da correspondência
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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çõesPATCH/package/deliver{?id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
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"
]
}
200
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ênciasGET/package/delivered{?id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 entreguesGET/package/todeliver{?id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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âmerasGET/camera{?id_portal}
Example URI
- id_portal
number
(required) Example: 2Identificador do portal
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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âmeraGET/camera/read{?id_portal,id_camera}
Example URI
- id_portal
number
(required) Example: 2Identificador do portal
- id_camera
number
(required) Example: 1Identificador da câmera
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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âmeraGET/camera/start{?id_portal,id_camera}
Example URI
- id_portal
number
(required) Example: 2Identificador do portal
- id_camera
number
(required) Example: 1Identificador da câmera
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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çõesGET/maintenance{?id_portal,name}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
- name
string
(optional) Example: CaixaFiltra pelo nome da manutenção
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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 ¶
VisualizarGET/maintenance/{id_maintenance}
Example URI
- id_maintenance
number
(required) Example: 986Identificador da manutenção
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
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"
}
}
}
AlterarPUT/maintenance/{id_maintenance}
Example URI
- id_maintenance
number
(required) Example: 986Identificador da manutenção
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#"
}
201
RemoverDELETE/maintenance/{id_maintenance}
Example URI
- id_maintenance
number
(required) Example: 986Identificador da manutenção
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
201
Arquivo ¶
DownloadGET/maintenance/{id_maintenance}/{uuid}
Example URI
- id_maintenance
number
(required) Example: 986Identificador da manutenção
- uuid
string
(required) Example: dd90a09d-7fda-4a54-abad-640ea0fdd4f5Identificador do arquivo
Headers
Accept: application/json
Content-Type: application/json
Authorization: JWT
200
RemoverDELETE/maintenance/{id_maintenance}/{uuid}
Example URI
- id_maintenance
number
(required) Example: 986Identificador da manutenção
- uuid
string
(required) Example: dd90a09d-7fda-4a54-abad-640ea0fdd4f5Identificador do arquivo
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
201
Criar uma manutenção ¶
Criar uma manutençãoPOST/maintenance{?id_portal}
Example URI
- id_portal
number
(required) Example: 2057Identificador do portal
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#"
}
201
Adiar uma manutenção ¶
Adiar uma manutençãoPOST/maintenance/{id_maintenance}/postpone
Example URI
- id_maintenance
number
(required) Example: 986Identificador da manutenção
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
"date": "2019-03-31",
"description": "Descrição"
}
Schema
{
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Data para quando a manutenção deverá ser adiada"
},
"description": {
"type": "string",
"description": "Motivo do adiamento"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
201
Realizar uma manutenção ¶
Realizar uma manutençãoPOST/maintenance/{id_maintenance}/perform
Example URI
- id_maintenance
number
(required) Example: 986Identificador da manutenção
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
"date": "2019-03-31",
"description": "Descrição",
"id_provider": 167,
"value": 123.45
}
Schema
{
"type": "object",
"properties": {
"date": {
"type": "string",
"description": "Data de quando a manutenção foi realizada"
},
"description": {
"type": "string",
"description": "Descrição da manutenção"
},
"id_provider": {
"type": "number",
"description": "Identificador do fornecedor"
},
"value": {
"type": "number",
"description": "Valor da manutenção"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
201
Infra Estrutura ¶
Eventos ¶
Criar eventoPOST/worker/event
Example URI
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
"Event": {
"event": "Winker\\Event\\Auth\\Logged",
"data": [
"portal",
"division",
"unit"
]
}
}
Schema
{
"type": "object",
"properties": {
"Event": {
"type": "object",
"properties": {
"event": {
"type": "string",
"description": "nome do evento"
},
"data": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dados enviados"
}
},
"description": "Evento a ser criado"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/json
Body
{
"protocol": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Identificador do evento gerado"
}
}
}
Tracker ¶
Criar trackerPOST/tracker
Example URI
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
"Tracker": {
"event": "Winker\\Event\\Auth\\Logged",
"tracker": "[MixPanel,Pipz]",
"data": [
"portal",
"division",
"unit"
]
}
}
Schema
{
"type": "object",
"properties": {
"Tracker": {
"type": "object",
"properties": {
"event": {
"type": "string",
"description": "nome do evento"
},
"tracker": {
"type": "string",
"description": "nome do tracker"
},
"data": {
"type": "array",
"items": {
"type": "string"
},
"description": "Dados enviados"
}
},
"description": "Tracker a ser criado"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/json
Body
{
"protocol": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Identificador do evento gerado"
}
}
}
Criar campanha tracker ¶
Criar campanha trackerPOST/tracker/campaign
Example URI
Headers
Accept: application/json
Content-Type: multipart/form-data
Authorization: JWT
Body
{
"TrackerCampaign": {
"event": "Winker\\Event\\ProductLedGrowth\\Campaign",
"tracker": "[MixPanel]",
"data": [
"uuid",
"utm_source",
"utm_medium",
"utm_campaign",
"utm_content",
"utm_term"
]
}
}
Schema
{
"type": "object",
"properties": {
"TrackerCampaign": {
"type": "object",
"properties": {
"event": {
"type": "string",
"description": "nome do evento"
},
"tracker": {
"type": "string",
"description": "nome do tracker"
},
"data": {
"type": "array",
"items": {
"anyOf": [
{
"type": "string",
"description": "identificador"
},
{
"type": "string",
"description": "Origem da Campanha"
},
{
"type": "string",
"description": "Meio da Campanha"
},
{
"type": "string",
"description": "Nome da Campanha"
},
{
"type": "string",
"description": "Conteúdo da Campanha"
},
{
"type": "string",
"description": "Termo da Campanha"
}
]
},
"description": "Dados enviados"
}
},
"description": "Tracker a ser criado"
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}
200
Headers
Content-Type: application/json
Body
{
"protocol": "dd90a09d-7fda-4a54-abad-640ea0fdd4f5"
}
Schema
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"protocol": {
"type": "string",
"description": "Identificador do evento gerado"
}
}
}