Accessing Data from MERCIGLOBAL Cloud ERP¶
This guide provides a detailed explanation of how to retrieve data from MERCIGLOBAL Cloud ERP using its Data API. Whether you're a customer, an internal Merci developer, or a Merci sales team member, this document will help you understand the API usage effectively.
How to Get / Extract Data¶
To fetch data from the MERCIGLOBAL Cloud ERP Data Tables, you will interact with a specific API endpoint using either POST or GET methods.
API Endpoint¶
URL: https://devx.merciglobal.com/apis/dataapi.php
Required Parameters¶
When making a request to the API, ensure you pass the following parameters:
Parameter | Description | Required | Example |
---|---|---|---|
req |
API request type | ✅ | getdata |
project |
Your project name | ✅ | my_erp_project |
accesstoken |
Secure access token | ✅ | abc123xyz789 |
yearid |
Financial year ID | ✅ | 2024 |
compid |
Company ID | ✅ | 101 |
table |
Target table name in ERP | ✅ | sales_invoice |
Example Request¶
Here is an example of how a POST request would look in your code:
Using cURL¶
curl -X POST https://devx.merciglobal.com/apis/dataapi.php \
-d "req=getdata" \
-d "project=my_erp_project" \
-d "accesstoken=abc123xyz789" \
-d "yearid=2024" \
-d "compid=101" \
-d "table=sales_invoice"
Sample JSON Response¶
{
"status": "success",
"data": [
{
"invoice_no": "INV12345",
"date": "2025-04-01",
"customer": "Acme Corp",
"amount": 1500.00
},
...
]
}
Tips & Notes¶
- 🔐 Keep your access token safe and never expose it in public repositories.
- 📅 Make sure
yearid
andcompid
match your current ERP setup. - 🧾 For large tables, consider using pagination (if supported).
- ❓ For any issues, contact MerciGlobal support or refer to the internal developer documentation.
Start accessing the wealth of ERP data today with MERCIGLOBAL Cloud ERP! 🌐✨