API Documentation
Learn how to integrate with the Mercozy API to manage products, orders, inventory, and more.
Getting Started
1
Get your API key
Log in as an Admin and go to Settings > Integration > API Keys to generate a new key. Only Admin users have permission.
2
Include in requests
Add the X-API-Key header to all your API requests.
3
Start making requests
Use any HTTP client to interact with the Mercozy API endpoints.
Authentication
All API requests require a valid API key sent via the X-API-Key header.
bash
curl https://api.mercozy.com/api/v1/external/products \
-H "X-API-Key: mk_live_your_key_here"Base URL
https://api.mercozy.com/api/v1/externalRate Limits
API rate limits depend on your subscription plan.
| Plan | Rate Limit | API Access |
|---|---|---|
| Free / Standard | No API access | No |
| Pro | 300 req/min | Yes |
| Business | 1,000 req/min | Yes |
Response Format
All responses are returned in JSON format.
Success Response
json
{
"data": [
{
"id": "prod_abc123",
"name": "Premium Widget",
"price": 2999,
"currency": "USD"
}
],
"meta": {
"total": 42,
"page": 1,
"limit": 20
}
}Error Response
json
{
"statusCode": 401,
"message": "Invalid API key",
"error": "Unauthorized"
}Error Codes
| Code | Status | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Invalid request parameters |
UNAUTHORIZED | 401 | Invalid or missing API key |
FORBIDDEN | 403 | Insufficient permissions |
NOT_FOUND | 404 | Resource not found |
CONFLICT | 409 | Resource already exists or conflict |
RATE_LIMITED | 429 | Too many requests |
INTERNAL_ERROR | 500 | Internal server error |