SelldoesAPI Docs
Back to site

REST API Documentation

Use the Selldoes API to programmatically manage your products and categories. All endpoints require authentication via your session cookie.

Products

Manage your product catalog

GET/api/products?storeId={storeId} Auth required

Retrieve all products for a store, or a single product by ID.

Query Parameters

FieldTypeRequiredDefaultDescription
storeIdnumberYesΓÇöStore ID to list products for
idnumberNoΓÇöProduct ID ΓÇö if provided, returns a single product
Example curl
curl http://localhost:9582/api/products?storeId=1
GET/api/products?id={id} Auth required

Retrieve a single product by its ID.

FieldTypeRequiredDefaultDescription
idnumberYesΓÇöProduct ID
curl http://localhost:9582/api/products?id=42
POST/api/products Auth required

Create a new product. If a product with the same SKU exists, it will be updated instead (upsert).

Request Body

FieldTypeRequiredDefaultDescription
namestringYesΓÇöProduct name
skustringYesΓÇöUnique SKU identifier (used for upsert)
storeIdnumberNo1Store ID
pricestringNo0Product price
descriptionstringNoΓÇöProduct description
categorystringNo""Category name
categoryIdnumberNoΓÇöCategory ID from store_categories
stocknumberNo0Stock quantity
statusstringNo"active"Product status (active, draft, archived)
imagestringNoΓÇöMain product image URL
mainImagestringNoΓÇöAdditional main image URL
bulletpointsstringNoΓÇöBullet points (JSON array string)
productNotesstringNoΓÇöInternal product notes
subCategorystringNoΓÇöSubcategory name
screenshotsstringNoΓÇöScreenshots (JSON array string)
videoURLstringNoΓÇöProduct video URL
downloadLinkstringNoΓÇöDigital download link
deliveryInstructionsstringNoΓÇöDelivery instructions
variationGroupsstringNoΓÇöVariation groups (JSON string)
customAttributesstringNoΓÇöCustom attributes (JSON string)
isDigitalbooleanNofalseWhether this is a digital product
hiddenbooleanNofalseHide from storefront
Example
curl -X POST http://localhost:9582/api/products \
  -H "Content-Type: application/json" \
  -d '{
    "storeId": 1,
    "name": "Wireless Headphones",
    "sku": "WH-001",
    "price": "79.99",
    "description": "Premium wireless headphones with noise cancellation",
    "category": "Electronics",
    "categoryId": 3,
    "stock": 150,
    "status": "active",
    "image": "https://example.com/headphones.jpg",
    "isDigital": false
  }'
POST/api/products?action=delete Auth required

Delete a single product by ID.

FieldTypeRequiredDefaultDescription
idnumberYesΓÇöProduct ID to delete
curl -X POST "http://localhost:9582/api/products?action=delete" \
  -H "Content-Type: application/json" \
  -d '{"id": 42}'
POST/api/products?action=bulk-status Auth required

Update status for multiple products at once.

FieldTypeRequiredDefaultDescription
idsnumber[]YesΓÇöArray of product IDs
statusstringYesΓÇöNew status (active, draft, archived)
curl -X POST "http://localhost:9582/api/products?action=bulk-status" \
  -H "Content-Type: application/json" \
  -d '{"ids": [42, 43, 44], "status": "archived"}'
POST/api/products?action=bulk-delete Auth required

Delete multiple products at once.

FieldTypeRequiredDefaultDescription
idsnumber[]YesΓÇöArray of product IDs to delete
curl -X POST "http://localhost:9582/api/products?action=bulk-delete" \
  -H "Content-Type: application/json" \
  -d '{"ids": [42, 43, 44]}'

Categories

Organize products with categories and subcategories

GET/api/categories?storeId={storeId} Auth required

Retrieve all categories for a store, ordered by sort order.

Query Parameters

FieldTypeRequiredDefaultDescription
storeIdnumberYesΓÇöStore ID
curl http://localhost:9582/api/categories?storeId=1
POST/api/categories Auth required

Create a new category.

Request Body

FieldTypeRequiredDefaultDescription
storeIdnumberYesΓÇöStore ID
namestringYesΓÇöCategory name
slugstringYesΓÇöURL-friendly slug
descriptionstringNoΓÇöCategory description
imagestringNoΓÇöCategory image URL
iconstringNoΓÇöIcon name (e.g. Star)
sortOrdernumberNo0Display order
parentIdnumberNoΓÇöParent category ID for subcategories
curl -X POST http://localhost:9582/api/categories \
  -H "Content-Type: application/json" \
  -d '{
    "storeId": 1,
    "name": "Electronics",
    "slug": "electronics",
    "description": "All electronic products",
    "sortOrder": 10
  }'
PATCH/api/categories/{id} Auth required

Update an existing category's fields.

Request Body

FieldTypeRequiredDefaultDescription
storeIdnumberYesΓÇöStore ID
namestringNoΓÇöNew name
slugstringNoΓÇöNew slug
descriptionstringNoΓÇöNew description
imagestringNoΓÇöNew image URL
iconstringNoΓÇöIcon name (e.g. Star)
sortOrdernumberNoΓÇöNew sort order
visiblebooleanNoΓÇöVisibility toggle
parentIdnumberNoΓÇöNew parent category ID
curl -X PATCH "http://localhost:9582/api/categories/5" \
  -H "Content-Type: application/json" \
  -d '{
    "storeId": 1,
    "name": "Electronics & Gadgets",
    "sortOrder": 5
  }'
DELETE/api/categories/{id}?storeId={storeId} Auth required

Delete a category by ID.

FieldTypeRequiredDefaultDescription
storeIdnumberYesΓÇöStore ID (query param)
curl -X DELETE "http://localhost:9582/api/categories/5?storeId=1"
POST/api/categories/reorder Auth required

Reorder categories by batch-updating sort orders.

FieldTypeRequiredDefaultDescription
storeIdnumberYesΓÇöStore ID
itemsarrayYesΓÇöArray of {id, sortOrder} objects
curl -X POST "http://localhost:9582/api/categories/reorder" \
  -H "Content-Type: application/json" \
  -d '{
    "storeId": 1,
    "items": [
      {"id": 1, "sortOrder": 0},
      {"id": 2, "sortOrder": 10},
      {"id": 3, "sortOrder": 20}
    ]
  }'
POST/api/categories/bulk-delete Auth required

Delete multiple categories at once.

FieldTypeRequiredDefaultDescription
storeIdnumberYesΓÇöStore ID
idsarrayYesΓÇöArray of category IDs to delete
curl -X POST "http://localhost:9582/api/categories/bulk-delete" \
  -H "Content-Type: application/json" \
  -d '{"storeId": 1, "ids": [5, 6, 7]}'
GET/api/categories/product-counts?storeId={storeId} Auth required

Number of products linked to each category.

curl "http://localhost:9582/api/categories/product-counts?storeId=1"

External API

Programmatic product import via API key

POST/api/external/products

Create or update a product (upsert by SKU). Authenticated via x-api-key header — generate a key in Dashboard → Settings → API Keys.

Authentication: x-api-key: sk_...

FieldTypeRequiredDefaultDescription
namestringYesΓÇöProduct name
skustringYesΓÇöUnique SKU (used for upsert)
pricestringNo"0.00"Product price
descriptionstringNoΓÇöProduct description
imagestringNoΓÇöMain image URL
categorystringNoΓÇöCategory name (auto-created if new)
status"draft" | "active"No"active"Product status on creation/update
attributesobjectNoΓÇöKey-value attributes, e.g. {"sampleLink":"...","volumes":"..."}
curl -X POST "http://localhost:9582/api/external/products" \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_abc123..." \
  -d '{
    "name": "The Jack Benny Program Vol 1",
    "sku": "OTR-12345",
    "price": "9.99",
    "description": "Classic radio comedy episodes...",
    "category": "Comedy",
    "attributes": {
      "sampleLink": "https://example.com/audio.mp3",
      "totalPlaytime": "6 hours 30 min"
    }
  }'
GET/api/external/products

Check whether a SKU exists (or list every SKU). Pass full=1 to get the full product row back.

FieldTypeRequiredDefaultDescription
skustringNoΓÇöSKU to look up
full"1"NoΓÇöReturn the product row (id, name, price, status, categories, attributes, variants) next to exists
list"all"NoΓÇöReturn every SKU in the store as { skus: [...] }
storeIdnumberNoΓÇöTarget store (defaults to the key owner's first store)
curl "http://localhost:9582/api/external/products?sku=OTR-12345&full=1" \
  -H "x-api-key: sk_abc123..."
GET/api/external/ai/prompts

List the store's saved AI prompts (Dashboard → AI Prompts) plus the system defaults — lets plugins and API clients offer prompt pickers instead of hard-coded prompt ids.

FieldTypeRequiredDefaultDescription
type"text" | "image"NoΓÇöFilter by prompt type (omit for all)
storeIdnumberNoΓÇöTarget store (defaults to the key owner's first store)

Response: { prompts: [{ id, name, description, type, field, template, provider, model, isDefault, aspectRatio }] }

curl "http://localhost:9582/api/external/ai/prompts?type=image" \
  -H "x-api-key: sk_abc123..."

Response Codes

Standard HTTP status codes used by the API

CodeDescription
200Success ΓÇö request completed
201Created ΓÇö resource was created
400Bad Request ΓÇö missing or invalid parameters
401Unauthorized ΓÇö authentication required
404Not Found ΓÇö resource does not exist
500Internal Server Error