โ๏ธ MERCI API - Weighbridge / Scales Integration Guide
A comprehensive API guide to assist hardware vendors and developers in integrating weighbridge machines or related software directly with MerciGlobal Cloud ERP.
๐ API Endpoint
https://erp.merciglobal.com/apis/weighbridgeapi.php?project=urvashi&accesstoken=ACCESS_TOKEN&machineid=1&weight=9999.999&date=2024-03-12&time=11:13
This endpoint facilitates the real-time transmission of weight data from weighbridge systems to the MerciGlobal Cloud ERP.
๐ Parameters (GET/POST)
Parameter | Description |
---|---|
project |
Project name (e.g., urvashi) |
accesstoken |
Secure access token (found in My Profile โ Set at bottom) |
machineid |
Unique machine identifier (e.g., 1, 2, 3...) |
weight |
Weight value in decimal format (e.g., 9999.999) |
date |
Date of the reading in YYYY-MM-DD format |
time |
Time of the reading in HH:MM format |
- ๐ Supported Methods:
POST
orGET
- ๐ Compatible Languages: CURL, .NET, Python, Embedded Systems, etc.
โ๏ธ Implementation Guidelines
- API must be invoked directly by weighbridge hardware or controlling software.
- Ensure internet access for seamless data delivery.
- An active subscription with MerciGlobal is essential.
๐ณ Annual Subscription Charges
Description | Price (USD) |
---|---|
MerciGlobal Weighbridge API Access | $150 |
Pricing is subject to change. Contact sales for volume licensing or enterprise plans.
๏ฟฝ๏ฟฝ Windows COM Port Integration Utility
MerciGlobal provides a Windows utility to streamline integration for machines using COM ports.
๐ฆ Downloadable Files
๐ ๏ธ Setup Guide
- Place both files in a common directory (e.g.,
D:\WeighBridge
) - Open
weighbridge.cfg
with Notepad and configure as below:
project=your_project_name
accesstoken=your_access_token
machineid=1
- Access token is available in
My Profile
Section, as last entry. - Save the file.
- Launch
weighbridge.exe
to begin data capture and transmission. - To auto-run on Windows startup, move both files to the Startup folder.
๐ก Internet connection is mandatory for successful data delivery to MerciGlobal Cloud ERP.
๐ Run as a Windows Service (Recommended)
Automate execution using RunAsService.exe
to run the utility as a background service.
๐ Installation Instructions
- Download RunAsService.exe
- Create folder
D:\WeighBridge
- Place all required files (
weighbridge.exe
,weighbridge.cfg
,RunAsService.exe
) into the folder - Launch Command Prompt as Administrator
- Execute the following command:
RunAsService install "WeighBridge" "WeighBridge" d:\weighbridge\weighbridge.exe
- Restart your system
โ The utility will now auto-start as a background service.
๐ Contact the MerciGlobal Cloud ERP Sales Team for licensing and subscription queries.
๐งน Front-End Integration (JavaScript)
Insert this code snippet into your _core.js
file to display live weight in a form field:
function {modulename}_add_afterload(){
let machineid = 1; // Set machine ID
let field = 'weight'; // Update with actual form field name
if (branchcode == 'PM3'){
machineid = 2;
}
$(`#${field}`).data('tool','ok');
$(`#${field}`).after(`<div class="inptool" data-id="weightapi" onclick="getWeightFromApi(${machineid},'${field}');"><i class="fa-duotone fa-solid fa-dumbbell" style="font-size:12pt;"></i></div>`);
$(`#${field}`).addClass('bold').addClass('blue').addClass('font14');
}
๐ฉ Support
For technical help or to request API credentials: ๐ Contact the MerciGlobal ERP Support or Sales Team.
โ You're now equipped to fully automate weighbridge data entry with MerciGlobal Cloud ERP!