API Reference
ERPX provides a comprehensive REST API for integrating with external systems, automating workflows, and building custom applications.
The API follows RESTful conventions with JSON request/response bodies. All endpoints require authentication.
Base URL
https://your-instance.erpx.io/api/v1Quick Start
# Authenticate and get a token
TOKEN=$(curl -s -X POST https://your-instance.erpx.io/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"admin@yourcompany.com","password":"your-password"}' \
| jq -r '.token')
# Fetch items
curl -s https://your-instance.erpx.io/api/v1/items \
-H "Authorization: Bearer $TOKEN" \
| jq .API Sections
Rate Limits
| Plan | Requests/Minute | Requests/Day |
|---|---|---|
| Free | 60 | 10,000 |
| Pro | 300 | 100,000 |
| Enterprise | 1,000 | Unlimited |
Rate limit headers are included in every response:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 1704067200Response Format
All API responses follow a consistent format:
Success Response
{
"success": true,
"data": {},
"meta": {
"page": 1,
"perPage": 20,
"total": 150,
"totalPages": 8
}
}Error Response
{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid input data",
"details": [
{
"field": "email",
"message": "Email is required"
}
]
}
}HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created |
204 | No Content (successful delete) |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
422 | Validation Error |
429 | Rate Limit Exceeded |
500 | Internal Server Error |