Skip to content

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.

Open Connector from the left sidebar in the Dynasort app.

Connector page showing API Key management and System Prompt sections

The page has three sections: API Key management, a System Prompt for AI assistants, and an API Reference card.

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.

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:

  1. Click Copy Prompt on the Connector page.
  2. Open your AI assistant (Claude, ChatGPT, or similar).
  3. Paste the prompt as a system message or at the start of a new conversation.
  4. 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.

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:

Terminal window
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"}'

The API allows 60 requests per minute per store. Every response includes rate limit headers:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute (60)
X-RateLimit-RemainingRequests remaining in the current window
X-RateLimit-ResetUnix timestamp when the window resets

If you exceed the limit, the API returns HTTP 429 with a Retry-After header.

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 codeHTTP statusMeaning
unauthorized401Invalid, revoked, or missing API key
permission_denied403API access is not enabled for this store
invalid_params400Missing or invalid parameters, or an ID of the wrong kind (for example a search recipe where a collection recipe is expected)
invalid_action400Unknown action name
not_found404The collection or product ID does not exist in your store
conflict409The change is blocked by another feature, for example a collection that is on a sort rotation
rate_limited429Too many requests. Retry after the Retry-After seconds
server_error500Internal error

API Reference card showing all available actions

The API exposes 27 actions organized into seven categories.

ActionDescription
list_collectionsList all collections with their sorting status, recipe assignment, and product count
get_collectionGet detailed info about a single collection, including its rules and recent performance windows
enable_collectionEnable Dynasort sorting on a collection
disable_collectionDisable sorting on a collection (reverts to configured sort order if set)
update_collectionAssign a recipe and/or set the revert sort order for a collection
bulk_toggle_collectionsEnable or disable multiple collections at once
bulk_assign_recipeAssign a recipe to multiple collections at once
sort_collectionTrigger an immediate sort using the assigned recipe
revert_collectionRevert a collection to its configured revert sort order
ActionDescription
get_insightsCollection performance from the nightly rollup, split by whether Dynasort was sorting each collection on each day
ActionDescription
list_recipesList the recipes of one type: collection (default), recommendation, or search
ActionDescription
list_productsList products, a page at a time, with their boost values, option sorting status, and options
get_productGet detailed info about a single product including its options
set_product_boostSet a boost value on a product (positive = boost up, negative = push down)
enable_productEnable option sorting on a product and configure sort rules for each option
disable_productDisable option sorting on a product
sort_productTrigger an immediate re-sort of a product’s options
ActionDescription
get_search_servingGet search serving status: recipes, the active recipe, storefront connection, display settings
set_search_recipeSet the active search recipe (0 turns search re-ranking off)
update_search_settingsUpdate the search results display settings (partial update)
connect_search_storefrontProvision the Storefront API token search serving needs
get_search_query_reportWhat shoppers searched for, with the queries that found nothing or almost nothing
ActionDescription
list_placementsList all recommendation placements with their bound recipe, enabled flag, and settings
update_placementUpdate one placement’s recipe, enabled flag, label, or settings (partial update)
ActionDescription
get_serving_statusOne-call overview: search, placements, post-purchase, and quota state
get_serve_statsDaily serves, clicks, adds, and checkouts for one search or recommendation recipe
get_serve_usageMonthly serve usage against your plan quota

Every action is sent as a JSON body with an "action" field. Below are the parameters for each, followed by an example response.

{ "action": "list_collections" }
ParameterRequiredDescription
queryNoOnly return collections whose title contains this text
sortNoname-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.

{ "action": "get_collection", "collection_id": 123456789 }
ParameterRequiredDescription
collection_idYesShopify 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.

{ "action": "enable_collection", "collection_id": 123456789 }
ParameterRequiredDescription
collection_idYesShopify 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.

{
"action": "update_collection",
"collection_id": 123456789,
"metrics_id": 1,
"revert_sorting": "best-selling"
}
ParameterRequiredDescription
collection_idYesShopify collection ID
metrics_idYesCollection recipe ID to assign (use list_recipes to find IDs)
revert_sortingNoSort 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.

{
"action": "bulk_toggle_collections",
"collection_ids": [123456789, 987654321],
"status": 1
}
ParameterRequiredDescription
collection_idsYesArray of Shopify collection IDs
statusYes1 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.

{
"action": "bulk_assign_recipe",
"collection_ids": [123456789, 987654321],
"metrics_id": 1,
"revert_sorting": "best-selling"
}
ParameterRequiredDescription
collection_idsYesArray of Shopify collection IDs
metrics_idYesCollection recipe ID to assign
revert_sortingNoRevert 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" }
}
{ "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.

{ "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.

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" }
ParameterRequiredDescription
viewNosummary (default), collections, daily, or recipes
start_date / end_dateNoRange as YYYY-MM-DD. Data runs through yesterday and up to 365 days back
daysNoUsed instead of dates: the last N full days (default 30)
collection_idNodaily view only: one collection’s day-by-day series
collection_idsNocollections view only: array of IDs to restrict to
sort_byNocollections view only: sessions (default), conversion_rate, add_to_cart_rate, revenue, or views
limitNocollections view only: default 50, max 500
min_sessionsNocollections 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_dates lists days with no data at all (a processing gap, not zero traffic). Leave them out of comparisons.
  • sorted_status_source is change_log when the sorted and unsorted days are exact. assumed_current_state means no toggle history exists, so today’s state is assumed for the whole range; change_log_incomplete means 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_sorted against while_not_sorted is the fairer comparison.
{ "action": "list_recipes", "recipe_type": "collection" }
ParameterRequiredDescription
recipe_typeNocollection (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).

{ "action": "list_products", "page": 1, "per_page": 50 }
ParameterRequiredDescription
pageNoPage number, starting at 1 (default 1)
per_pageNoProducts per page, 1 to 200 (default 50)
queryNoOnly products whose title contains every word you send
filterNoall (default), enabled (option sorting on), disabled, or boosted (non-zero boost)
sort_byNotitle 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.

{ "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.

{
"action": "set_product_boost",
"product_id": 123456789,
"boost": 50
}
ParameterRequiredDescription
product_idYesShopify product ID
boostYesInteger 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.

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"
}
]
}
ParameterRequiredDescription
product_idYesShopify product ID
optionsNoArray of option sorting configurations (see below)

Option configuration fields:

FieldRequiredDescription
option_idYesThe option ID from the product (use get_product to find these)
option_nameYesThe option name (e.g. “Color”, “Size”)
sort_typeYesSort method, see table below
sold_outNoWhere to place sold-out variants: bottom (default), top, or ignore
directionNoSort direction: desc (default) or asc
daysNoTime window for sales/revenue sorts: 7, 30 (default), 60, 90, 365, or all
csv_patternNoCustom order for comma_separated sort type (e.g. "Red,Blue,Green")
common_sizeNoSize system for common_sizes sort type (e.g. "us_apparel", "us_shoes")

Available sort types:

Sort typeWhat it sorts by
offNo sorting for this option
alphabeticalAlphabetical order
salesUnits sold (within the time window)
revenuesRevenue generated
pricesVariant price
compare_at_pricesCompare-at price
costsCost per item
inventoriesAvailable inventory
marginsProfit margin
discount_amountsDiscount amount
discount_percentagesDiscount percentage
numericNumeric value in the option name
variant_agesHow recently the variant was added
variants_in_stockIn-stock status
comma_separatedCustom order defined by csv_pattern
common_sizesStandard 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.

{ "action": "disable_product", "product_id": 123456789 }

Disables option sorting on the product.

Example response:

{ "success": true, "data": { "status": "ok" } }
{ "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".

{ "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"
}
}
}
}
{ "action": "set_search_recipe", "metrics_id": 42 }
ParameterRequiredDescription
metrics_idYesA 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": { ... }
}
}
{
"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.

{ "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"
}
{ "action": "get_search_query_report", "filter": "zero", "days": 30, "limit": 50 }
ParameterRequiredDescription
filterNozero (default) = queries that never returned a result, low = queries averaging 3 or fewer results, all = every query
daysNoLookback window in days, 1 to 365 (default 30)
limitNoDefault 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"
}
]
}
}
{ "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.

{
"action": "update_placement",
"placement_key": "product-page",
"recipe_id": 51,
"enabled": 1,
"settings": {
"layout": { "columns": { "desktop": 4 } },
"fields": { "badges": { "sale": true } }
}
}
ParameterRequiredDescription
placement_keyYesOne of the keys from list_placements
recipe_idNoA recommendation recipe ID from list_recipes with recipe_type "recommendation". Use 0 to unbind
enabledNo1 or 0
labelNoDisplay label, mainly for custom placements
settingsNoPartial 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.

{ "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.

{ "action": "get_serve_stats", "recipe_id": 42, "days": 30 }
ParameterRequiredDescription
recipe_idYesA search or recommendation recipe ID
daysNoReporting 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.

{ "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"
}
}
  • 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 unauthorized error 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.