API Reference
The Ned AI REST API provides programmatic access to your Shopify analytics.
Base URL
https://api.meetned.com/api/v1Authentication
All requests require a Bearer token in the Authorization header:
bash
curl -H "Authorization: Bearer ned_live_YOUR_KEY" \
"https://api.meetned.com/api/v1/sales/analytics"See Authentication for details on creating and managing API keys.
Endpoints
Sales
| Endpoint | Description | Tier |
|---|---|---|
GET /sales/analytics | Sales summary with metrics | Essential+ |
GET /sales/daily | Daily breakdown | Essential+ |
GET /sales/forecast | Revenue forecast | Growth+ |
Profitability
| Endpoint | Description | Tier |
|---|---|---|
GET /profitability/summary | Profit metrics summary | Essential+ |
GET /profitability/products | Product-level profitability | Essential+ |
Customers
| Endpoint | Description | Tier |
|---|---|---|
GET /customers/summary | Customer profit summary | Essential+ |
GET /customers/segments | Customer segmentation | Essential+ |
Marketing
| Endpoint | Description | Tier |
|---|---|---|
GET /marketing/metrics | MER, CAC, ROAS metrics | Essential+ |
GET /marketing/ads | Ad performance data | Essential+ |
Common Parameters
Period
Most endpoints accept a period parameter:
?period=today
?period=last_7_days
?period=this_monthAvailable values:
today,yesterdaythis_week,last_week,last_7_daysthis_month,last_month,last_30_daysthis_quarter,last_quarterthis_year,last_year
Pagination
List endpoints support pagination:
?limit=50&offset=0limit: Number of results (default: 50, max: 100)offset: Number of results to skip
Response Format
All responses are JSON with this structure:
Success Response
json
{
"data": { ... },
"meta": {
"period": "last_7_days",
"generated_at": "2025-02-04T12:00:00Z"
}
}Error Response
json
{
"error": "error_code",
"message": "Human-readable description"
}HTTP Status Codes
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Bad request (invalid parameters) |
| 401 | Unauthorized (invalid or missing API key) |
| 403 | Forbidden (feature not available on your tier) |
| 429 | Rate limit exceeded |
| 500 | Server error |
Rate Limits
Rate limits vary by subscription tier:
| Tier | Requests/Minute |
|---|---|
| Essential | 30 |
| Growth | 60 |
| Scale | 120 |
Rate limit headers are included in every response:
Ratelimit: limit=60, remaining=58, reset=45
Ratelimit-Policy: 60;w=60