WP Manifestindependent plugin directory
manifest / integrations / termene-api-integration

Termene.ro API

A robust WordPress plugin that integrates with Termene.ro API to verify and manage Romanian company data within your WordPress site.

by SparkWebStudio · github.com/spkcd/termene-api-integration · website

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/spkcd/termene-api-integration/archive/refs/heads/main.zip

Termene.ro API Integration for WordPress

A robust WordPress plugin that integrates with Termene.ro API to verify and manage Romanian company data within your WordPress site.

Termene.ro Integration

Description

This plugin provides seamless integration between WordPress and Termene.ro's API services for Romanian company data verification and management. It allows site administrators and authorized users to search for companies by their fiscal identification code (CUI/CIF), retrieve official data, and save this information to a custom post type within WordPress.

Features

Core Functionality

  • Search and verify companies by CUI/CIF number
  • Automatically fetch comprehensive company data from Termene.ro API
  • Save company information to a dedicated WordPress custom post type
  • Track company registration numbers, fiscal data, and contact information

User Interface

  • Two implementation options via shortcodes:
    • Standard form: [termene_companies_form]
    • Popup-optimized form: [termene_companies_form_popup] (ideal for Elementor popups)
  • Responsive design that works on all device sizes
  • Real-time validation and data display

Admin Features

  • Comprehensive settings panel for API credentials management
  • Test API connectivity directly from the admin interface
  • Advanced cache management for API responses
  • Activity logging and monitoring
  • Company data export capabilities

Integration Support

  • Compatible with JetEngine for enhanced custom fields functionality
  • Works with Elementor popups
  • Custom REST API endpoints for developer integration

Performance & Security

  • Intelligent caching system to minimize API calls
  • Secure API communication with proper authentication
  • Thorough data sanitization and validation
  • Permission-based access controls

Installation

  1. Download the plugin zip file
  2. Go to your WordPress admin area → Plugins → Add New
  3. Click "Upload Plugin" and select the downloaded zip file
  4. Activate the plugin once installed
  5. Configure your Termene.ro API credentials under Settings → Termene Integration

Configuration

API Credentials

  1. Navigate to Settings → Termene Integration
  2. Enter your Termene.ro API credentials:
    • API Key
    • Username
    • Password
  3. Save changes and use the "Test Connection" button to verify

Permissions

By default, only users with the edit_posts capability can search and save companies. You can modify this through WordPress role management or with a custom code snippet.

Usage

Basic Implementation

Add the search form to any page or post using the shortcode:

[termene_companies_form]

For Elementor Popups

Use the special popup-optimized shortcode that prevents page refresh:

[termene_companies_form_popup]

Working with Company Data

  • Companies are saved as a custom post type called "Companies"
  • Each company's data is stored in custom fields
  • You can display company information using standard WordPress template functions
  • For JetEngine users, data is compatible with JetEngine queries and templates

Customization

Styling

The plugin includes basic styling that can be extended with your own CSS. Main class selectors:

  • .termene-companies-form - Main form container
  • .company-data - Company data display area
  • .search-button, .save-button - Action buttons
  • .termene-loading - Loading indicator
  • .termene-error, .termene-success - Status messages

Code Customization

The plugin provides several filters and actions for developers to customize behavior:

// Modify company data before saving
add_filter('termene_company_data_before_save', 'my_custom_company_data_modifier', 10, 2);
function my_custom_company_data_modifier($company_data, $post_id) {
    // Your modifications here
    return $company_data;
}

Troubleshooting

Common Issues

  • API Connection Failures: Verify your API credentials under Settings → Termene Integration
  • Company Not Found: Ensure the CUI/CIF is valid and belongs to an active company
  • Form Not Displaying: Check that your shortcode is correctly inserted and not conflicting with other shortcodes
  • Data Not Saving: Verify that the user has the required capabilities (edit_posts by default)

Debug Mode

Enable WordPress debug mode to see detailed error messages.

Changelog

1.4

  • Added compatibility with Elementor popups
  • Improved data caching system
  • Enhanced error reporting

1.3

  • Added JetEngine compatibility
  • Implemented advanced data filtering
  • Improved mobile responsiveness

1.2

  • Added activity logging
  • Enhanced security with improved nonce verification
  • Performance optimizations

1.1

  • Added custom REST API endpoints
  • Improved company data display
  • Fixed data sanitization issues

1.0

  • Initial release

Support

For support requests or feature suggestions, please use the following options:

  • Submit an issue on GitHub
  • Contact SPARKWEB Studio at support@sparkwebstudio.com

License

This plugin is licensed under the GPL v2 or later.

Copyright (C) 2023 SPARKWEB Studio

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

Credits