Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sellfern.com/llms.txt

Use this file to discover all available pages before exploring further.

The Sellfern API lets you automate workflows, build integrations, and query business data programmatically using standard HTTP requests and JSON. You can list and update orders, pull revenue and profit summaries, manage the fulfillment queue, and register webhook endpoints — all from scripts, agents, or third-party platforms.

Base URL

All API requests are made to the following base URL:
https://api.sellfern.com

Quick start

Create an API token in Settings → API Tokens, then make your first request:
curl -X GET "https://api.sellfern.com/api/v2/analytics/summary?period=last_7_days" \
  -H "Authorization: Bearer sk_live_YOUR_TOKEN_HERE"
Expected response:
{
  "success": true,
  "data": {
    "period": "last_7_days",
    "start_date": "2026-04-19",
    "end_date": "2026-04-26",
    "revenue": 12450.00,
    "order_count": 87,
    "cogs": 6225.00,
    "gross_profit": 6225.00,
    "margin_pct": 50.0
  },
  "meta": { "request_id": "req_abc123" }
}

API versioning

All endpoints documented here are versioned under /api/v2/. The version prefix appears in every path:
https://api.sellfern.com/api/v2/orders
https://api.sellfern.com/api/v2/analytics/summary
https://api.sellfern.com/api/v2/fulfillment/queue
https://api.sellfern.com/api/v2/webhooks

Request format

  • GET requests — pass filters and options as query string parameters.
  • POST and PATCH requests — send a JSON body and include the Content-Type: application/json header.
  • Idempotency — write endpoints (POST, PATCH) accept an optional Idempotency-Key header. Send the same key on retries to prevent duplicate operations.

Response format

Every response includes a success boolean. Successful responses wrap the result in a data field. Error responses include an error object with a code and message.
{
  "success": true,
  "data": { ... },
  "meta": { "request_id": "req_abc123" }
}
Error shape:
{
  "success": false,
  "error": {
    "code": "missing_scope",
    "message": "Token lacks the required scope for this endpoint."
  }
}

Rate limiting

All API requests are subject to rate limiting enforced per token. When you exceed the limit, the API returns 429 Too Many Requests. Slow down and retry after a brief pause. You can also set a dailyQuota when creating a token to cap its daily call volume.

OpenAPI spec

The machine-readable OpenAPI specification is available at:
GET https://api.sellfern.com/api/openapi.json
You can also browse it interactively at /api-docs.

Resources

Orders

List, filter, and update orders. Perform bulk status updates and add notes.

Analytics

Query revenue, COGS, gross profit, and margin summaries by period or store.

Fulfillment

Retrieve the fulfillment queue and assign suppliers to orders.

Webhooks

Register and manage webhook endpoints to receive real-time event notifications.
Every API token is scoped to specific capabilities. A token without the required scope returns 403 missing_scope. See the Authentication and Scopes pages for details on creating tokens and choosing the right scopes.