Download Latest Version emjysoft-plugin-connector-v1.0.zip (15.6 kB)
Email in envelope

Get an email when there's a new version of Emjysoft Gestion Locative Connector

Home / examples
Name Modified Size InfoDownloads / Week
Parent folder
receive_document.php 2025-12-18 800 Bytes
receiver.py 2025-12-18 912 Bytes
Totals: 2 Items   1.7 kB 1

Emjysoft Gestion Locative Plugin Connector

Emjysoft Gestion Locative Plugin Connector is an open-source component for the software Emjysoft Gestion Locative (minimum version 22). It allows sending documents such as rent notices, rent receipts, adjustments, or certificates to external systems via HTTP or a local executable.


Table of Contents


Features

  • Support for external JSON plugins
  • Transmission via HTTP POST or EXE
  • Basic authentication (username/password)
  • 128-bit UUIDs for leases, owners, and properties
  • Compatible with Emjysoft Gestion Locative v22+
  • PHP and Python examples included for quick integration

Supported Documents

  • Rent call / rent notice (rent_call)
  • Rent receipt (rent_receipt)
  • Payment reminder (payment_reminder)
  • Rent revision (rent_revision)
  • Service charge adjustment (service_charge_adjustment)
  • Payment schedule (payment_schedule)
  • Certificate request (document_request)
  • Other (other)

Prerequisites

  • Emjysoft Gestion Locative version 22 or higher
  • For HTTP integration: web server with PHP 8.x+ or Python 3.x+
  • For EXE integration: Windows with Python 3.x+ or a compiled executable

Installation

  1. Download the JSON plugin from this repository
  2. In Emjysoft Gestion Locative v22+, navigate to:
    General Options > Advanced Options > External Modules > Add
  3. Select the plugin JSON file
  4. Configure the settings:
  5. Action type (URL or EXE)
  6. Destination (URL endpoint or executable path)
  7. Authentication information (if required)

Usage Examples

PHP Example: Receiving Documents via HTTP

<?php
// Set header to return JSON
header('Content-Type: application/json');

// Read the request body
$rawData = file_get_contents("php://input");

// Decode JSON into an array
$documents = json_decode($rawData, true);

// Check if JSON is valid
if ($documents === null) {
    http_response_code(400);
    echo json_encode([
        "status" => "error",
        "message" => "Invalid JSON"
    ]);
    exit;
}

// For this example, just loop through documents and print info
foreach ($documents as $doc) {
    // Print some info for demonstration
    // In a real script, you might save the document or process it
    echo "Received document for property: " . ($doc['property_name'] ?? 'Unknown') . "\n";
}

// Return a success response
echo json_encode([
    "status" => "success",
    "message" => "Documents received successfully"
]);
?>

Python Example: Receiving Documents via EXE

# receiver.py
import sys
import json
import os

def main():
    if len(sys.argv) < 2:
        print("Usage: receiver.py <path_to_json>")
        sys.exit(1)

    json_path = sys.argv[1]

    if not os.path.isfile(json_path):
        print(f"File not found: {json_path}")
        sys.exit(2)

    try:
        with open(json_path, 'r', encoding='utf-8') as f:
            data = json.load(f)
        print("Received JSON data:")
        print(json.dumps(data, indent=4))
        sys.exit(0)
    except Exception as e:
        print(f"JSON read error: {e}")
        sys.exit(3)

if __name__ == "__main__":
    main()

Execution by the application:

receiver.exe "C:\path\to\document_example.json"

Configuration

Plugin JSON File

{
  "application_id": "com.emjysoft.gestionlocative",
  "format_version": "1.0",
  "metadata": {
    "name": "Emjysoft Gestion Locative Plugin Connector",
    "description": "This plugin allows sending documents to an external system via HTTP or EXE.",
    "documentation_url": "https://www.emjysoft.com/logiciel-gestion-locative/",
    "enabled_label": "Enable sending to an external system"
  },
  "action": {
    "type": "URL",
    "destination": "https://www.example.com/endpoint",
    "method": "POST"
  },
  "authentication": {
    "type": "basic",
    "username": "api_user",
    "password": "secret_password"
  }
}

Data Format

Example JSON Payload

[
  {
    "owner_uuid": "11111111-aaaa-2222-bbbb-333333333333",
    "owner_name": "Owner Example LLC",
    "property_uuid": "44444444-cccc-5555-dddd-666666666666",
    "property_name": "Sample Apartment 101",
    "lease_uuid": "77777777-eeee-8888-ffff-999999999999",
    "lease_tenant_contact": "John Doe\r\n123 Example Street\r\n12345 CityTown",
    "document_type": "rent_call",
    "document_period_start": "2025-01-01",
    "document_period_end": "2025-01-31",
    "document_content_base64": "JVBERi0xLjQKJeLjz9MNCjEgMCBvYmoKPDwv..."
  }
]

Expected Server Response

Success (HTTP 200):

{
  "status": "success",
  "message": "Document received successfully"
}

Error (HTTP 4xx / 5xx):

{
  "status": "error",
  "message": "Invalid document UUID",
  "error_code": 1001
}

Full Documentation

For detailed documentation on integration and plugin usage, see the Complete Integration Guide.


License

This project is licensed under the MIT License. See the LICENSE file for details.

MIT License

Copyright (c) 2025 Emjysoft

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Support


Version: 1.0
Last update: December 2025

Source: README.md, updated 2025-12-18