Skip to main content

Introduction

The Communities API provides comprehensive management capabilities for residential communities in the Happy Habitat platform. This includes creating and managing communities, configuring community-specific settings, and defining pricing structures for various community services.

Key Features

Community Management

  • Create and manage residential communities with detailed information
  • Track community location using geographic coordinates (latitude/longitude)
  • Support for multiple community types (TipoComunidad)
  • Manage community contact information and active status

Community Configurations

  • Store custom configuration key-value pairs for each community
  • Support for different data types (TipoDato)
  • Track configuration changes with creation and update timestamps
  • Associate configurations with specific users for audit trails

Community Pricing

  • Define pricing for various community services and concepts
  • Support for multiple pricing entries per community
  • Active/inactive status management for pricing entries
  • Track pricing changes with audit information

Community Providers

  • Manage service providers and vendors for communities
  • Store comprehensive business and contact information
  • Track provider ratings and order history
  • Support for both community-specific and general providers
  • Soft delete functionality to maintain historical records

Core Entities

Community

Represents a residential community with the following key attributes:
  • Id (string): Unique identifier for the community
  • Nombre (string): Community name
  • Descripcion (string): Detailed description
  • Direccion (string): Physical address
  • Contacto (string): Primary contact name
  • Email (string): Contact email address
  • Phone (string): Contact phone number
  • TipoComunidad (string): Type/category of community
  • Latitud (double?): Geographic latitude coordinate
  • Longitud (double?): Geographic longitude coordinate
  • CantidadViviendas (integer): Number of residential units

Community Configuration

Configuration settings for a community:
  • Id (Guid): Configuration identifier
  • CommunityId (Guid): Associated community
  • Codigo (string): Configuration code/key
  • Titulo (string): Configuration title
  • Descripcion (string): Configuration description
  • Valor (string): Configuration value
  • TipoDato (string): Data type of the value
  • CreatedAt/UpdatedAt (string): Timestamp information
  • CreatedByUserId/UpdatedByUserId (Guid?): User audit trail

Community Price

Pricing information for community services:
  • Id (Guid): Price entry identifier
  • CommunityId (Guid): Associated community
  • Concepto (string): Service/concept name
  • Monto (decimal): Amount/price
  • IsActive (boolean): Active status
  • CreatedAt/UpdatedAt (string): Timestamp information
  • CreatedByUserId/UpdatedByUserId (Guid?): User audit trail

Community Provider

Service providers and vendors associated with communities:
  • Id (Guid): Provider identifier
  • CommunityId (Guid?): Associated community (nullable for general providers)
  • BusinessName (string): Provider business name
  • TaxId (string?): Tax identification number
  • FullAddress (string?): Complete business address
  • ContactPhones (string?): Contact phone numbers
  • PrimaryEmail (string?): Primary business email
  • WebsiteOrSocialMedia (string?): Website or social media links
  • PrimaryContactName (string?): Main contact person
  • DirectPhone (string?): Direct contact phone
  • MobilePhone (string?): Mobile contact phone
  • ContactEmail (string?): Contact person email
  • ProductsOrServices (string?): Description of services offered
  • CategoryOrIndustry (string?): Business category
  • PaymentMethods (string?): Accepted payment methods
  • Rating (decimal?): Provider rating
  • OrderHistory (string?): Historical order information
  • PastIncidentsOrClaims (string?): Record of incidents or claims
  • InternalNotes (string?): Internal administrative notes
  • IsActive (boolean): Active status
  • CreatedAt/UpdatedAt (string): Timestamp information
  • CreatedByUserId/UpdatedByUserId (Guid?): User audit trail

Authentication & Authorization

All Communities endpoints require authentication with one of the following roles:
  • ADMIN_COMPANY: Company administrators
  • SYSTEM_ADMIN: System-level administrators
Include a valid JWT token in the Authorization header:
Authorization: Bearer <your_token>

Base URL

All endpoints are prefixed with the API base URL:
/api/communities
/api/communityconfigurations
/api/communityprices
/api/communityproviders

Common Response Codes

  • 200 OK: Successful request
  • 201 Created: Resource successfully created
  • 204 No Content: Successful deletion
  • 400 Bad Request: Invalid request data or business logic violation
  • 401 Unauthorized: Missing or invalid authentication
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Resource not found
Communities are connected to many other resources in the Happy Habitat platform:
  • Residents
  • Banners
  • Comunicados (Announcements)
  • Amenities
  • User Communities
  • Contracts
  • Providers
  • Documents
  • Surveys (Encuestas)
  • Tickets
  • Bank Account Balances

Build docs developers (and LLMs) love