Documetação OQ Digital

Documentação listando nossos endPoints versão 2.0


Dados técnicos

  • O que é: Documetação OQ Digital
  • Versão: v 2.0

Esta é a documentação da nossa API. Estamos em constante evolução, portanto, é fundamental que acompanhem as atualizações constantemente.

API RESTful

Nossa API foi organizada em cima da arquitetura RESTful, contendo no body de cada requisição os objetos no formato JSON.

Introdução

Domínio base

Nossa API contém os seguintes domínios bases:

Homologação: https://us-central1-oqhomapi.cloudfunctions.net/v2/

Produção: https://us-central1-oq20-139d9.cloudfunctions.net/v2/

Token de Acesso

A API da OQ Digital exige um token do tipo Bearer, cujo mesmo deve ser repassado em todas as requisições. Ver no menu "Auth" deste manual as orientações necessárias de como obter seu token.

Respostas da API

Um JSON será retornado em todas as respostas da API, incluindo casos de erro (código, sucesso(sim/não) e mensagem).

ValidationCode

O "validationCode" é um item da resposta à solicitação de criação de um Lead via API. Ela deve ser usada em todas as requisições update e delete de um Lead.

Auth

Nesta sessão iremos apresentar a forma de adquirir as chaves de acesso (token) à nossa api,
necessário para a utilização em todas as chamadas.

POST - Autenticação - Gerando um token de acesso

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/signIn
                            

Este endpoint é responsável por gerar um token de acesso que precisará ser passado em todos os cabeçalhos das requisições do tipo "Bearer". O token é o "accessToken", retornado na resposta da chamada API

Request

BODY

                               {
                                   "username": "email@email.com",
                                   "password":"password"
                               }
                            
Response

BODY

                               {
                                   "code": 200,
                                   "success": true,
                                   "message": "Auth OK",
                                   "data": {
                                     "refreshToken": "AE0u-NfOKyeuFdNrgQ1BdsxeJuujjf-z8LnDhuZDSzGa92mgNIgNBhaO3zkB9WnI4QDIE2zVEknaTTiQEuSyUj4AM2Crb_k5i1gHPzFcRtyvRvOFw6tcG_6lYVOFCSpikbEhB-rDi8psTlQM0FpljB3a-nNJlf3BzGowDvzgdzw2VNVsFpWGqNx3dMbl-AqX_bEtKWTkTzou",
                                     "accessToken": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc2MjNlMTBhMDQ1MTQwZjFjZmQ0YmUwNDY2Y2Y4MDM1MmI1OWY4MWUiLCJ0eXAiOiJKV1QifQ.eyJuYW1lIjoiRnVsYW5vIiwiaXNzIjoiaHR0cHM6Ly9zZWN1cmV0b2tlbi5nb29nbGUuY29tL29xaG9tYXBpIiwiYXVkIjoib3Fob21hcGkiLCJhdXRoX3RpbWUiOjE1OTQxMzE1MzQsInVzZXJfaWQiOiJIQ1hqQkNMU2k3VDQwemNWNWp6SVVsQ2dhdjAyIiwic3ViIjoiSENYakJDTFNpN1Q0MHpjVjVqeklVbENnYXYwMiIsImlhdCI6MTU5NDEzMTUzNCwiZXhwIjoxNTk0MTM1MTM0LCJlbWFpbCI6ImFkbWluQGhwLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJlbWFpbCI6WyJhZG1pbkBocC5jb20iXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwYXNzd29yZCJ9fQ.CLA5GMP_FQRmaNpfzfV_L2HJL28OVasn3xY95I8C1L9AbzBM-NTdgxim9w0-1Rq-HIDRY-uj57oLzXi3Jy1ViFKYuHGVPSQcJquRr6hECK_wwUWWyoToZuzpZu0WaLamW2PN0c0TOGK3lM53RLDk4NsQQ40Qn3l7uN2OkPIheubLQiL8M49-77vRK8ZvB4Ptkz3OWlbiGdt_vo374kUOhiuEFSU-dl5ioZjnK-IUyhMZfX5JZjDvu0Dnl9BF9qi6kEhm3dmgHbmeVoFr8vDeNbCgimRo3sTfYYMY_Nz_o1Cu8argu3iLo5CLTfW7TmvK5bAD3Inyvd1KJUPbVzk86Q",
                                     "expirationTime": 1594135134217
                                   }
                               }
                            

POST - Refresh Token

                                    https://us-central1-oqhomapi.cloudfunctions.net/v2/refreshToken
                                

Em algum momento, seu Token pode expirar. Para gerar um novo sem a necessidade de uma nova autenticação, disponibilizamos este endpoint a fim de que você envie como parâmetro o "refreshToken" obtido na autenticação. Se ele estiver correto, a API vai retornar um novo token válido com a nomenclatura "accessToken" e um novo "refreshToken" para ser usado posteriormente.

Request

BODY

                                        {
                                          "refresh_token": "AE0u-Nfda3PJsO7_VPDNts5sntRiYWFHVAccXF93GWJYJ-sfqD644b_wjLnSc-v-E6YQbb0kKJ7TRJGotveTTagw8iekqH8YHfGHznwZQljWHMc5L4HS8wZkRYkvun1ibgkoCCSX8oCsHQNfqaEFOQU-nMsLFbHpS1Vmzj9biOKnDajP7k3q21eeErDxy0lNIveM9jEbBBtD"
                                        }
                                    
Response

BODY

                                    {
                                        "code": 200,
                                        "success": true,
                                        "message": "Refresh Token",
                                        "data": {
                                          "access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc2MjNlMTBhMDQ1MTQwZjFjZmQ0YmUwNDY2Y2Y4MDM1MmI1OWY4MWUiLCJ0eXAiOiJKV1QifQ.eyJuYW1lIjoiRnVsYW5vIiwiaXNzIjoiaHR0cHM6Ly9zZWN1cmV0b2tlbi5nb29nbGUuY29tL29xaG9tYXBpIiwiYXVkIjoib3Fob21hcGkiLCJhdXRoX3RpbWUiOjE1OTIzOTc4NTEsInVzZXJfaWQiOiJIQ1hqQkNMU2k3VDQwemNWNWp6SVVsQ2dhdjAyIiwic3ViIjoiSENYakJDTFNpN1Q0MHpjVjVqeklVbENnYXYwMiIsImlhdCI6MTU5NDEzMTc1MCwiZXhwIjoxNTk0MTM1MzUwLCJlbWFpbCI6ImFkbWluQGhwLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJlbWFpbCI6WyJhZG1pbkBocC5jb20iXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwYXNzd29yZCJ9fQ.E1Cs8LV1-IFKgoAZXZP1fHc-l2CiftR7IjXDsg0uPDWxR9kXH24y8AYj2kRS-mX9CtpaSwtu1cb4L97rbUbrxym7tAU6vQ9HNGHvoC7PmDjfhuHwNFSKNpVK7ErviZt5bhluCss1R6kmOUEMyMIfwdT5f9RiT8gRuTZDPGwkYRxIbQLBioQ5SzOCryCSZIgKAKRtnYOB3ypS3gWj-njqHR7DNIWogcB6qFxzuMex-wUdzqSjIFzeW9vllrxS-Hb5jXU3KdmfwAmr0i_QFrvw108v2YYWagacU57PZuk-KxFIhh7jybyqDU9rrY8M5GGNMaI6zSZpjKd1xjpNU6mscQ",
                                          "expires_in": "3600",
                                          "token_type": "Bearer",
                                          "refresh_token": "AE0u-NfvBaKOHixC_DNU8v2a0ExrV780WOao-LLGMpb-R3buc38SLI-BmRYOT30Wva2jDuGrLwh8ySsdt-p6I3fm_on2r2h9qVoMLI4ZwnAZZ9q9f41VtRM4k0nA6bFfzU23wIEoMSrYMTsrGgu7uRfMDL31wmnRNzOo2v8VsnKAYHSLXBzmNzuZ6uGKyRvQC7DPPAZCnOCh",
                                          "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Ijc2MjNlMTBhMDQ1MTQwZjFjZmQ0YmUwNDY2Y2Y4MDM1MmI1OWY4MWUiLCJ0eXAiOiJKV1QifQ.eyJuYW1lIjoiRnVsYW5vIiwiaXNzIjoiaHR0cHM6Ly9zZWN1cmV0b2tlbi5nb29nbGUuY29tL29xaG9tYXBpIiwiYXVkIjoib3Fob21hcGkiLCJhdXRoX3RpbWUiOjE1OTIzOTc4NTEsInVzZXJfaWQiOiJIQ1hqQkNMU2k3VDQwemNWNWp6SVVsQ2dhdjAyIiwic3ViIjoiSENYakJDTFNpN1Q0MHpjVjVqeklVbENnYXYwMiIsImlhdCI6MTU5NDEzMTc1MCwiZXhwIjoxNTk0MTM1MzUwLCJlbWFpbCI6ImFkbWluQGhwLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJlbWFpbCI6WyJhZG1pbkBocC5jb20iXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwYXNzd29yZCJ9fQ.E1Cs8LV1-IFKgoAZXZP1fHc-l2CiftR7IjXDsg0uPDWxR9kXH24y8AYj2kRS-mX9CtpaSwtu1cb4L97rbUbrxym7tAU6vQ9HNGHvoC7PmDjfhuHwNFSKNpVK7ErviZt5bhluCss1R6kmOUEMyMIfwdT5f9RiT8gRuTZDPGwkYRxIbQLBioQ5SzOCryCSZIgKAKRtnYOB3ypS3gWj-njqHR7DNIWogcB6qFxzuMex-wUdzqSjIFzeW9vllrxS-Hb5jXU3KdmfwAmr0i_QFrvw108v2YYWagacU57PZuk-KxFIhh7jybyqDU9rrY8M5GGNMaI6zSZpjKd1xjpNU6mscQ",
                                          "user_id": "HCXjBCLSi7T40zcV5jzIUlCgav02",
                                          "project_id": "565668799670"
                                        }
                                      }
                                

Leads

A seguir os endpoints para manipulação de leads.

POST - Create Lead - with validationCode

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/create
                             

Este endpoint é o responsável por gerar um token de acesso, cujo mesmo é necessário ser passado em todos os cabeçalhos das requisições do tipo "Bearer". O token é o "accessToken", retornado na resposta da chamada API.

Request

BODY

                                {
                                    "validationCode":"VALIDATIONCODE",
                                    "lead":{
                                        "name": "Nome completo",
                                        "phone":"(99) 99999-9999",
                                        "email": "email@email.com",
                                        "cpf":"111.111.111-11",
                                        "state":"UF",
                                        "city":"Cidade",
                                        "acceptedTerms": true,
                                        "converted": false
                                    }
                                }
                             
Response

BODY

                                {
                                    "code": 200,
                                    "message": "Cadastro concluido com sucesso!",
                                    "success": true,
                                    "validationCode": "xxxxxxxxxxxx"
                                  }
                             

POST - Create Lead - with player + actionId

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/create
                             

Este endpoint permite criação de um novo Lead, passando como parâmetro os dados de "player" (email) e "actionId" (deve pegar o ID da ação dentro da plataforma web).

Request

BODY

                                {
                                    "search": {
                                        "player":"email@email.com",
                                        "actionId":"ACTION_ID"
                                    },
                                    "lead":{
                                        "name": "Nome completo",
                                        "phone":"(99) 99999-9999",
                                        "email": "email@email.com",
                                        "cpf":"111.111.111-11",
                                        "state":"UF",
                                        "city":"Cidade",
                                        "acceptedTerms": true,
                                        "converted": false
                                    }
                                }
                             
Response

BODY

                                {
                                    "code": 200,
                                    "message": "Cadastro concluido com sucesso!",
                                    "success": true,
                                    "validationCode": "xxxxxxxxxxxx"
                                }
                             

POST - Update Status Lead

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/update
                             

Este endpoint permite fazer a atualização do status de um determinado lead, baseado nos "STEPS" configurados na aplicação, e também o CANCELAMENTO do lead. Entenda como STEPS os possíveis status em que um LEAD pode estar, e esta configuração depende da configuração feita na sua plataforma. Exemplo:

  1. Cadastro Efetuado
  2. Contato realizado
  3. Lead convertido
Ou seja, neste exemplo, uma pessoa que acabou de se cadastrar dentro de uma ação, ele recebe o status "0". Quando for feito um contato com o lead, você fará uma chamada para este endpoint, passando "1" no campo status para que haja mudança do STEP para este lead. A opção de canceled é opcional, podendo ser enviada se o lead for cancelar ou se quiser desfazer o cancelamento desse lead.

Request

BODY

                                {
                                    "validationCode":"VALIDATIONCODE",
                                    "search": {
                                        "email": "email@email.com"
                                    },
                                    "lead":{
                                        "status":3,
                                        "canceled": true
                                    }
                                }
                             
Response

BODY

                                {
                                    "code": 200,
                                    "message": "Lead atualizado com sucesso..",
                                    "success": true,
                                    "data": {
                                      "name": "NOME COMPLEETO",
                                      "email": "email@email.com",
                                      "status": 3,
                                      "canceled": true
                                    }
                                  }
                             

Outra forma de atualizar o status do lead quando não se tem o validationCode é utilizando o playerId e actionId que tem no lead. A forma de atualização é a mesma, o endpoint continua o mesmo também.

Request

BODY

                              {
                                  "playerData":{
                                    "actionId": "ID DA ACTION DO LEAD",
                                    "playerId": "ID DO PLAYER DO LEAD"
                                  }
                                  "search": {
                                      "email": "email@email.com"
                                  },
                                  "lead":{
                                      "status":3,
                                      "canceled": false
                                  }
                              }
                           
Response

BODY

                              {
                                  "code": 200,
                                  "message": "Lead atualizado com sucesso..",
                                  "success": true,
                                  "data": {
                                    "name": "NOME COMPLEETO",
                                    "email": "email@email.com",
                                    "status": 3,
                                    "canceled": false
                                  }
                                }
                           

POST - Update Status and Value Lead

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/updateStatusLead
                             

Este endpoint permite fazer a atualização do status de um determinado lead, baseado nos "STEPS" configurados na aplicação. Além dos steps, esse endpoint também libera pontuação para o player, de acordo com o que for passado no campo "value".

Request

BODY

                                {
                                    "validationCode":"VALIDATIONCODE",
                                    "search": {
                                        "email": "email@email.com"
                                    },
                                    "lead":{
                                        "status":3,
                                        "value": 25
                                    }
                                }
                             
Response

BODY

                                {
                                    "code": 200,
                                    "message": "Lead atualizado com sucesso..",
                                    "success": true,
                                    "data": {
                                      "name": "NOME COMPLEETO",
                                      "email": "email@email.com",
                                      "status": 3,
                                      "value": 25
                                    }
                                  }
                             

POST - List number leads per Action

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/leadsInAction
                             

Este endpoint permite fazer listagem de todos os leads em uma determinada action.

Request

BODY

                                {
                                    "validationCode":"VALIDATIONCODE",
                                    "search": {
                                        "email": "email@email.com"
                                    },
                                    "lead":{
                                        "status":3,
                                        "value": 25
                                    }
                                }
                            
Response

BODY

                                {
                                    "code": 200,
                                    "message": "Lead atualizado com sucesso..",
                                    "success": true,
                                    "data": {
                                      "name": "NOME COMPLEETO",
                                      "email": "email@email.com",
                                      "status": 3,
                                      "value": 25
                                    }
                                  }
                             

POST - List player leads

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/leadsInAction
                             

Este endpoint permite fazer listagem de todos os leads de um player.

Request

BODY

                                {
                                    "search":{
                                      "email": "email@email"
                                    }
                                  }
                            
Response

BODY

                                {
                                    "code": 200,
                                    "success": true,
                                    "message": "Leads encontrado com sucesso",
                                    "data": {
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "Teste "
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Brasiléia",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.00-00",
                                        "createdAt": 1601057329430,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste alexia",
                                        "phone": "(45) 64654-6546",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-MI5ZDBAfIsDnDT0Gmpl": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "Teste "
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Brasiléia",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601059209664,
                                        "email": "email@email",
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste alexia 2",
                                        "phone": "(45) 64654-6555",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Anagé",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601469228651,
                                        "email": "email@email,
                                        "formCompleted": true,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Rafael ",
                                        "phone": "(71) 97894-6543",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "BA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Santa Rosa do Purus",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602795613262,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "alexia",
                                        "phone": "(65) 46513-2132",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Antônio Olinto",
                                        "clientId": "xxxxxxxxxxxxxxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602795871933,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "tewt",
                                        "phone": "(54) 32345-2345",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "PR",
                                        "status": 3,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Antônio Olinto",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602795958014,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "tewt",
                                        "phone": "(54) 32342-3452",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "PR",
                                        "status": 3,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Salvador",
                                        "clientId": "xxxxxxxxxxxxxxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1603317598490,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Ian ",
                                        "phone": "(75) 99999-9999",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "BA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": false,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "xxxxxxxxxxxx",
                                        "city": "Barra do Corda",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1603735760195,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Testandonome",
                                        "phone": "(12) 345-6789",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "MA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": false,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "xxxxxxxxxxxx",
                                        "city": "Anchieta",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1603736221662,
                                        "email": "",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "",
                                        "phone": "",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "ES",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      }
                                    }
                                  }
                             

POST - List leads action

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/getLeadsAction
                             

Este endpoint permite fazer listagem de todos os leads em uma determinada action.

Request

BODY

                                {    
                                    "search":{
                                        "actionId": "id da ação"
                                    }
                                }
                            
Response

BODY

                                {
                                    "code": 200,
                                    "success": true,
                                    "message": "Leads Encontradas",
                                    "data": {
                                      "-xxxxxxxxxxxx: {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Rodrigues Alves",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601918602038,
                                        "email": "email@email",
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "zdsa",
                                        "phone": "(65) 46546-5465",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Rodrigues Alves",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601919668050,
                                        "email": "email@email",
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "zdsa",
                                        "phone": "(65) 46546-5455",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Rodrigues Alves",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601919864942,
                                        "email": "email@email",
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "zdsa",
                                        "phone": "(65) 46546-5454",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Alto Paraíso de Goiás",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602099263787,
                                        "email": "email@email",
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste",
                                        "phone": "(02) 03213-0036",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "GO",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Capixaba",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602421327228,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste lead",
                                        "phone": "(65) 79879-6584",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Capixaba",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602421842294,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste leadf",
                                        "phone": "(65) 79879-6576",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Capixaba",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602422228826,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste leadf",
                                        "phone": "(65) 79829-6567",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxxe5",
                                        "city": "Salvador",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1603317598490,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Ian ",
                                        "phone": "(75) 99999-9998",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "BA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": false,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Barra do Corda",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1603735760195,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Testandonome",
                                        "phone": "(12) 345-6789",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "MA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": false,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Anchieta",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "",
                                        "createdAt": 1603736221662,
                                        "email": "",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "",
                                        "phone": "",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "ES",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      }
                                    }
                                  }
                                  
                             

GET - List number leads per state

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/leads/getLeadsPerState
                             

Este endpoint permite fazer listagem de todos os leads em uma publicação.

Request

BODY

                                {    
                                    "search":{
                                        "actionId": "id da ação"
                                    }
                                }
                            
Response

BODY

                                {
                                    "code": 200,
                                    "success": true,
                                    "message": "Leads encontradas",
                                    "data": [
                                      {
                                        "id": "SC",
                                        "label": "SC",
                                        "value": 1
                                      },
                                      {
                                        "id": "CE",
                                        "label": "CE",
                                        "value": 1
                                      },
                                      {
                                        "id": "MG",
                                        "label": "MG",
                                        "value": 1
                                      },
                                      {
                                        "id": "AC",
                                        "label": "AC",
                                        "value": 28
                                      },
                                      {
                                        "id": "MA",
                                        "label": "MA",
                                        "value": 2
                                      },
                                      {
                                        "id": "AM",
                                        "label": "AM",
                                        "value": 7
                                      },
                                      {
                                        "id": "AL",
                                        "label": "AL",
                                        "value": 2
                                      },
                                      {
                                        "id": "PB",
                                        "label": "PB",
                                        "value": 28
                                      },
                                      {
                                        "id": "BA",
                                        "label": "BA",
                                        "value": 39
                                      },
                                      {
                                        "id": "PE",
                                        "label": "PE",
                                        "value": 1
                                      },
                                      {
                                        "id": "PI",
                                        "label": "PI",
                                        "value": 2
                                      },
                                      {
                                        "id": "AP",
                                        "label": "AP",
                                        "value": 4
                                      },
                                      {
                                        "id": "GO",
                                        "label": "GO",
                                        "value": 1
                                      },
                                      {
                                        "id": "PR",
                                        "label": "PR",
                                        "value": 2
                                      },
                                      {
                                        "id": "ES",
                                        "label": "ES",
                                        "value": 1
                                      }
                                    ]
                                  }
                             

POST - Lead data

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/getLead
                             

Este endpoint permite ler os dados de um lead.

Request

BODY

                                {    
                                    "search":{
                                        "email": "email@email"
                                    },
                                    "validationCode": "VALIDATIONCODE"
                                }
                            
Response

BODY

                                {
                                    "code": 200,
                                    "success": true,
                                    "message": "Lead encontrado",
                                    "date": {
                                      "acceptedTerms": true,
                                      "action": {
                                        "actionTitle": "Ação escolhida"
                                      },
                                      "actionId": "-xxxxxxxxxxxx",
                                      "city": "Salvador",
                                      "clientId": "xxxxxxxxxxxx",
                                      "converted": false,
                                      "cpf": "000.000.000-00",
                                      "createdAt": 1603317598490,
                                      "email": "email@email",
                                      "formCompleted": false,
                                      "isVerified": false,
                                      "leadToken": "xxxxxxxxxxxx",
                                      "name": "Ian ",
                                      "phone": "(75) 99999-9998",
                                      "playerId": "xxxxxxxxxxxx",
                                      "state": "BA",
                                      "status": 0,
                                      "statusConvertedWebhook": true,
                                      "uid": "xxxxxxxxxxxx"
                                    }
                                  }
                             

GET - List client leads

                                https://us-central1-oqhomapi.cloudfunctions.net/v2/leadsInAction
                             

Este endpoint permite ler os dados de um lead.

Request

BODY

                                {
                                    "search":{
                                      "email": "email@email
                                    }
                                  }
                            
Response

BODY

                                {
                                    "code": 200,
                                    "success": true,
                                    "message": "Leads encontrado com sucesso",
                                    "data": {
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "Teste "
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Brasiléia",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601057329430,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste alexia",
                                        "phone": "(45) 64654-6546",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "Teste "
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Brasiléia",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601059209664,
                                        "email": "email@email",
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "teste alexia 2",
                                        "phone": "(45) 64654-6555",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Anagé",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1601469228651,
                                        "email": "email@email",
                                        "formCompleted": true,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Rafael ",
                                        "phone": "(71) 97897-3789",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "BA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Santa Rosa do Purus",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602795613262,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "alexia",
                                        "phone": "(65) 46513-2132",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "AC",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Antônio Olinto",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602795871933,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "tewt",
                                        "phone": "(54) 32345-2345",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "PR",
                                        "status": 3,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "teste"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Antônio Olinto",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": true,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1602795958014,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "tewt",
                                        "phone": "(54) 32342-3452",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "PR",
                                        "status": 3,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": true,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Salvador",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.171-00",
                                        "createdAt": 1603317598490,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Ian ",
                                        "phone": "(75) 99999-9999",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "BA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": false,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Barra do Corda",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "000.000.000-00",
                                        "createdAt": 1603735760195,
                                        "email": "email@email",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "Testandonome",
                                        "phone": "(12) 345-6789",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "MA",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      },
                                      "-xxxxxxxxxxxx": {
                                        "acceptedTerms": false,
                                        "action": {
                                          "actionTitle": "nome da ação"
                                        },
                                        "actionId": "-xxxxxxxxxxxx",
                                        "city": "Anchieta",
                                        "clientId": "xxxxxxxxxxxx",
                                        "converted": false,
                                        "cpf": "",
                                        "createdAt": 1603736221662,
                                        "email": "",
                                        "formCompleted": false,
                                        "isVerified": false,
                                        "leadToken": "xxxxxxxxxxxx",
                                        "name": "",
                                        "phone": "",
                                        "playerId": "xxxxxxxxxxxx",
                                        "state": "ES",
                                        "status": 0,
                                        "statusConvertedWebhook": true,
                                        "uid": "-xxxxxxxxxxxx"
                                      }
                                    }
                                  }
                             

PUT - Update lead

                            https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/update
                           

Este endpoint permite fazer a atualização dos dados de um lead.

Request

BODY

                            {
                              "validationCode": "VALIDATIONCODE",
                              "search": {
                                "email": "email@email"
                              },
                              
                              "lead": {
                                "name": "Ian ",
                                "phone": "(75) 99999-9998",
                                "email": "email@email",
                                "cpf": "000.000.000-00",
                                "state": "BA",
                                "city": "Salvador",
                                "acceptedTerms": true,
                                "converted": false
                              }
                            }
                          
Response

BODY

                            {
                              "code": 200,
                              "success": true,
                              "message": "Lead atualizado com sucesso",
                              "data": {
                                "acceptedTerms": true,
                                "action": {
                                  "actionTitle": "Ação escolhida"
                                },
                                "actionId": "-xxxxxxxxxxxx",
                                "city": "Salvador",
                                "clientId": "xxxxxxxxxxxx",
                                "converted": false,
                                "cpf": "000.000.000-00",
                                "createdAt": 1603317598490,
                                "email": "email@email",
                                "formCompleted": false,
                                "isVerified": false,
                                "leadToken": "xxxxxxxxxxxx",
                                "name": "Ian ",
                                "phone": "(75) 99999-9998",
                                "playerId": "xxxxxxxxxxxx",
                                "state": "BA",
                                "status": 0,
                                "statusConvertedWebhook": true,
                                "uid": "-xxxxxxxxxxxx"
                              }
                            }
                           

DEL - Delete lead

                          https://us-central1-oqhomapi.cloudfunctions.net/v2/lead/delete
                         

Este endpoint permite deletar um lead.

Request

BODY

                          {
                            "search": {
                              "cpf": "000.000.000-00"
                            }
                            "validationCode":"VALIDATIONCODE",
                        
Response

BODY

                          {
                            "code": 200,
                            "success": true,
                            "message": "Lead Excluido"
                          }

                         

Player

A seguir os endpoints para manipulação de players.

POST - Create Player

                            https://us-central1-oqhomapi.cloudfunctions.net/v2/player/create
                          

Este endpoint permite criação de um lovo player.

Request

BODY

                            {
                              "player": {
                                "name": "Nome Completo",
                                "email": "email@email.com",
                                "cpf":"000.000.000-00",
                                "password":"123456",
                                "confirmPassword":"123456"
                              }
                            }
                          
Response

BODY

                            {
                              "code": 200,
                              "success": true,
                              "message": "Conta criada com sucesso!",
                              "data": {
                                "name": "NOME COMPLETO",
                                "email": "email@email.com",
                                "cpf": "000.000.000-00",
                                "clientId": "xxxxxxxxxxxx",
                                "uid": "xxxxxxxxxxxx",
                                "emailVerified": false,
                                "createdAt": 1594750012519,
                                "active": true
                              }
                            }
                           

POST - Update Player

                          https://us-central1-oqhomapi.cloudfunctions.net/v2/player/update
                        

Este endpoint permite a alteração dos dados de um player.

Request

BODY

                          {	
                            "search":{
                              "cpf": "000.000.000-00"
                            },
                            "player":{
                              "name": "Alexia ",
                              "phoneNumber": "3799781241",
                              "city": "Belo Horizonte",
                              "state": "MG",
                              "cpf": "000.000.000-00"
                            }
                          }
                        
Response

BODY

                          {
                            "code": 200,
                            "message": "Atualização concluida com sucesso!",
                            "success": true,
                            "data": {
                              "AccountData": {
                                "agency": "4444",
                                "bank": "237",
                                "conta": "44444444",
                                "cpf": "000.000.000-00",
                                "name": "Alexia ",
                                "numberPis": "56458574987987"
                              },
                              "acceptedTerms": true,
                              "actions": [
                                "-xxxxxxxxxxxx",
                                "-xxxxxxxxxxxx",
                                "-xxxxxxxxxxxx",
                                "-xxxxxxxxxxxx",
                                "-xxxxxxxxxxxx",
                                "-xxxxxxxxxxxx"
                              ],
                              "actionsCount": 6,
                              "actionsEngaged": {
                                "-xxxxxxxxxxxx": {
                                  "actionShares": 2
                                },
                                "-xxxxxxxxxxxx": {
                                  "actionShares": 14
                                },
                                "-xxxxxxxxxxxx": {
                                  "actionShares": 1
                                },
                                "-xxxxxxxxxxxx": {
                                  "actionShares": 3
                                }
                              },
                              "active": true,
                              "birthDate": "1997-05-12",
                              "city": "Belo Horizonte",
                              "clientId": "xxxxxxxxxxxx",
                              "clientName": "testesemgame",
                              "confirmEmail": "email@email",
                              "cpf": "000.000.000-00",
                              "createdAt": 1601057023889,
                              "deliverAddress": {
                                "cep": "",
                                "city": "",
                                "complement": "",
                                "neighborhood": "",
                                "number": "",
                                "state": "",
                                "street": ""
                              },
                              "email": "email@email",
                              "emailVerified": false,
                              "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxx",
                              "leads": 7,
                              "name": "Alexia ",
                              "phoneNumber": "37999551241",
                              "photoURL": "link para foto",
                              "points": {
                                "extraPoints": 11000,
                                "salesConversion": 0
                              },
                              "redeemedPoints": 100,
                              "regional": "apartamento",
                              "registerCompleted": true,
                              "state": "RS",
                              "topics": {
                                "xxxxxxxxxxxx": {
                                  "fcmToken": "xxxxxxxxxxxx",
                                  "subDate": 1603377256837,
                                  "topic": "xxxxxxxxxxxx"
                                },
                              
                         

POST - List players action

                        https://us-central1-oqhomapi.cloudfunctions.net/v2/player/getPlayersAction
                      

Este endpoint permite fazer listagem de todos os players em uma publicação.

Request

BODY

                        {    
                          "search":{
                              "actionId": "id da ação"
                          }
                      }
                      
Response

BODY

                        {
                          "code": 200,
                          "success": true,
                          "data": [
                            {
                              "xxxxxxxxxxxx": {
                                "acceptedTerms": true,
                                "actions": [
                                  "-xxxxxxxxxxxx"
                                ],
                                "actionsCount": 0,
                                "active": true,
                                "birthDate": "1997-05-12",
                                "city": "Barreiros",
                                "clientId": "xxxxxxxxxxxx",
                                "clientName": "testesemgame",
                                "confirmEmail": "email@email",
                                "cpf": "000.000.000-00",
                                "createdAt": 1601903189345,
                                "email": "email@email",
                                "emailVerified": false,
                                "fcmToken": "xxxxxxxxxxxx",
                                "leads": 0,
                                "name": "teste",
                                "phoneNumber": "(65) 46879-8798",
                                "photoURL": "link para foto",
                                "regional": "apartamento",
                                "registerCompleted": true,
                                "state": "PE",
                                "topics": {
                                  "NATIONAL_BR_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1601903232034,
                                    "topic": "NATIONAL_BR_xxxxxxxxxxxx"
                                  },
                                  "REGIONAL_APARTAMENTO_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1601903232085,
                                    "topic": "REGIONAL_APARTAMENTO_xxxxxxxxxxxx"
                                  },
                                  "STATE_PE_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1601903231984,
                                    "topic": "xxxxxxxxxxxx"
                                  }
                                },
                                "totalPoints": 0,
                                "uid": "xxxxxxxxxxxx"
                              }
                            },
                            {
                              "xxxxxxxxxxxx": {
                                "acceptedTerms": true,
                                "actions": [
                                  "-xxxxxxxxxxxx"
                                ],
                                "actionsCount": 0,
                                "actionsEngaged": {
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 1
                                  }
                                },
                                "active": true,
                                "birthDate": "1997-05-12",
                                "city": "Baía Formosa",
                                "clientId": "xxxxxxxxxxxx",
                                "clientName": "testesemgame",
                                "confirmEmail": "email@email",
                                "cpf": "000.000.000-00",
                                "createdAt": 1601918416963,
                                "email": "email@email",
                                "emailVerified": false,
                                "fcmToken": "xxxxxxxxxxxx",
                                "leads": 0,
                                "name": "alexia",
                                "phoneNumber": "(56) 46987-9879",
                                "photoURL": "link para foto",
                                "regional": "apartamento",
                                "registerCompleted": true,
                                "state": "RN",
                                "topics": {
                                  "NATIONAL_BR_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1601918461282,
                                    "topic": "NATIONAL_BR_xxxxxxxxxxxx"
                                  },
                                  "REGIONAL_APARTAMENTO_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1601918460921,
                                    "topic": "REGIONAL_APARTAMENTO_xxxxxxxxxxxx"
                                  },
                                  "STATE_RN_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1601918460915,
                                    "topic": "STATE_RN_xxxxxxxxxxxx"
                                  }
                                },
                                "totalPoints": 0,
                                "uid": "xxxxxxxxxxxx"
                              }
                            },
                            {
                              "xxxxxxxxxxxx": {
                                "AccountData": {
                                  "agency": "4444",
                                  "bank": "237",
                                  "conta": "44444444",
                                  "cpf": "000.000.000-00",
                                  "name": "Alexia ",
                                  "numberPis": "56458574987987"
                                },
                                "acceptedTerms": true,
                                "actions": [
                                  "-xxxxxxxxxxxx",
                                  "-xxxxxxxxxxxx",
                                  "-xxxxxxxxxxxx",
                                  "-xxxxxxxxxxxx-xxxxxxxxxxxx",
                                  "-xxxxxxxxxxxx",
                                  "-xxxxxxxxxxxx"
                                ],
                                "actionsCount": 6,
                                "actionsEngaged": {
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 2
                                  },
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 13
                                  },
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 1
                                  },
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 3
                                  }
                                },
                                "active": true,
                                "birthDate": "1997-05-12",
                                "city": "Anta Gorda",
                                "clientId": "xxxxxxxxxxxx",
                                "clientName": "testesemgame",
                                "confirmEmail": "email@email",
                                "cpf": "000.000.000-00",
                                "createdAt": 1601057023889,
                                "deliverAddress": {
                                  "cep": "",
                                  "city": "",
                                  "complement": "",
                                  "neighborhood": "",
                                  "number": "",
                                  "state": "",
                                  "street": ""
                                },
                                "email": "email@email",
                                "emailVerified": false,
                                "fcmToken": "xxxxxxxxxxxx",
                                "leads": 7,
                                "name": "alexia",
                                "phoneNumber": "(54) 54545-4545",
                                "photoURL": "link para foto",
                                "points": {
                                  "extraPoints": 11000,
                                  "salesConversion": 0
                                },
                                "redeemedPoints": 100,
                                "regional": "apartamento",
                                "registerCompleted": true,
                                "state": "RS",
                                "topics": {
                                  "NATIONAL_BR_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1603377256837,
                                    "topic": "NATIONAL_BR_xxxxxxxxxxxx"
                                  },
                                  "REGIONAL_APARTAMENTO_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1603377256911,
                                    "topic": "REGIONAL_APARTAMENTO_xxxxxxxxxxxx"
                                  },
                                  "STATE_RS_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1603377256914,
                                    "topic": "STATE_RS_xxxxxxxxxxxx"
                                  }
                                },
                                "totalPoints": 11000,
                                "uid": "xxxxxxxxxxxx"
                              }
                            },
                            false,
                            {
                              "xxxxxxxxxxxx": {
                                "acceptedTerms": true,
                                "actions": [
                                  "-xxxxxxxxxxxx"
                                ],
                                "actionsCount": 0,
                                "active": true,
                                "birthDate": "2020-10-06",
                                "city": "Amontada",
                                "clientId": "xxxxxxxxxxxx",
                                "clientName": "testesemgame",
                                "confirmEmail": "email@email",
                                "cpf": "000.000.000-00",
                                "createdAt": 1602098730858,
                                "email": "email@email",
                                "emailVerified": false,
                                "fcmToken": "xxxxxxxxxxxx",
                                "leads": 0,
                                "name": "teste6",
                                "phoneNumber": "(00) 00000-0000",
                                "photoURL": "link para foto",
                                "points": {
                                  "extraPoints": 10,
                                  "salesConversion": 0
                                },
                                "regional": "sitio",
                                "registerCompleted": true,
                                "state": "CE",
                                "topics": {
                                  "NATIONAL_BR_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1602098828584,
                                    "topic": "NATIONAL_BR_xxxxxxxxxxxx"
                                  },
                                  "REGIONAL_SITIO_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1602098828402,
                                    "topic": "REGIONAL_SITIO_xxxxxxxxxxxx"
                                  },
                                  "STATE_CE_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1602098828912,
                                    "topic": "STATE_CE_xxxxxxxxxxxx"
                                  }
                                },
                                "totalPoints": 10,
                                "uid": "xxxxxxxxxxxx"
                              }
                            },
                            {
                              "xxxxxxxxxxxx": {
                                "acceptedTerms": true,
                                "actions": [
                                  "-xxxxxxxxxxxx"
                                ],
                                "actionsCount": 0,
                                "actionsEngaged": {
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 1
                                  }
                                },
                                "active": true,
                                "birthDate": "0432-04-23",
                                "city": "Avelino Lopes",
                                "clientId": "xxxxxxxxxxxx",
                                "clientName": "testesemgame",
                                "confirmEmail": "email@email",
                                "cpf": "000.000.000-00",
                                "createdAt": 1602587177546,
                                "email": "email@email",
                                "emailVerified": false,
                                "fcmToken": "xxxxxxxxxxxx",
                                "leads": 0,
                                "name": "g",
                                "phoneNumber": "(35) 34523-4234",
                                "photoURL": "link para foto",
                                "points": {
                                  "extraPoints": 50,
                                  "salesConversion": 0
                                },
                                "regional": "apartamento",
                                "registerCompleted": true,
                                "state": "PI",
                                "topics": {
                                  "NATIONAL_BR_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1602587241158,
                                    "topic": "NATIONAL_BR_xxxxxxxxxxxx"
                                  },
                                  "REGIONAL_APARTAMENTO_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1602587241180,
                                    "topic": "REGIONAL_APARTAMENTO_xxxxxxxxxxxx"
                                  },
                                  "STATE_PI_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx",
                                    "subDate": 1602587241153,
                                    "topic": "STATE_PI_xxxxxxxxxxxx"
                                  }
                                },
                                "totalPoints": 50,
                                "uid": "xxxxxxxxxxxx"
                              }
                            },
                            {
                              "xxxxxxxxxxxx": {
                                "acceptedTerms": true,
                                "actions": [
                                  "-xxxxxxxxxxxx"
                                ],
                                "actionsCount": 0,
                                "actionsEngaged": {
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 1
                                  },
                                  "-xxxxxxxxxxxx": {
                                    "actionShares": 1
                                  }
                                },
                                "active": true,
                                "birthDate": "2020-09-24",
                                "city": "Água Branca",
                                "clientId": "xxxxxxxxxxxx",
                                "clientName": "testesemgame",
                                "confirmEmail": "email@email",
                                "cpf": "000.000.000-00",
                                "createdAt": 1601039581947,
                                "email": "email@email",
                                "emailVerified": false,
                                "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxx",
                                "leads": 0,
                                "name": "Ian",
                                "phoneNumber": "(00) 00000-0000",
                                "photoURL": "link para foto",
                                "regional": "sitio",
                                "registerCompleted": true,
                                "state": "AL",
                                "topics": {
                                  "NATIONAL_BR_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxx",
                                    "subDate": 1601039645364,
                                    "topic": "NATIONAL_BR_xxxxxxxxxxxx"
                                  },
                                  "REGIONAL_SITIO_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxx",
                                    "subDate": 1601039644867,
                                    "topic": "REGIONAL_SITIO_xxxxxxxxxxxx"
                                  },
                                  "STATE_AL_xxxxxxxxxxxx": {
                                    "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxx",
                                    "subDate": 1601039644882,
                                    "topic": "STATE_AL_xxxxxxxxxxxx"
                                  }
                                },
                                "totalPoints": 0,
                                "uid": "xxxxxxxxxxxx"
                              }
                            }
                          ]
                        }
                       

DEL - Delete Player

                      https://us-central1-oqhomapi.cloudfunctions.net/v2/player/delete
                    

Este endpoint permite deletar um player.

Request

BODY

                      {    
                        "search":{
                            "email": "email@email.com"
                        }
                    }
                    
Response

BODY

                      {
                        "code": 200,
                        "success": true,
                        "message": "Usuario excluido"
                      }
                     

POST - Player data

                    https://us-central1-oqhomapi.cloudfunctions.net/v2/player/getPlayer
                  

Este endpoint permite ler os dados de um player.

Request

BODY

                    {    
                      "search":{
                          "email": "email@email.com"
                      }
                  }
                  
Response

BODY

                    {
                      "code": 200,
                      "success": true,
                      "message": "Player encontrado",
                      "data": {
                        "xxxxxxxxxxxx": {
                          "acceptedTerms": true,
                          "actions": [
                            "-xxxxxxxxxxxx"
                          ],
                          "actionsCount": 0,
                          "actionsEngaged": {
                            "-xxxxxxxxxxxx": {
                              "actionShares": 1
                            },
                            "-xxxxxxxxxxxx": {
                              "actionShares": 1
                            }
                          },
                          "active": true,
                          "birthDate": "2020-09-24",
                          "city": "Água Branca",
                          "clientId": "xxxxxxxxxxxx",
                          "clientName": "testesemgame",
                          "confirmEmail": "email@email.com",
                          "cpf": "000.000.000-00",
                          "createdAt": 1601039581947,
                          "email": "email@email.com",
                          "emailVerified": false,
                          "fcmToken": "xxxxxxxxxxxx",
                          "leads": 0,
                          "name": "Ian",
                          "phoneNumber": "(00) 00000-0000",
                          "photoURL": "link para foto",
                          "regional": "sitio",
                          "registerCompleted": true,
                          "state": "AL",
                          "topics": {
                            "NATIONAL_BR_xxxxxxxxxxxx": {
                              "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx",
                              "subDate": 1601039645364,
                              "topic": "NATIONAL_BR_xxxxxxxxxxxx"
                            },
                            "REGIONAL_SITIO_xxxxxxxxxxxx": {
                              "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx",
                              "subDate": 1601039644867,
                              "topic": "REGIONAL_SITIO_xxxxxxxxxxxx"
                            },
                            "STATE_AL_xxxxxxxxxxxx": {
                              "fcmToken": "xxxxxxxxxxxx:xxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxx",
                              "subDate": 1601039644882,
                              "topic": "STATE_AL_xxxxxxxxxxxx"
                            }
                          },
                          "totalPoints": 0,
                          "uid": "xxxxxxxxxxxx"
                        }
                      }
                    }
                   

GET - Player Ranking

                  https://us-central1-oqhomapi.cloudfunctions.net/v2/players/getRanking
                

Este endpoint permite ler os dados do ranking dos players.

Request

BODY

                  {    
                    "search":{
                        "email": "email@email.com"
                    }
                  }
                
Response

BODY

                  {
                    "code": 200,
                    "success": true,
                    "message": "Raking carregado com sucesso",
                    "data": {
                      "playersRankingOrder": [
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "alexia",
                          "avatar": "link para foto",
                          "totalPoints": 11000,
                          "createdAt": 1601057023889,
                          "position": 1
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "Ian ",
                          "avatar": "link para foto",
                          "totalPoints": 2380,
                          "createdAt": 1601040803022,
                          "position": 2
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "teste",
                          "avatar": "link para foto",
                          "totalPoints": 1000,
                          "createdAt": 1601903189345,
                          "position": 3
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "teste6",
                          "avatar": "link para foto",
                          "totalPoints": 60,
                          "createdAt": 1602098730858,
                          "position": 4
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "fs",
                          "totalPoints": 50,
                          "createdAt": 1602547834050,
                          "position": 5
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "fee",
                          "avatar": "link para foto",
                          "totalPoints": 50,
                          "createdAt": 1602585987293,
                          "position": 6
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "fe",
                          "avatar": "link para foto",
                          "totalPoints": 50,
                          "createdAt": 1602586099027,
                          "position": 7
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "g",
                          "avatar": "link para foto",
                          "totalPoints": 50,
                          "createdAt": 1602587177546,
                          "position": 8
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "rafal",
                          "avatar": "link para foto",
                          "totalPoints": 50,
                          "createdAt": 1603224851335,
                          "position": 9
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "Raphael",
                          "avatar": "link para foto",
                          "totalPoints": 50,
                          "createdAt": 1603225254803,
                          "position": 10
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "Ian",
                          "avatar": "link para foto",
                          "totalPoints": 50,
                          "createdAt": 1603366448660,
                          "position": 11
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "qwerty",
                          "avatar": "link para foto",
                          "totalPoints": 50,
                          "createdAt": 1603473594984,
                          "position": 12
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "alexia",
                          "avatar": "link para foto",
                          "totalPoints": 26,
                          "createdAt": 1601918416963,
                          "position": 13
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "Ian",
                          "avatar": "link para foto",
                          "totalPoints": 0,
                          "createdAt": 1600969757853,
                          "position": 14
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "rafael",
                          "avatar": "link para foto",
                          "totalPoints": 0,
                          "createdAt": 1601038836675,
                          "position": 15
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "Ian",
                          "avatar": "link para foto",
                          "totalPoints": 0,
                          "createdAt": 1601039581947,
                          "position": 16
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "teste",
                          "avatar": "link para foto",
                          "totalPoints": 0,
                          "createdAt": 1601319105722,
                          "position": 17
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "yy",
                          "avatar": "link para foto",
                          "totalPoints": 0,
                          "createdAt": 1601320028095,
                          "position": 18
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "ian",
                          "avatar": "link para foto",
                          "totalPoints": 0,
                          "createdAt": 1602096219350,
                          "position": 19
                        },
                        {
                          "uid": "xxxxxxxxxxxx",
                          "name": "teste",
                          "avatar": "link para foto",
                          "totalPoints": 0,
                          "createdAt": 1602102137742,
                          "position": 20
                        }
                      ]
                    }
                  }
                 

GET - List Players

                https://us-central1-oqhomapi.cloudfunctions.net/v2/players
              

Este endpoint permite a listagem de todos os players.

Request

BODY

                
              
Response

BODY

                {
                  "code": 200,
                  "message": "Lista de players encontrada com sucesso!",
                  "success": true,
                  "size": 13372,
                  "data": {
                    "xxxxxxxxxxxx": {
                      "actions": [
                        "-xxxxxxxxxxxx"
                      ],
                      "active": true,
                      "clientId": "xxxxxxxxxxxx",
                      "cpf": "00000000000",
                      "createdAt": 1598645121846,
                      "email": "email@email.com.br",
                      "emailVerified": false,
                      "name": "Nome Completo",
                      "uid": "xxxxxxxxxxxx"
                    }
                  }
                }
               

Counts

GET - Percent Engagement

                            https://us-central1-oqhomapi.cloudfunctions.net/v2/leads/getPercentageEngagement
                          

Este end point retorna a porcentagem de engajamento total.

Request

BODY

                            
                          
Response

BODY

                            {
                              "code": 200,
                              "success": true,
                              "message": "Percentual de engajamento encontrado com sucesso",
                              "percentageEngagement": "11.7"
                            }
                           

GET - Percent Engagement

                            https://us-central1-oqhomapi.cloudfunctions.net/v2/allSharesCount
                          

Este end point retorna a quantidade de ações compartilhadas.

Request

BODY

                            
                          
Response

BODY

                            {
                              "code": 200,
                              "success": true,
                              "message": "Compartilhamentos encontrados com sucesso",
                              "sharesCount": 107,
                              "pageViewsPerWeekDay": [
                                {
                                  "x": 0,
                                  "y": 0
                                }
                              ],
                              "pageViewsPerDay": [
                                {
                                  "x": 0,
                                  "y": 0
                                }
                              ],
                              "pageViewsPerMonth": [
                                {
                                  "x": 0,
                                  "y": 0
                                }
                              ]
                            }
                           

GET - List all pageviews

                              https://us-central1-oqhomapi.cloudfunctions.net/v2/allPageViews
                            

Este end point retorna a quantidade de ações compartilhadas.

Request

BODY

                              
                            
Response

BODY

                              {
                                "pageViewCount": 1187,
                                "pageViewsPerWeekDay": [
                                  {
                                    "x": "Dom",
                                    "y": 0
                                  },
                                  {
                                    "x": "Seg",
                                    "y": 0
                                  },
                                  {
                                    "x": "Ter",
                                    "y": 9
                                  },
                                  {
                                    "x": "Qua",
                                    "y": 13
                                  },
                                  {
                                    "x": "Qui",
                                    "y": 1
                                  },
                                  {
                                    "x": "Sex",
                                    "y": 14
                                  },
                                  {
                                    "x": "Sáb",
                                    "y": 0
                                  }
                                ],
                                "pageViewsPerDay": [
                                  {
                                    "x": 1,
                                    "y": 0
                                  },
                                  {
                                    "x": 2,
                                    "y": 0
                                  },
                                  {
                                    "x": 3,
                                    "y": 9
                                  },
                                  {
                                    "x": 4,
                                    "y": 13
                                  },
                                  {
                                    "x": 5,
                                    "y": 1
                                  },
                                  {
                                    "x": 6,
                                    "y": 14
                                  },
                                  {
                                    "x": 7,
                                    "y": 0
                                  },
                                  {
                                    "x": 8,
                                    "y": 0
                                  },
                                  {
                                    "x": 9,
                                    "y": 0
                                  },
                                  {
                                    "x": 10,
                                    "y": 0
                                  },
                                  {
                                    "x": 11,
                                    "y": 0
                                  },
                                  {
                                    "x": 12,
                                    "y": 0
                                  },
                                  {
                                    "x": 13,
                                    "y": 0
                                  },
                                  {
                                    "x": 14,
                                    "y": 0
                                  },
                                  {
                                    "x": 15,
                                    "y": 0
                                  },
                                  {
                                    "x": 16,
                                    "y": 0
                                  },
                                  {
                                    "x": 17,
                                    "y": 0
                                  },
                                  {
                                    "x": 18,
                                    "y": 0
                                  },
                                  {
                                    "x": 19,
                                    "y": 0
                                  },
                                  {
                                    "x": 20,
                                    "y": 0
                                  },
                                  {
                                    "x": 21,
                                    "y": 0
                                  },
                                  {
                                    "x": 22,
                                    "y": 0
                                  },
                                  {
                                    "x": 23,
                                    "y": 0
                                  },
                                  {
                                    "x": 24,
                                    "y": 0
                                  },
                                  {
                                    "x": 25,
                                    "y": 0
                                  },
                                  {
                                    "x": 26,
                                    "y": 0
                                  },
                                  {
                                    "x": 27,
                                    "y": 0
                                  },
                                  {
                                    "x": 28,
                                    "y": 0
                                  },
                                  {
                                    "x": 29,
                                    "y": 0
                                  },
                                  {
                                    "x": 30,
                                    "y": 0
                                  }
                                ],
                                "pageViewsPerMonth": [
                                  {
                                    "x": "Jan",
                                    "y": 0
                                  },
                                  {
                                    "x": "Fev",
                                    "y": 0
                                  },
                                  {
                                    "x": "Mar",
                                    "y": 0
                                  },
                                  {
                                    "x": "Abr",
                                    "y": 0
                                  },
                                  {
                                    "x": "Mai",
                                    "y": 0
                                  },
                                  {
                                    "x": "Jun",
                                    "y": 0
                                  },
                                  {
                                    "x": "Jul",
                                    "y": 111
                                  },
                                  {
                                    "x": "Ago",
                                    "y": 787
                                  },
                                  {
                                    "x": "Set",
                                    "y": 148
                                  },
                                  {
                                    "x": "Out",
                                    "y": 104
                                  },
                                  {
                                    "x": "Nov",
                                    "y": 37
                                  },
                                  {
                                    "x": "Dez",
                                    "y": 0
                                  }
                                ]
                              }
                            

GET - List All Conversions

                            https://us-central1-oqhomapi.cloudfunctions.net/v2/allConversions
                          

Este endpoint lista todas as conversões por dia da semana, por mês e pelos dias do mês.

Request

BODY

                            
                          
Response

BODY

                            {
                              "conversionsCount": 50,
                              "amountOfConversionsPerWeekDay": [
                                {
                                  "x": "Dom",
                                  "y": 0
                                },
                                {
                                  "x": "Seg",
                                  "y": 0
                                },
                                {
                                  "x": "Ter",
                                  "y": 0
                                },
                                {
                                  "x": "Qua",
                                  "y": 0
                                },
                                {
                                  "x": "Qui",
                                  "y": 0
                                },
                                {
                                  "x": "Sex",
                                  "y": 0
                                },
                                {
                                  "x": "Sáb",
                                  "y": 0
                                }
                              ],
                              "amountOfConversionsPerDay": [
                                {
                                  "x": 1,
                                  "y": 0
                                },
                                {
                                  "x": 2,
                                  "y": 0
                                },
                                {
                                  "x": 3,
                                  "y": 0
                                },
                                {
                                  "x": 4,
                                  "y": 0
                                },
                                {
                                  "x": 5,
                                  "y": 5
                                },
                                {
                                  "x": 6,
                                  "y": 3
                                },
                                {
                                  "x": 7,
                                  "y": 0
                                },
                                {
                                  "x": 8,
                                  "y": 0
                                },
                                {
                                  "x": 9,
                                  "y": 0
                                },
                                {
                                  "x": 10,
                                  "y": 0
                                },
                                {
                                  "x": 11,
                                  "y": 19
                                },
                                {
                                  "x": 12,
                                  "y": 0
                                },
                                {
                                  "x": 13,
                                  "y": 0
                                },
                                {
                                  "x": 14,
                                  "y": 0
                                },
                                {
                                  "x": 15,
                                  "y": 0
                                },
                                {
                                  "x": 16,
                                  "y": 2
                                },
                                {
                                  "x": 17,
                                  "y": 0
                                },
                                {
                                  "x": 18,
                                  "y": 0
                                },
                                {
                                  "x": 19,
                                  "y": 0
                                },
                                {
                                  "x": 20,
                                  "y": 0
                                },
                                {
                                  "x": 21,
                                  "y": 0
                                },
                                {
                                  "x": 22,
                                  "y": 0
                                },
                                {
                                  "x": 23,
                                  "y": 0
                                },
                                {
                                  "x": 24,
                                  "y": 0
                                },
                                {
                                  "x": 25,
                                  "y": 0
                                },
                                {
                                  "x": 26,
                                  "y": 0
                                },
                                {
                                  "x": 27,
                                  "y": 0
                                },
                                {
                                  "x": 28,
                                  "y": 0
                                },
                                {
                                  "x": 29,
                                  "y": 0
                                },
                                {
                                  "x": 30,
                                  "y": 0
                                },
                                {
                                  "x": 31,
                                  "y": 0
                                }
                              ],
                              "amountOfConversionsPerMonth": [
                                {
                                  "x": "Jan",
                                  "y": 0
                                },
                                {
                                  "x": "Fev",
                                  "y": 0
                                },
                                {
                                  "x": "Mar",
                                  "y": 0
                                },
                                {
                                  "x": "Abr",
                                  "y": 0
                                },
                                {
                                  "x": "Mai",
                                  "y": 0
                                },
                                {
                                  "x": "Jun",
                                  "y": 0
                                },
                                {
                                  "x": "Jul",
                                  "y": 4
                                },
                                {
                                  "x": "Ago",
                                  "y": 4
                                },
                                {
                                  "x": "Set",
                                  "y": 13
                                },
                                {
                                  "x": "Out",
                                  "y": 29
                                },
                                {
                                  "x": "Nov",
                                  "y": 0
                                },
                                {
                                  "x": "Dez",
                                  "y": 0
                                }
                              ]
                            }
                          

Copyright and license

Code released under the Un License License.

For more information about copyright and license check choosealicense.com.

-->