Skip to main content

Base URL

All API requests should be made to:
https://idforideas-1.jamrdev.com.ar

Root Endpoint

The root endpoint returns a simple text response identifying the API:
curl https://idforideas-1.jamrdev.com.ar/

# Response
API Sistema de Gestión de Propiedades - Inmobiliaria Bonpland Propiedades, ID For Ideas

API Documentation

This API is built with Hono framework on Cloudflare Workers and uses D1 database for data persistence.

Interactive Documentation

You can explore and test the API using the interactive Swagger UI:
  • OpenAPI JSON Schema: https://idforideas-1.jamrdev.com.ar/doc
  • Swagger UI Interface: https://idforideas-1.jamrdev.com.ar/ui

Authentication

The API uses HTTP Basic Authentication for protected endpoints. All endpoints that create, update, or delete properties require authentication. To authenticate, include the Authorization header with your credentials:
Authorization: Basic <base64-encoded-credentials>

Protected Endpoints

The following endpoints require authentication:
  • POST /api/propiedades - Create property
  • PATCH /api/propiedades/{id} - Update property
  • DELETE /api/propiedades/{id} - Delete property
  • GET /api/auth/verify - Verify authentication

Public Endpoints

The following endpoints are publicly accessible:
  • GET /api/propiedades - List all properties
  • GET /api/propiedades/{id} - Get property by ID

Response Format

All responses are returned in JSON format with appropriate HTTP status codes.

Success Responses

Query endpoints (GET) return data directly:
// GET /api/propiedades/{id}
{
  "codigo_id": "ZN1001",
  "pais": "Argentina",
  "ciudad": "Tigre",
  // ... other fields
}
Mutation endpoints (POST, PATCH, DELETE) return structured responses:
// POST /api/propiedades
{
  "success": true,
  "message": "Propiedad creada correctamente",
  "id": "ZN1001"
}

// PATCH, DELETE
{
  "success": true,
  "message": "Propiedad actualizada"
}

Error Responses

Error responses vary by endpoint:
// 404 on GET endpoints
{
  "error": "Propiedad no encontrada"
}

// Validation errors on mutation endpoints
{
  "success": false,
  "error": "Error message description"
}

// Authentication errors
{
  "error": "Unauthorized"
}

Status Codes

CodeDescription
200Success - Request completed successfully
201Created - Resource created successfully
400Bad Request - Invalid data or validation error
401Unauthorized - Authentication required or failed
404Not Found - Resource not found
409Conflict - Resource already exists (duplicate codigo_id)

CORS

The API supports Cross-Origin Resource Sharing (CORS) for all endpoints, allowing requests from any origin.

Build docs developers (and LLMs) love