Values
Obter valores distintos de um campo
Retorna os valores distintos disponíveis para um campo específico de uma entidade. Útil para popular filtros e selects na sua aplicação.
Campos consultáveis:
properties:status,operationType,propertyType,highlightleads:status,source,priority
curl -X GET "https://sandbox-partner-api.keyspot.com.br/v1/values/properties/status" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN (JWT)"
import requests
import json
url = "https://sandbox-partner-api.keyspot.com.br/v1/values/properties/status"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://sandbox-partner-api.keyspot.com.br/v1/values/properties/status", {
method: "GET",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN (JWT)"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://sandbox-partner-api.keyspot.com.br/v1/values/properties/status", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN (JWT)")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://sandbox-partner-api.keyspot.com.br/v1/values/properties/status')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN (JWT)'
response = http.request(request)
puts response.body
{
"data": {
"entity": "properties",
"field": "status",
"values": [
"AVAILABLE",
"RENTED",
"RESERVED",
"SOLD",
"UNAVAILABLE"
]
}
}
{
"error": "Invalid entity: foo. Use one of: properties, leads",
"code": "INVALID_ENTITY"
}
{
"error": "Field "title" is not queryable for "properties". Queryable fields: status, operationType, propertyType, highlight",
"code": "INVALID_FIELD"
}
{
"error": "Invalid or expired token",
"code": "INVALID_TOKEN"
}
{
"error": "Rate limit exceeded",
"code": "RATE_LIMIT_EXCEEDED"
}
GET
/v1/values/{entity}/{field}GET
Bearer Token (JWT)
Bearer Tokenstring
RequiredToken JWT obtido via POST /v1/auth/token. Válido por 1 hora.
Token JWT obtido via
POST /v1/auth/token. Válido por 1 hora.path
entitystring
RequiredNome da entidade (properties ou leads)
Options: properties, leads
path
fieldstring
RequiredNome do campo a consultar. Campos disponíveis dependem da entidade.
Request Preview
Response
Response will appear here after sending the request
Authentication
header
Authorizationstring
RequiredBearer token (JWT). Token JWT obtido via POST /v1/auth/token. Válido por 1 hora.
Path Parameters
fieldstring
RequiredNome do campo a consultar. Campos disponíveis dependem da entidade.
Responses
dataobject
Resposta de valores distintos
Was this page helpful?
Last updated today
Built with Documentation.AI