Connector (API Access)
The Connector gives you programmatic access to Dynasort through a REST-style API. You can use it to connect AI assistants like Claude or ChatGPT, build custom integrations, or automate merchandising workflows, all without touching the Dynasort dashboard. It covers collection sorting, option sorting, search re-ranking, product recommendations, and post-purchase offers.
Getting started
Section titled “Getting started”Open Connector from the left sidebar in the Dynasort app.

The page has three sections: API Key management, a System Prompt for AI assistants, and an API Reference card.
Generate an API key
Section titled “Generate an API key”Click Generate API Key to create a new key. The full key is displayed exactly once: copy it immediately and store it somewhere safe. Dynasort only stores a hash of the key, so it cannot be retrieved later.
Your key starts with dyn_sk_ followed by a long hex string. Only one active key is allowed at a time. If you need a new one, revoke the current key first, then generate a fresh one.
Using with AI assistants
Section titled “Using with AI assistants”The fastest way to use the Connector is to paste the System Prompt into an AI assistant. The prompt contains your store URL, the API endpoint, authentication instructions, and a complete reference for every available action, everything the assistant needs to manage your Dynasort setup through conversation.
To set up an AI assistant:
- Click Copy Prompt on the Connector page.
- Open your AI assistant (Claude, ChatGPT, or similar).
- Paste the prompt as a system message or at the start of a new conversation.
- When the assistant asks for your API key, provide the
dyn_sk_...key you generated earlier.
From there, you can ask the assistant to do things like “list my collections,” “enable sorting on the Summer Sale collection,” or “boost product X by 50 points” and it will make the API calls for you.
Using the API directly
Section titled “Using the API directly”If you’re building a custom integration, you can call the API directly.
Endpoint: https://dynasort.immersiveecommerce.com/api/v1/
All requests are POST with a JSON body. Authenticate with a Bearer token:
curl -X POST https://dynasort.immersiveecommerce.com/api/v1/ \ -H "Authorization: Bearer dyn_sk_your_key_here" \ -H "Content-Type: application/json" \ -d '{"action": "list_collections"}'Rate limits
Section titled “Rate limits”The API allows 60 requests per minute per store. Every response includes rate limit headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute (60) |
X-RateLimit-Remaining | Requests remaining in the current window |
X-RateLimit-Reset | Unix timestamp when the window resets |
If you exceed the limit, the API returns HTTP 429 with a Retry-After header.
Response format
Section titled “Response format”Every response is JSON. A successful call returns success: true and the result under data:
{ "success": true, "data": { ... }}A failed call returns an HTTP error status with error: true, a readable message, and a stable code:
{ "error": true, "message": "collection_id not found in this store. Use list_collections to find one.", "code": "not_found"}| Error code | HTTP status | Meaning |
|---|---|---|
unauthorized | 401 | Invalid, revoked, or missing API key |
permission_denied | 403 | API access is not enabled for this store |
invalid_params | 400 | Missing or invalid parameters, or an ID of the wrong kind (for example a search recipe where a collection recipe is expected) |
invalid_action | 400 | Unknown action name |
not_found | 404 | The collection or product ID does not exist in your store |
conflict | 409 | The change is blocked by another feature, for example a collection that is on a sort rotation |
rate_limited | 429 | Too many requests. Retry after the Retry-After seconds |
server_error | 500 | Internal error |
Available actions
Section titled “Available actions”
The API exposes 27 actions organized into seven categories.
Collection management
Section titled “Collection management”| Action | Description |
|---|---|
list_collections | List all collections with their sorting status, recipe assignment, and product count |
get_collection | Get detailed info about a single collection, including its rules and recent performance windows |
enable_collection | Enable Dynasort sorting on a collection |
disable_collection | Disable sorting on a collection (reverts to configured sort order if set) |
update_collection | Assign a recipe and/or set the revert sort order for a collection |
bulk_toggle_collections | Enable or disable multiple collections at once |
bulk_assign_recipe | Assign a recipe to multiple collections at once |
sort_collection | Trigger an immediate sort using the assigned recipe |
revert_collection | Revert a collection to its configured revert sort order |
Collection performance
Section titled “Collection performance”| Action | Description |
|---|---|
get_insights | Collection performance from the nightly rollup, split by whether Dynasort was sorting each collection on each day |
Recipe management
Section titled “Recipe management”| Action | Description |
|---|---|
list_recipes | List the recipes of one type: collection (default), recommendation, or search |
Product management
Section titled “Product management”| Action | Description |
|---|---|
list_products | List products, a page at a time, with their boost values, option sorting status, and options |
get_product | Get detailed info about a single product including its options |
set_product_boost | Set a boost value on a product (positive = boost up, negative = push down) |
enable_product | Enable option sorting on a product and configure sort rules for each option |
disable_product | Disable option sorting on a product |
sort_product | Trigger an immediate re-sort of a product’s options |
Search re-ranking
Section titled “Search re-ranking”| Action | Description |
|---|---|
get_search_serving | Get search serving status: recipes, the active recipe, storefront connection, display settings |
set_search_recipe | Set the active search recipe (0 turns search re-ranking off) |
update_search_settings | Update the search results display settings (partial update) |
connect_search_storefront | Provision the Storefront API token search serving needs |
get_search_query_report | What shoppers searched for, with the queries that found nothing or almost nothing |
Recommendations and post-purchase
Section titled “Recommendations and post-purchase”| Action | Description |
|---|---|
list_placements | List all recommendation placements with their bound recipe, enabled flag, and settings |
update_placement | Update one placement’s recipe, enabled flag, label, or settings (partial update) |
Serving status and analytics
Section titled “Serving status and analytics”| Action | Description |
|---|---|
get_serving_status | One-call overview: search, placements, post-purchase, and quota state |
get_serve_stats | Daily serves, clicks, adds, and checkouts for one search or recommendation recipe |
get_serve_usage | Monthly serve usage against your plan quota |
Action reference
Section titled “Action reference”Every action is sent as a JSON body with an "action" field. Below are the parameters for each, followed by an example response.
list_collections
Section titled “list_collections”{ "action": "list_collections" }| Parameter | Required | Description |
|---|---|---|
query | No | Only return collections whose title contains this text |
sort | No | name-asc, name-desc, date-asc, date-desc, count-asc, or count-desc (product count). By default the collections Dynasort picked up most recently come first |
Returns every collection with its ID, title, handle, product count, assigned recipe, revert sort order, enabled flag, and when it was last sorted. collection_ids lists every ID in the same order.
Example response:
{ "success": true, "data": { "collections": [ { "id": "123456789", "name": "Summer Sale", "handle": "summer-sale", "productCount": "84", "metricId": "1", "metricName": "Best Sellers", "revertSorting": "best-selling", "enabled": "1", "lastSorted": "12 minutes ago", "isSorting": false, "managed": 0, "abTestStatus": null, "rotationStatus": null }, { "id": "987654321", "name": "New Arrivals", "handle": "new-arrivals", "productCount": "40", "metricId": "1", "metricName": "Best Sellers", "revertSorting": "created-desc", "enabled": "0", "lastSorted": "never sorted", "isSorting": false, "managed": 0, "abTestStatus": null, "rotationStatus": null } ], "collection_ids": ["123456789", "987654321"] }}abTestStatus and rotationStatus are set when the collection is in an A/B test or on a sort rotation. managed is 1 for collections Dynasort builds and maintains itself.
get_collection
Section titled “get_collection”{ "action": "get_collection", "collection_id": 123456789 }| Parameter | Required | Description |
|---|---|---|
collection_id | Yes | Shopify collection ID |
Returns the collection’s configuration, its Shopify rules (rule_set, for smart collections), and its recent performance windows. insights has one entry per window (1, 3, 7, and 30 days); the rates are percentages, and each delta_ field is the percent change in that rate against the previous window of the same length (null when the previous window had nothing to compare).
Example response:
{ "success": true, "data": { "collection": { "collection_id": "123456789", "title": "Summer Sale", "handle": "summer-sale", "type": "smart", "enabled": "1", "metrics_id": "1", "metrics_name": "Best Sellers", "current_sorting": "manual", "revert_sorting": "best-selling", "products_count": "84", "rule_set": { "appliedDisjunctively": false, "rules": [ { "column": "TAG", "relation": "EQUALS", "condition": "summer" } ] }, "created_at": "2026-08-11 19:22:46", "last_run": "2026-11-10 15:40:20", "last_run_display": ["12", "minutes", "ago"], "is_sorting": "0" }, "managed": false, "insights": [ { "days": "7", "updated": "2026-11-10 11:50:02", "object": { "enabled": "1", "metrics_id": "1", "views": 1240, "in_sessions": 986, "cart_sessions": 91, "converted_sessions": 14, "exits": 310, "bounces": 244, "cx": 1.42, "cartx": 9.23, "exitx": 31.44, "bouncex": 24.75, "delta_cx": 12.7, "delta_cartx": -6.1, "delta_exitx": 3.8, "delta_bouncex": -1.6, "products": [ { "product_id": "123456789", "title": "Classic Tee", "clicks": 64 } ] } } ], "option_names": ["Color", "Size"] }}In insights, cx is the conversion rate, cartx the add-to-cart rate, exitx the exit rate, and bouncex the bounce rate. products lists the most-clicked products in the window. An unknown ID returns 404 not_found.
enable_collection / disable_collection
Section titled “enable_collection / disable_collection”{ "action": "enable_collection", "collection_id": 123456789 }| Parameter | Required | Description |
|---|---|---|
collection_id | Yes | Shopify collection ID |
Example response:
{ "success": true, "data": { "status": "ok", "collection_id": "123456789", "enabled": "1" }}disable_collection returns the same shape with "enabled": "0". A collection on a sort rotation can’t be toggled by hand and returns 409 conflict until the rotation is stopped.
update_collection
Section titled “update_collection”{ "action": "update_collection", "collection_id": 123456789, "metrics_id": 1, "revert_sorting": "best-selling"}| Parameter | Required | Description |
|---|---|---|
collection_id | Yes | Shopify collection ID |
metrics_id | Yes | Collection recipe ID to assign (use list_recipes to find IDs) |
revert_sorting | No | Sort order to revert to when disabled. Options: manual, best-selling, alpha-asc, alpha-desc, price-asc, price-desc, created-desc, created-asc. Leave it out to keep the current value |
Example response:
{ "success": true, "data": { "collection_id": "123456789", "title": "Summer Sale", "enabled": "1", "metrics_id": "1", "metrics_name": "Best Sellers", "revert_sorting": "best-selling" }}A metrics_id that isn’t one of your collection recipes returns 400 invalid_params and changes nothing.
bulk_toggle_collections
Section titled “bulk_toggle_collections”{ "action": "bulk_toggle_collections", "collection_ids": [123456789, 987654321], "status": 1}| Parameter | Required | Description |
|---|---|---|
collection_ids | Yes | Array of Shopify collection IDs |
status | Yes | 1 to enable, 0 to disable |
Example response:
{ "success": true, "data": { "status": "ok", "skipped_rotating": 0 }}Collections on a sort rotation are left alone. When every collection you sent is on a rotation, skipped_rotating reports how many were skipped.
bulk_assign_recipe
Section titled “bulk_assign_recipe”{ "action": "bulk_assign_recipe", "collection_ids": [123456789, 987654321], "metrics_id": 1, "revert_sorting": "best-selling"}| Parameter | Required | Description |
|---|---|---|
collection_ids | Yes | Array of Shopify collection IDs |
metrics_id | Yes | Collection recipe ID to assign |
revert_sorting | No | Revert sort order (same options as update_collection). Leave it out to keep each collection’s current value |
Example response:
{ "success": true, "data": { "status": "ok", "metrics_id": 1, "metrics_name": "Best Sellers" }}sort_collection
Section titled “sort_collection”{ "action": "sort_collection", "collection_id": 123456789 }Triggers an immediate sort. The collection must be enabled with a recipe assigned; otherwise the call returns 400 invalid_params. Large collections can take several seconds.
Example response:
{ "success": true, "data": { "action": "sort", "collection_id": "123456789", "metrics_id": "1", "products_ranked": 84, "last_sorted": "just now" }}products_ranked is the number of products placed in the new order.
revert_collection
Section titled “revert_collection”{ "action": "revert_collection", "collection_id": 123456789 }Reverts the collection to its configured revert sort order. This doesn’t disable sorting, so the next scheduled run sorts it again unless you also call disable_collection.
Example response:
{ "success": true, "data": { "action": "revert", "collection_id": "123456789", "revert_sorting": "best-selling", "reverted": true, "last_sorted": "12 minutes ago" }}reverted is false when there was nothing to change: the revert order is manual, or the collection isn’t currently in manual order in Shopify.
get_insights
Section titled “get_insights”Read-only collection performance from the nightly rollup, the same data as the Insights page. Every number is split by whether Dynasort was actually sorting that collection on that day, so you can compare sorted periods with unsorted ones.
{ "action": "get_insights", "view": "summary", "start_date": "2026-10-01", "end_date": "2026-10-31" }| Parameter | Required | Description |
|---|---|---|
view | No | summary (default), collections, daily, or recipes |
start_date / end_date | No | Range as YYYY-MM-DD. Data runs through yesterday and up to 365 days back |
days | No | Used instead of dates: the last N full days (default 30) |
collection_id | No | daily view only: one collection’s day-by-day series |
collection_ids | No | collections view only: array of IDs to restrict to |
sort_by | No | collections view only: sessions (default), conversion_rate, add_to_cart_rate, revenue, or views |
limit | No | collections view only: default 50, max 500 |
min_sessions | No | collections view only: default 1 |
Rates are pooled percentages (total events over total sessions). A session that viewed several collections counts once in each, so collection sessions run higher than store sessions in Shopify, and revenue should never be added up across collections.
Example response (summary):
{ "success": true, "data": { "view": "summary", "traffic": "shoppers", "range": { "start_date": "2026-10-01", "end_date": "2026-10-31", "days": 31 }, "data_starts": "2026-03-13", "rollup_missing_dates": [], "all_collections": { "views": 52410, "sessions": 41980, "cart_sessions": 4120, "add_to_cart_rate": 9.81, "converted_sessions": 402, "conversion_rate": 0.96, "exits": 15230, "exit_rate": 36.28, "bounces": 11870, "bounce_rate": 28.28 }, "while_sorted_by_dynasort": { "views": 40120, "sessions": 32210, "cart_sessions": 3380, "add_to_cart_rate": 10.49, "converted_sessions": 336, "conversion_rate": 1.04, "exits": 11240, "exit_rate": 34.9, "bounces": 8760, "bounce_rate": 27.2, "collections": 18 }, "while_not_sorted": { "views": 12290, "sessions": 9770, "cart_sessions": 740, "add_to_cart_rate": 7.57, "converted_sessions": 66, "conversion_rate": 0.68, "exits": 3990, "exit_rate": 40.84, "bounces": 3110, "bounce_rate": 31.83, "collections": 27 }, "collections_total": 45, "collections_sorted_now": 18, "sorted_now_with_assumed_history": 3 }}Example row (collections view):
{ "collection_id": 123456789, "title": "Summer Sale", "deleted": false, "sorted_now": true, "recipe_now": "Best Sellers", "days_sorted": 31, "days_not_sorted": 0, "sorted_status_source": "change_log", "views": 10731, "sessions": 8673, "cart_sessions": 634, "add_to_cart_rate": 7.31, "converted_sessions": 54, "conversion_rate": 0.62, "exits": 2874, "exit_rate": 33.14, "bounces": 2205, "bounce_rate": 25.42, "revenue": 18087.66}The collections view wraps its rows in collections, alongside collections_with_traffic and sort_by. When a collection was sorted on some days and not on others, its row also carries while_sorted and while_not_sorted with the same metrics for each period.
Example row (daily view with collection_id):
{ "date": "2026-10-07", "views": 322, "sessions": 238, "cart_sessions": 23, "add_to_cart_rate": 9.66, "converted_sessions": 4, "conversion_rate": 1.68, "exits": 60, "exit_rate": 25.21, "bounces": 48, "bounce_rate": 20.17, "revenue": 1978.81, "sorted_by_dynasort": true}The daily view returns one row per day in days (zero-filled), plus a collection object when you pass collection_id. Store-wide, each row instead carries sessions_in_sorted_collections, conversion_rate_sorted, sessions_in_unsorted_collections, and conversion_rate_unsorted. Both forms include changes, the configuration events in the range:
{ "date": "2026-10-12", "event": "recipe_changed", "entity_type": "collection", "entity_id": "123456789", "title": "Summer Sale", "from_recipe": "Best Sellers", "to_recipe": "New & Trending"}Example row (recipes view):
{ "recipe_id": 1, "name": "Best Sellers", "collections": 18, "views": 40120, "sessions": 32210, "cart_sessions": 3380, "add_to_cart_rate": 10.49, "converted_sessions": 336, "conversion_rate": 1.04, "exits": 11240, "exit_rate": 34.9, "bounces": 8760, "bounce_rate": 27.2}Reading the results:
rollup_missing_dateslists days with no data at all (a processing gap, not zero traffic). Leave them out of comparisons.sorted_status_sourceischange_logwhen the sorted and unsorted days are exact.assumed_current_statemeans no toggle history exists, so today’s state is assumed for the whole range;change_log_incompletemeans an unlogged change happened. Treat both as approximate.- Comparing sorted collections with unsorted ones compares different pages with different products and traffic. The same collection’s
while_sortedagainstwhile_not_sortedis the fairer comparison.
list_recipes
Section titled “list_recipes”{ "action": "list_recipes", "recipe_type": "collection" }| Parameter | Required | Description |
|---|---|---|
recipe_type | No | collection (default), recommendation, or search |
Returns the recipes of that type with their ID, name, attribute weights, and usage. Collection recipes report the number of collections using them in collections; search recipes include is_active marking the one currently re-ranking search results.
Example response:
{ "success": true, "data": { "metrics": [ { "id": "1", "name": "Best Sellers", "recipe_type": "collection", "attributes": [ { "id": "34441", "attribute_key": "sales-last-30-days", "attribute_name": "Sales (Last 30 Days)", "attribute_group": "data", "attribute_sub_group": "sales", "value": "100", "days": "30", "status": "1" }, { "id": "34448", "attribute_key": "inventory", "attribute_name": "Inventory", "attribute_group": "data", "attribute_sub_group": "inventory", "value": "40", "days": "30", "status": "1" } ], "collections": "18", "is_default": "1", "is_active": "0", "soldOutValue": "move-to-bottom", "tieBreakerValue": "best-selling", "treatContinueSellingAsInStock": false, "groupByFrame": false, "recommendationSource": "" } ], "default": "1" }}value is the attribute’s weight. default is the ID of the store’s default collection recipe (null for the other types). Recommendation recipes also carry recommendationSource, which says where candidates come from (for example whole-catalog).
list_products
Section titled “list_products”{ "action": "list_products", "page": 1, "per_page": 50 }| Parameter | Required | Description |
|---|---|---|
page | No | Page number, starting at 1 (default 1) |
per_page | No | Products per page, 1 to 200 (default 50) |
query | No | Only products whose title contains every word you send |
filter | No | all (default), enabled (option sorting on), disabled, or boosted (non-zero boost) |
sort_by | No | title for A to Z. By default the newest products come first |
Returns one page of products with boost values, option sorting status, and options. Keep requesting the next page while has_more is true.
Example response:
{ "success": true, "data": { "products": [ { "product_id": "123456789", "title": "Classic Tee", "handle": "classic-tee", "product_type": "T-Shirt", "image": "https://cdn.shopify.com/s/files/1/0000/0000/products/classic-tee.jpg", "enabled": "1", "boost": "0", "last_sorted": "2026-11-10 15:40:21", "last_run_display": ["12", "minutes", "ago"], "options": { "1": { "option": { "option_id": "111", "product_id": "123456789", "name": "Color", "position": "1", "settings": { "option_id": "111", "option_name": "Color", "sort_type": "sales", "sold_out": "move-to-last", "direction": "desc", "days": "30", "csv_pattern": "", "common_size": "" } }, "values": [ { "name": "Black", "option_position": "0", "pinned": null }, { "name": "Navy", "option_position": "1", "pinned": null }, { "name": "White", "option_position": "2", "pinned": null } ] } } } ], "page": 1, "per_page": 50, "total": 1531, "has_more": true, "option_sorting_enabled": 12 }}total counts the products matching your query and filter; option_sorting_enabled is the store-wide number of products with option sorting on. Options are keyed by position. An option only has settings once a sort rule has been saved for it, and values lists the option’s values in their current order.
get_product
Section titled “get_product”{ "action": "get_product", "product_id": 123456789 }Returns a single product in the same shape as a list_products entry, plus csv_patterns (custom orders saved for the comma_separated sort type). Use it to find the option_id and option_name values enable_product needs.
Example response:
{ "success": true, "data": { "product_id": "123456789", "title": "Classic Tee", "handle": "classic-tee", "product_type": "T-Shirt", "image": "https://cdn.shopify.com/s/files/1/0000/0000/products/classic-tee.jpg", "enabled": "0", "boost": "0", "last_sorted": null, "last_run_display": false, "options": { "1": { "option": { "option_id": "111", "product_id": "123456789", "name": "Color", "position": "1" }, "values": [ { "name": "Black", "option_position": "0", "pinned": null }, { "name": "Navy", "option_position": "1", "pinned": null } ] }, "2": { "option": { "option_id": "112", "product_id": "123456789", "name": "Size", "position": "2" }, "values": [ { "name": "S", "option_position": "0", "pinned": null }, { "name": "M", "option_position": "1", "pinned": null } ] } }, "csv_patterns": [] }}An unknown ID returns 404 not_found.
set_product_boost
Section titled “set_product_boost”{ "action": "set_product_boost", "product_id": 123456789, "boost": 50}| Parameter | Required | Description |
|---|---|---|
product_id | Yes | Shopify product ID |
boost | Yes | Integer added to the product’s ranking score. Positive = boost up, negative = push down, 0 = no boost |
Example response:
{ "success": true, "data": { "status": "ok", "product_id": "123456789", "boost": 50 }}The boost applies on the collection’s next sort. Call sort_collection to apply it right away.
enable_product
Section titled “enable_product”Enables option sorting on a product. Option sorting reorders the variant options (like Color or Size) within a single product based on performance data.
{ "action": "enable_product", "product_id": 123456789, "options": [ { "option_id": 111, "option_name": "Color", "sort_type": "sales", "sold_out": "bottom", "direction": "desc", "days": "30" } ]}| Parameter | Required | Description |
|---|---|---|
product_id | Yes | Shopify product ID |
options | No | Array of option sorting configurations (see below) |
Option configuration fields:
| Field | Required | Description |
|---|---|---|
option_id | Yes | The option ID from the product (use get_product to find these) |
option_name | Yes | The option name (e.g. “Color”, “Size”) |
sort_type | Yes | Sort method, see table below |
sold_out | No | Where to place sold-out variants: bottom (default), top, or ignore |
direction | No | Sort direction: desc (default) or asc |
days | No | Time window for sales/revenue sorts: 7, 30 (default), 60, 90, 365, or all |
csv_pattern | No | Custom order for comma_separated sort type (e.g. "Red,Blue,Green") |
common_size | No | Size system for common_sizes sort type (e.g. "us_apparel", "us_shoes") |
Available sort types:
| Sort type | What it sorts by |
|---|---|
off | No sorting for this option |
alphabetical | Alphabetical order |
sales | Units sold (within the time window) |
revenues | Revenue generated |
prices | Variant price |
compare_at_prices | Compare-at price |
costs | Cost per item |
inventories | Available inventory |
margins | Profit margin |
discount_amounts | Discount amount |
discount_percentages | Discount percentage |
numeric | Numeric value in the option name |
variant_ages | How recently the variant was added |
variants_in_stock | In-stock status |
comma_separated | Custom order defined by csv_pattern |
common_sizes | Standard size ordering (S, M, L, XL, etc.) |
Example response:
{ "success": true, "data": { "status": "ok" } }The options you send replace the product’s saved option rules. Call get_product afterwards to see them under each option’s settings.
disable_product
Section titled “disable_product”{ "action": "disable_product", "product_id": 123456789 }Disables option sorting on the product.
Example response:
{ "success": true, "data": { "status": "ok" } }sort_product
Section titled “sort_product”{ "action": "sort_product", "product_id": 123456789 }Triggers an immediate re-sort of the product’s options using its saved configuration. The product must be enabled with option sorting configured.
Example response:
{ "success": true, "data": { "status": "ok" } }If Shopify rejects the reorder, status is "error".
get_search_serving
Section titled “get_search_serving”{ "action": "get_search_serving" }Returns your search recipes, the active recipe ID, whether the storefront is connected, and the current display settings.
Search re-ranking needs three things to serve: an active search recipe, a storefront connection, and the Dynasort search blocks added to your theme in the theme editor. The API manages the first two; the theme step happens in the Shopify admin. See the search re-ranking guide for the theme setup.
Example response:
{ "success": true, "data": { "recipes": [ { "id": 42, "name": "Relevant & Popular", "is_active": 1 }, { "id": 43, "name": "In-Stock Bestsellers", "is_active": 0 } ], "active_recipe_id": 42, "storefront_connected": true, "settings": { "layout": { "columns": { "mobile": 2, "tablet": 3, "desktop": 4 }, "per_page": 24, "load_mode": "pagination" }, "fields": { "compare_at": true, "color_name": true, "swatches": true, "swatch_shape": "circle", "swatch_style": "color", "swatch_layout": "wrap", "savings": "off", "rating": true, "inline_add": true, "badges": { "sale": true, "new": true, "bestseller": true, "low_stock": true }, "badge_colors": { "sale": { "bg": "#d32f2f", "text": "#ffffff" }, "new": { "bg": "#1a7f37", "text": "#ffffff" }, "bestseller": { "bg": "#9a6700", "text": "#ffffff" }, "low_stock": { "bg": "#b45309", "text": "#ffffff" } } }, "options": { "show_values": true, "visual_name": "", "hidden_names": [], "delimiter": "", "delimiter_show": [] }, "image": { "hover_second_image": false }, "custom_badges": [], "price_reveal": { "mode": "off", "namespace": "", "key": "", "text": "" }, "predictive": { "suggestions": true, "suggestions_max": 4, "suggestions_heading": "Suggestions", "collections": true, "collections_max": 4, "collections_heading": "Collections", "pages": true, "pages_max": 2, "pages_heading": "Pages", "position_desktop": "left", "position_mobile": "hide", "products_heading": "Products" }, "filters": { "enabled": true, "layout": "bar", "show_counts": true, "mobile_style": "accordion" } } }}set_search_recipe
Section titled “set_search_recipe”{ "action": "set_search_recipe", "metrics_id": 42 }| Parameter | Required | Description |
|---|---|---|
metrics_id | Yes | A search recipe ID from list_recipes with recipe_type "search". Use 0 to turn search re-ranking off |
Search uses exactly one active recipe; setting a new one deactivates the previous one. IDs that are not search recipes are rejected without changing anything.
Example response: the updated search serving status, in the same shape as get_search_serving:
{ "success": true, "data": { "recipes": [ { "id": 42, "name": "Relevant & Popular", "is_active": 1 }, { "id": 43, "name": "In-Stock Bestsellers", "is_active": 0 } ], "active_recipe_id": 42, "storefront_connected": true, "settings": { ... } }}update_search_settings
Section titled “update_search_settings”{ "action": "update_search_settings", "settings": { "layout": { "columns": { "mobile": 2, "tablet": 3, "desktop": 4 }, "per_page": 24 }, "fields": { "swatches": true, "badges": true, "rating": true, "inline_add": true } }}This is a partial update: only the keys you send change, everything else keeps its current value. Limits: columns mobile 1 to 3, tablet 2 to 4, desktop 2 to 6; per_page 8 to 48. Out-of-range values fall back to defaults.
Example response: the updated search serving status, in the same shape as get_search_serving, so you can confirm the saved values in settings.
connect_search_storefront
Section titled “connect_search_storefront”{ "action": "connect_search_storefront" }Provisions (or reuses) the Storefront API access token that search serving uses to read which products match a query. Idempotent; safe to call again.
Example response: the search serving status, in the same shape as get_search_serving, now with "storefront_connected": true. If Shopify refuses the token, the call returns HTTP 502:
{ "error": true, "message": "Storefront token provisioning failed: token_create_failed", "code": "server_error"}get_search_query_report
Section titled “get_search_query_report”{ "action": "get_search_query_report", "filter": "zero", "days": 30, "limit": 50 }| Parameter | Required | Description |
|---|---|---|
filter | No | zero (default) = queries that never returned a result, low = queries averaging 3 or fewer results, all = every query |
days | No | Lookback window in days, 1 to 365 (default 30) |
limit | No | Default 50, max 200 |
What shoppers searched for, grouped by normalized query, with bot traffic excluded. Queries that found nothing are good candidates for synonyms in Shopify’s Search & Discovery app or for catalog fixes. Synonyms added there apply to Dynasort search automatically.
Example response:
{ "success": true, "data": { "days": 30, "filter": "zero", "queries": [ { "query": "linen pants", "searches": 14, "zero_searches": 14, "avg_results": 0, "last_seen": "2026-11-09 16:14:04" }, { "query": "rain jacket womens", "searches": 6, "zero_searches": 6, "avg_results": 0, "last_seen": "2026-11-07 09:41:52" } ] }}list_placements
Section titled “list_placements”{ "action": "list_placements" }Returns every recommendation placement with its bound recipe, enabled flag, label, and full presentation settings. Placement keys: product-page, cart, collection, home, post-purchase, and custom-1 through custom-5.
Example response:
{ "success": true, "data": { "bindings": [ { "placement_key": "product-page", "default_label": "Product page", "default_heading": "You May Also Like", "is_custom": false, "label": "Product page", "recipe_id": "51", "enabled": "1", "settings": { "fields": { "compare_at": true, "vendor": "auto", "color_name": true, "swatches": true, "swatch_shape": "circle", "swatch_style": "color", "savings": "off", "rating": false, "badges": { "sale": true, "new": false, "bestseller": false, "low_stock": false }, "badge_colors": { "sale": { "bg": "#d32f2f", "text": "#ffffff" }, "new": { "bg": "#1a7f37", "text": "#ffffff" }, "bestseller": { "bg": "#9a6700", "text": "#ffffff" }, "low_stock": { "bg": "#b45309", "text": "#ffffff" } }, "wishlist": false, "inline_add": false }, "image": { "aspect_ratio": "auto", "hover_second_image": false }, "layout": { "format": "grid", "columns": { "mobile": 2, "tablet": 3, "desktop": 4 }, "carousel": { "peek": true, "dots": false, "advance": 1 }, "min_to_render": 2 }, "behavior": { "oos_mode": "show", "max_per_vendor": 0, "add_overlay_color": "#ffffff", "add_overlay_opacity": 80, "add_overlay_text": "#1a1a1a" }, "heading": { "locales": [] }, "labels": { "added": { "locales": [] }, "badges": { "sale": { "locales": [] }, "new": { "locales": [] }, "bestseller": { "locales": [] }, "low_stock": { "locales": [] } } }, "options": { "show_values": true, "visual_name": "", "hidden_names": [], "delimiter": "", "delimiter_show": [] } } } ], "multi_vendor": true }}The real response has one entry per placement key. recipe_id is "0" when no recipe is bound. heading.locales holds per-language headings, keyed by locale code; empty means the default heading is used. multi_vendor is true when the catalog has more than one vendor, which is when behavior.max_per_vendor matters.
update_placement
Section titled “update_placement”{ "action": "update_placement", "placement_key": "product-page", "recipe_id": 51, "enabled": 1, "settings": { "layout": { "columns": { "desktop": 4 } }, "fields": { "badges": { "sale": true } } }}| Parameter | Required | Description |
|---|---|---|
placement_key | Yes | One of the keys from list_placements |
recipe_id | No | A recommendation recipe ID from list_recipes with recipe_type "recommendation". Use 0 to unbind |
enabled | No | 1 or 0 |
label | No | Display label, mainly for custom placements |
settings | No | Partial presentation settings object, merged over the placement’s current settings. See list_placements output for the full schema |
A newly bound recipe starts serving within a few minutes. For the post-purchase placement only a subset of settings applies: layout.columns.desktop (products shown), layout.min_to_render, and the sale badge toggle; checkout styles the cards itself.
Example response: the saved placement, in the same shape as one list_placements entry:
{ "success": true, "data": { "placement_key": "product-page", "default_label": "Product page", "default_heading": "You May Also Like", "is_custom": false, "label": "Product page", "recipe_id": "51", "enabled": "1", "settings": { ... } }}An unknown placement_key, or a recipe_id that isn’t one of your recommendation recipes, returns 400 invalid_params and changes nothing.
get_serving_status
Section titled “get_serving_status”{ "action": "get_serving_status" }A cheap one-call overview: the active search recipe and storefront connection, how many recommendation placements are enabled, whether post-purchase is bound, and a quota_over notice when the monthly serve quota is exhausted.
Example response:
{ "success": true, "data": { "search": { "active_recipe": "Relevant & Popular", "connected": true }, "recs": { "enabled": 2 }, "post_purchase": { "bound": true }, "quota_over": null }}search.active_recipe is the active recipe’s name, or an empty string when search re-ranking is off. recs.enabled counts enabled placements with a recipe bound, not counting post-purchase. When the monthly serve quota is used up, quota_over becomes an object with used, quota, and resets_on.
get_serve_stats
Section titled “get_serve_stats”{ "action": "get_serve_stats", "recipe_id": 42, "days": 30 }| Parameter | Required | Description |
|---|---|---|
recipe_id | Yes | A search or recommendation recipe ID |
days | No | Reporting window, default 30. Clamped to your plan’s analytics depth; the response reports both window_days and plan_days |
Returns per-day serves, clicks, inline adds, attributed cart adds, and checkouts, plus window totals. Today’s numbers are live; past days come from the nightly rollup.
Example response:
{ "success": true, "data": { "days": [ { "date": "2026-11-09", "serves": 412, "clicks": 38, "inline_adds": 4, "adds": 11, "checkouts": 3 }, { "date": "2026-11-10", "serves": 190, "clicks": 17, "inline_adds": 1, "adds": 5, "checkouts": 1 } ], "totals": { "serves": 602, "clicks": 55, "inline_adds": 5, "adds": 16, "checkouts": 4 }, "has_data": true, "window_days": 30, "plan_days": 365 }}days only lists days with activity. has_data is false when the recipe has never been served.
get_serve_usage
Section titled “get_serve_usage”{ "action": "get_serve_usage" }Returns used, quota (with unlimited: true when your plan has no cap), the current month, and resets_on.
Example response:
{ "success": true, "data": { "used": 4210, "quota": 10000, "unlimited": false, "resets_on": "2026-12-01", "month": "2026-11" }}Managing API keys
Section titled “Managing API keys”- One active key at a time. If you need to rotate your key, revoke the current one first, then generate a new one.
- Revoking a key is immediate. Any requests using the old key will fail with a
401 unauthorizederror as soon as the key is revoked. - Keys don’t expire. An active key stays valid until you revoke it manually.
- Key history is preserved. Revoked keys remain visible in the Connector page with a “Revoked” badge so you have an audit trail.
Frequently asked questions
What is the Dynasort Connector?
A REST-style API for programmatic access to Dynasort. It covers collection sorting, option sorting, search re-ranking, product recommendations and post-purchase offers, and is designed so assistants such as Claude or ChatGPT can manage your setup from a conversation.
Which plans include the Connector API?
All of them. The Connector is included on every plan, Demo included, so any store can generate an API key.
How do I connect an assistant to Dynasort?
Click Copy Prompt on the Connector page, paste it into the assistant as a system message or at the start of a conversation, and provide your dyn_sk_ API key when asked. The prompt contains your store URL, the endpoint, authentication instructions and every available action.
How do I call the API directly?
Send a POST request with a JSON body to https://dynasort.immersiveecommerce.com/api/v1/ with the header Authorization: Bearer and your key. Every request names an action, for example {"action": "list_collections"}, and responses are JSON with a success or error flag.
What are the API rate limits?
60 requests per minute per store. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers, and exceeding the limit returns HTTP 429 with a Retry-After header.
Which actions does the API support?
27 actions in seven groups: collections (list, get, enable, disable, update, bulk toggle, bulk assign recipe, sort, revert), collection performance (insights), recipes (list by type), products (list, get, set boost, enable and disable option sorting, sort), search (get serving, set recipe, update settings, connect storefront, query report), placements (list, update) and analytics (serving status, serve stats, serve usage). Every action is documented with an example response.
Can I have more than one API key?
No. Only one key is active at a time. To rotate, revoke the current key and generate a new one. Revocation is immediate, keys never expire on their own, and revoked keys stay listed for an audit trail.
Can I recover a lost API key?
No. The full key is shown exactly once at generation and Dynasort stores only a hash. Revoke the lost key and generate a new one.