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.

Use this guide when you are building a server-side integration, automation, or AI agent that talks to Sellfern’s public V1 API.

1. Create an API key

Create a scoped API key inside Sellfern. Use the minimum scopes needed for your workflow.

2. Store the key securely

Store the key in an environment variable on your server or automation runner.
export SELLFERN_API_KEY="your_api_key_here"
Never commit API keys to source control, logs, client-side JavaScript, or prompts shared with third-party tools.

3. Send a request

curl https://api.sellfern.com/orders \
  -H "x-api-key: $SELLFERN_API_KEY"

4. Confirm organization isolation

Every response is scoped to the organization attached to the API key. API keys must not expose or mutate another organization’s data. If you request a resource outside that organization, Sellfern returns 404 not_found instead of revealing cross-organization ownership.

5. Add idempotency keys for writes

For public POST, PUT, PATCH, and DELETE requests, include an Idempotency-Key header and retry uncertain network or 5xx failures with the same key. The endpoint below is illustrative. Use the V1 API Reference to confirm which write endpoints are available for your integration.
curl https://api.sellfern.com/products \
  -H "x-api-key: $SELLFERN_API_KEY" \
  -H "Idempotency-Key: product-create-001" \
  -H "Content-Type: application/json" \
  -d '{"sku":"TSHIRT-BLACK-M","title":"Classic T-Shirt"}'
Reusing the same key with a different request returns 422 idempotency_conflict.

6. Use the API Reference as the source of truth

The API Reference is generated from Sellfern’s curated public V1 OpenAPI spec. If an endpoint is not present there, treat it as unavailable for public integrations.