Skip to content

API Reference

The Ned AI REST API provides programmatic access to your Shopify analytics.

Base URL

https://api.meetned.com/api/v1

Authentication

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

EndpointDescription
GET /sales/analyticsSales summary with metrics
GET /sales/dailyDaily breakdown
GET /sales/forecastRevenue forecast

View Sales API →

Profitability

EndpointDescription
GET /profitability/summaryProfit metrics summary
GET /profitability/productsProduct-level profitability

View Profitability API →

Customers

EndpointDescription
GET /customers/summaryCustomer profit summary
GET /customers/segmentsCustomer segmentation

View Customers API →

Marketing

EndpointDescription
GET /marketing/metricsMER, CAC, ROAS metrics
GET /marketing/adsAd performance data

View Marketing API →

Common Parameters

Period

Most endpoints accept a period parameter:

?period=today
?period=last_7_days
?period=this_month

Available values:

  • today, yesterday
  • this_week, last_week, last_7_days
  • this_month, last_month, last_30_days
  • this_quarter, last_quarter
  • this_year, last_year

Pagination

List endpoints support pagination:

?limit=50&offset=0
  • limit: 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

CodeDescription
200Success
400Bad request (invalid parameters)
401Unauthorized (invalid or missing API key)
403Forbidden (feature not available on your tier)
429Rate limit exceeded
500Server error

Rate Limits

PlanRequests/Minute
Scale60

Rate limit headers are included in every response:

Ratelimit: limit=60, remaining=58, reset=45
Ratelimit-Policy: 60;w=60

Built with ❤️ by Ned AI