Este webservice é utilizado para obter o número de visitas (hits) de um imóvel.
| Resource information | |
|---|---|
| Authentication | Obrigatória (JWT) |
| Parameters | Obrigatórios |
| HTTP Method | GET |
| Response | JSON |
Resource URL
https://property-api.mapaprop.com/property/get/hits
Autenticação
É necessário um token JWT no header Authorization: Bearer {access_token}. O customerId é derivado do token: NÃO é enviado como parâmetro.
Parameters request.
| Key | Type | Required | Description |
|---|---|---|---|
| propertyId | String | yes | the property id identifier |
| brandId | String | yes | brand or system sending data |
| originId | String | yes | originating portal sending the data |
| originCountry | String | yes | country code to store customer's local time |
| days | String | yes | number of days from current date |
Parameters conditions
- O parâmetro
dayssó aceita estes valores: 1, 7, 14, 30, 90.
Example curl
curl --location 'https://property-api.mapaprop.com/property/get/hits?propertyId=213251&days=14&originCountry=ar&originId=PatagonProp&brandId=mapaprop' \
--header 'Authorization: Bearer {access_token}'
Sample code
GET https://property-api.mapaprop.com/property/get/hits Host: property-api.mapaprop.com Content-Type: application/json Authorization: Bearer {access_token} Parameters: propertyId=213251(Number) days=14(Number) originCountry=ar(String) originId=PatagonProp(String) brandId=mapaprop(String)
Response
Retorna um objeto JSON com o resumo de hits do imóvel para a origem e o intervalo de dias solicitado.
| Field | Type | Description |
|---|---|---|
days | Number | Quantidade de dias do relatório (1, 7, 14, 30 ou 90). |
hits | Number | Total de hits acumulados no intervalo. |
propertyId | String | Identificador do imóvel. |
originUrlHit | String | URL do imóvel no portal de origem. |
customerId | Number | Identificador do cliente (derivado do token). |
brand | String | Marca / sistema que enviou os dados. |
originCountry | String | Código de país da origem. |
originId | String | Portal de origem. |
report | Object | Mapa de data (YYYY-MM-DD) → quantidade de hits daquele dia. |
Sample code
Sample response for the get hits
{ "days": 14, "hits": 7, "propertyId": "213251", "originUrlHit": "https://www.patagonprop.com/ar/propiedad/alquiler-de-departamento-en-caballito-capital-federal-444-191022/5ebebe55a9b6c47f0702173b9a8168cf", "customerId": "444", "brand": "mapaprop", "originCountry": "ar", "originId": "PatagonProp", "report": { "2023-11-07": 0, "2023-11-06": 0, "2023-11-05": 0, "2023-11-04": 1, "2023-11-03": 0, "2023-11-02": 0, "2023-11-01": 0, "2023-10-31": 1, "2023-10-30": 1, "2023-10-29": 1, "2023-10-28": 1, "2023-10-27": 0, "2023-10-26": 2, "2023-10-25": 0 }}
Exemplo de erro (status 400 — valor de days inválido)
Date not available or parameter with error.