Documentación
Configuración del edificio
Parámetros de cobro, mora, notificaciones, firma y reglas del edificio.
type: configuracion_edificio EntitySet: ConfiguracionEdificio App: /configuracion/edificio
Scopes
comunidesk:readcomunidesk:write
Endpoints
GET /v1/rest/ConfiguracionEdificio
Listar
Scopes: comunidesk:read
GET /v1/rest/ConfiguracionEdificio/{id}
Obtener por id
Scopes: comunidesk:read
POST /v1/rest/ConfiguracionEdificio
Crear
Scopes: comunidesk:write
PATCH /v1/rest/ConfiguracionEdificio/{id}
Actualizar
Scopes: comunidesk:write
Specs OpenAPI y SOAP
Descarga el contrato del módulo (JSON, YAML o WSDL) para importar en Postman, Insomnia o clientes SOAP.
Ejemplo de request
import Foundation
let oauthToken = "OAUTH_TOKEN"
let userJwt = "USER_JWT"
var req = URLRequest(url: URL(string: "https://gateway.comunidesk.com/v1/rest/ConfiguracionEdificio")!)
req.httpMethod = "GET"
req.setValue("Bearer \(oauthToken)", forHTTPHeaderField: "Authorization")
req.setValue("Bearer \(userJwt)", forHTTPHeaderField: "x-comunidesk-user-authorization")
req.setValue("application/json", forHTTPHeaderField: "Accept")
let (data, response) = try await URLSession.shared.data(for: req)
let http = response as! HTTPURLResponse
print(http.statusCode, String(data: data, encoding: .utf8) ?? "")
// scope tipico: comunidesk:readApps nativas (iOS / Android)
Después del login, consulta /v1/me/capabilities y muestra solo los módulos disponibles para ese usuario.
import Foundation
let oauthToken = "OAUTH_TOKEN"
let userJwt = "USER_JWT"
var req = URLRequest(url: URL(string: "https://gateway.comunidesk.com/v1/me/capabilities")!)
req.httpMethod = "GET"
req.setValue("Bearer \(oauthToken)", forHTTPHeaderField: "Authorization")
req.setValue("Bearer \(userJwt)", forHTTPHeaderField: "x-comunidesk-user-authorization")
struct CapName: Decodable { let es: String; let en: String }
struct CapModule: Decodable {
let id: String
let entitySet: String
let canRead: Bool
let canWrite: Bool
let name: CapName
}
struct Capabilities: Decodable { let modules: [CapModule] }
let (data, _) = try await URLSession.shared.data(for: req)
let caps = try JSONDecoder().decode(Capabilities.self, from: data)
let menu = caps.modules.filter { $0.canRead }
// menu.forEach { print($0.name.es, $0.entitySet) }Campos de escritura
Campos aceptados en POST/PATCH.
| Campo | Tipo | Obligatorio | Enum |
|---|---|---|---|
| edificioId | string | Sí | |
| pais | string | No | |
| jurisdiccion | string | No | |
| estado | string | No | |
| provincia | string | No | |
| geo | object | No | |
| diaGeneracionGastos | number | No | |
| diaEmisionGastos | number | No | |
| diaCobroGastosComunes | number | No | |
| diaVencimiento | number | No | |
| moneda | string | No | |
| monedaProveedores | string | No | |
| valorUFActual | number | No | |
| valoresUF | array | No | |
| porcentajeMora | number | No | |
| porcentajeMulta | number | No | |
| diasGraciaMora | number | No | |
| diasGracia | number | No | |
| permitirPagoOnline | boolean | No | |
| notificacionesEmail | boolean | No | |
| notificacionesSMS | boolean | No | |
| informacionBancaria | string | No | |
| intereses | object | No | |
| fondoReserva | object | No | |
| fondosEspeciales | array | No | |
| torreSeguros | object | No | |
| seguroColectivo | object | No | |
| datosBancarios | object | No | |
| administrador | object | No | |
| firmaOficial | object | No | |
| firmaDigital | object | No | |
| pagoOnline | object | No | |
| recordatoriosConsumos | object | No | |
| tarifasServicios | object | No | |
| configuracionTickets | object | No | |
| configuracionMedidores | object | No | |
| configuracionSMS | object | No |
Solo lectura: _id, _rev, type, createdAt, updatedAt
