Appearance
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 |
|---|---|
GET /sales/analytics | Sales summary with metrics |
GET /sales/daily | Daily breakdown |
GET /sales/forecast | Revenue forecast |
Profitability
| Endpoint | Description |
|---|---|
GET /profitability/summary | Profit metrics summary |
GET /profitability/products | Product-level profitability |
Customers
| Endpoint | Description |
|---|---|
GET /customers/summary | Customer profit summary |
GET /customers/segments | Customer segmentation |
Marketing
| Endpoint | Description |
|---|---|
GET /marketing/metrics | MER, CAC, ROAS metrics |
GET /marketing/ads | Ad performance data |
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
| Plan | Requests/Minute |
|---|---|
| Scale | 60 |
Rate limit headers are included in every response:
Ratelimit: limit=60, remaining=58, reset=45
Ratelimit-Policy: 60;w=60
