REST API Reference
Interact with SaleviaCon programmatically. Our RESTful API gives you full access to orders, customers, catalogs, broadcasts, analytics, and messaging — all over HTTPS with JSON responses.
API Key Authentication
All API requests require an API key sent via the X-API-Key header. You can generate and manage API keys from yourdashboard settings.
X-API-Key: sk_live_abc123def456Keep your API keys secure. Never share them in client-side code or public repositories. Rotate keys regularly from the dashboard.
Base URL
All endpoints are relative to the following base URL:
https://api.saleviacon.com/v1All requests must use HTTPS. HTTP requests will be rejected.
Available Endpoints
The following endpoints are available in the current API version:
| Method | Endpoint | Description |
|---|---|---|
| GET | /orders | List all orders |
| GET | /orders/:id | Get order details |
| POST | /orders | Create order |
| GET | /customers | List customers |
| GET | /products | List catalog products |
| POST | /broadcasts | Send broadcast |
| GET | /analytics | Get analytics |
| POST | /messages/send | Send message |
Quick Start Example
Fetch all orders using cURL:
curl https://api.saleviacon.com/v1/orders \ -H "X-API-Key: sk_live_abc123def456"
Expected response (JSON):
{
"data": [
{
"id": "ord_2aK3bL8mN",
"customer": "cus_5xR7tP2qW",
"status": "completed",
"total": 4500,
"currency": "PKR",
"items": [
{ "product": "prod_9yU1iK4jH", "qty": 2, "price": 2250 }
],
"created_at": "2026-07-22T10:30:00Z"
}
],
"meta": { "total": 42, "page": 1, "per_page": 20 }
}Rate Limits
API requests are rate-limited to 100 requests per minute per API key. Exceeding this limit returns a 429 Too Many Requests response.
Rate limit headers are included in every response:
X-RateLimit-Limit: 100 X-RateLimit-Remaining: 87 X-RateLimit-Reset: 1712345678
Error Responses
The API uses conventional HTTP status codes to indicate success or failure. Errors return a JSON body with a message field.
| Code | Status | Description |
|---|---|---|
| 400 | Bad Request | Invalid request body or parameters. |
| 401 | Unauthorized | Missing or invalid API key. |
| 404 | Not Found | The requested resource does not exist. |
| 429 | Rate Limited | Too many requests. Slow down. |
| 500 | Server Error | Something went wrong on our end. |
{
"error": {
"code": "unauthorized",
"message": "Invalid or expired API key. Check the X-API-Key header."
}
}Get Your API Key
Ready to integrate? Generate your API key from the dashboard and start building.
Get Your API Key →