Alexa Agent Imobiliar
Alexa Agent Imobiliar · Acciones GPT
Real Estate Assistant API
API for the real estate assistant GPT to interact with users and connect them with agents.
POST /selectLanguagePrompts the user to select their preferred language.POST /identifyUserIdentifies the type of user and their needs.POST /connectWithAgentConnects the user with an agent.POST /uploadFileUploads a file from the user.GET /getMedianPricesProvides median prices per neighborhood.POST /analyzeLinkAnalyzes a link provided by the user and gives a short opinion.
Esquema original API
{
"openapi": "3.1.0",
"info": {
"title": "Real Estate Assistant API",
"description": "API for the real estate assistant GPT to interact with users and connect them with agents.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://imobiliare.kw.com/api/v1",
"description": "Main production server"
}
],
"paths": {
"/selectLanguage": {
"post": {
"operationId": "selectLanguage",
"summary": "Prompts the user to select their preferred language.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"preferredLanguage": {
"type": "string",
"description": "User's preferred language",
"enum": [
"ro",
"hu",
"en",
"fr"
],
"example": "ro"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Language selected successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Preferred language set"
}
}
}
}
}
}
}
}
},
"/identifyUser": {
"post": {
"operationId": "identifyUser",
"summary": "Identifies the type of user and their needs.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"userName": {
"type": "string",
"description": "Name of the user",
"example": "John Doe"
},
"userType": {
"type": "string",
"description": "Type of user (buyer, seller, tenant, landlord)",
"enum": [
"buyer",
"seller",
"tenant",
"landlord"
],
"example": "buyer"
},
"budget": {
"type": "integer",
"description": "User's budget in local currency",
"example": 50000
},
"urgency": {
"type": "string",
"description": "Urgency level of the user's inquiry",
"enum": [
"low",
"medium",
"high"
],
"example": "high"
},
"propertyDocuments": {
"type": "string",
"description": "Property documents",
"example": "Deed, Survey"
},
"propertyAge": {
"type": "integer",
"description": "Age of the property in years",
"example": 10
},
"landSize": {
"type": "integer",
"description": "Size of the land in square meters",
"example": 500
}
}
}
}
}
},
"responses": {
"200": {
"description": "User identified successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "User identified"
},
"agentId": {
"type": "string",
"example": "agent-12345"
}
}
}
}
}
}
}
}
},
"/connectWithAgent": {
"post": {
"operationId": "connectWithAgent",
"summary": "Connects the user with an agent.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "ID of the agent to connect with",
"example": "agent-12345"
},
"userId": {
"type": "string",
"description": "ID of the user to connect",
"example": "user-67890"
}
}
}
}
}
},
"responses": {
"200": {
"description": "User connected with agent successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "User connected with agent"
}
}
}
}
}
}
}
}
},
"/uploadFile": {
"post": {
"operationId": "uploadFile",
"summary": "Uploads a file from the user.",
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "The file to upload",
"example": "document.pdf"
}
}
}
}
}
},
"responses": {
"200": {
"description": "File uploaded successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "File uploaded"
}
}
}
}
}
}
}
}
},
"/getMedianPrices": {
"get": {
"operationId": "getMedianPrices",
"summary": "Provides median prices per neighborhood.",
"parameters": [
{
"in": "query",
"name": "neighborhood",
"schema": {
"type": "string"
},
"description": "The neighborhood to get median prices for",
"example": "Downtown"
}
],
"responses": {
"200": {
"description": "Median prices retrieved successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"neighborhood": {
"type": "string",
"example": "Downtown"
},
"medianPrice": {
"type": "number",
"format": "float",
"example": 250000
}
}
}
}
}
}
}
}
},
"/analyzeLink": {
"post": {
"operationId": "analyzeLink",
"summary": "Analyzes a link provided by the user and gives a short opinion.",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"link": {
"type": "string",
"description": "The link to analyze",
"example": "http://example.com"
}
}
}
}
}
},
"responses": {
"200": {
"description": "Link analyzed successfully",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"example": "Link analyzed"
},
"opinion": {
"type": "string",
"example": "The link is about a property listing in Downtown."
}
}
}
}
}
}
}
}
}
}
}