Companion sample module for Data Builder — Visual Reporting, REST API & GraphQL for Perfex CRM.
This module helps customers understand and integrate with the REST API and GraphQL endpoints provided by Data Builder through interactive, working demos inside your Perfex CRM admin panel.
- CRUD Operations — Full Create, Read, Update, Delete examples for any Data Builder resource
- Resource Selector — Switch between resources (Projects, Staff, Payments, Invoices, Tasks, Clients, …) via dropdown
- Pagination & Sorting — Demonstrates
page,per_page,sort,fieldsquery parameters - Live Response Viewer — See raw JSON responses, HTTP status codes, and timing
- Auto-generated Sample Code — PHP code snippets generated for every request
- Query Editor — Write and execute GraphQL queries with syntax highlighting
- Quick Templates — One-click templates for Projects, Tasks, Staff, Invoices, and Ping queries
- Mutation Templates — Pre-built Create Task, Create Staff, and Delete Invoice mutations
- Variables Support — Pass JSON variables to parameterized queries
- Result Table — Structured data display with column headers extracted from response
- Raw Response — Full JSON response viewer for debugging
- Sample Code Generator — Auto-generates PHP integration code for every executed query
- Event Listener — Demonstrates how to receive and process Data Builder webhook events
- Payload Inspector — View the exact JSON payload structure for
table.create,table.update,table.deleteevents - Integration Guide — Ready-to-use templates for connecting webhooks to third-party services
- API Configuration — Manage API Base URL, Token, and HMAC Secret from a settings panel
- Connection Test — One-click connectivity verification with status indicator
- Admin Session Bypass — Toggle for development environments to simplify testing
- HMAC Signature Support — Full HMAC-SHA256 request signing implementation
- Client-Side Fetch — All API calls use browser-side
fetch()with proper CORS headers, avoiding server-side cURL loopback deadlocks - Robust Error Handling — Graceful handling of non-JSON responses (HTML error pages) with clear diagnostic messages
- Perfex CRM 3.0.0 or later
- Data Builder module v2.0.0+ installed and activated
- A valid API Token created in Data Builder → API Tokens
- Download this repository as a ZIP file (or
git clone) - Extract the
api_data_builder_samplefolder into your Perfex CRMmodules/directory:modules/ └── api_data_builder_sample/ ├── api_data_builder_sample.php ├── controllers/ ├── helpers/ ├── views/ ├── install.php └── README.md - Go to Admin → Setup → Modules
- Find "API Data Builder Sample" and click Activate
- Navigate to API Samples → Settings in the sidebar
- Enter your API Base URL, API Token, and (optionally) HMAC Secret
- Click Test Connection to verify
api_data_builder_sample/
├── api_data_builder_sample.php # Module registration & sidebar menu
├── install.php # Activation hook
├── controllers/
│ └── Api_data_builder_sample.php # Admin controller (dashboard, rest, graphql, webhooks, settings)
├── helpers/
│ └── api_data_builder_sample_helper.php
├── views/admin/
│ ├── dashboard.php # Connection status & overview
│ ├── rest.php # REST API interactive demos
│ ├── graphql.php # GraphQL playground
│ ├── webhooks.php # Webhook listener demos
│ └── settings.php # API connection settings
├── .gitignore
└── README.md
- Data Builder Module — View on CodeCanyon
- Public API Documentation — Available at
https://your-domain.com/api_docs(generated by Data Builder) - Author — PolyXGO
This sample module is provided free of charge as a companion to the Data Builder module. It is intended for educational and integration reference purposes.
MIT License — feel free to modify and adapt for your own projects.