API Datafetch
Accessing Data from MERCIGLOBAL Cloud ERP
This guide explains how to retrieve data from MERCIGLOBAL Cloud ERP using its Data API. Whether you're a customer, developer, or sales team member, this document helps you understand and implement data extraction efficiently.
How to Extract Data
To fetch data from MERCIGLOBAL Cloud ERP tables, you will use a specific API endpoint. The API supports both POST and GET methods.
API Endpoint
https://devx.merciglobal.com/apis/dataapi.php
Required Parameters
Include the following parameters in your request:
Parameter | Description | Required | Example |
---|---|---|---|
req |
Type of API request | Yes | getdata |
project |
ERP project name | Yes | my_erp_project |
accesstoken |
Authentication token | Yes | abc123xyz789 |
yearid |
Financial year identifier | Yes | 2024 |
compid |
Company identifier | Yes | 101 |
table |
ERP table name to extract from | Yes | sales_invoice |
Example API Request
Using cURL (POST Request)
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 & Best Practices
- Secure your access token and avoid exposing it in client-side code or public repositories.
- Verify that
yearid
andcompid
align with your ERP project configuration. - For large datasets, implement pagination (if supported).
- Refer to internal documentation or contact Merciglobal support for technical assistance.
Start harnessing the power of your ERP data with MERCIGLOBAL Cloud ERP today.