Schemas
AttributionSummaryResponse
site_iddaysfromtocurrencyISO 4217 code of the reported order totals.
tracking_sinceFirst day with any attribution data for this site.
planAttributionCounts
ordersrevenueai_ordersai_revenuesessionsai_sessionsLostDemandResponse
site_iddaysfromtodata_daysDays in the window with any search or chat activity.
chat_topics_sourceOrderAttribution
sourceAskAgento surface the shopper last clicked a product in.
session_idinteraction_idclicked_atUnix time of the click.
product_idsOrder line products the shopper clicked through AskAgento.
directTrue when the order contains a product the shopper clicked through AskAgento.
MerchandisingRequest
Search rules, applied in order; when a product appears in several matching rules, the earliest rule decides. Rules with no phrases or no products are ignored.
out_of_stock_lastMove out-of-stock products below in-stock ones. They are not removed.
0 (ignored) to 10 (counts as much as how well a product matches the search). Omitted signals are 0.
MerchandisingResponse
statusrulesNumber of search rules stored
out_of_stock_lastMerchandisingRule
phrasesCompared case-insensitively, with repeated spaces collapsed.
matchexact: the search text equals a phrase. contains: the search text contains a phrase.
pinShown first, in this order. Added to the results even when the search did not return them.
boostMoved above the other results when returned.
buryMoved to the bottom when returned.
OrderReportRequest
statustotalOrder total (required when status is paid).
currencypaid_atUnix time the order was paid (defaults to now; at most ~13 months old).
OrderReportResponse
statusresultorder_idSessionReportRequest
session_id^[A-Za-z0-9_-]+$ · requiredaiByokRequest
actionset stores the merchant key; clear removes BYOK credentials from the install record.
providerRequired when action=set.
api_keyMerchant LLM API key. Required when action=set. Never logged by the API.
modelOptional model id for action=set (e.g. gpt-5-mini for OpenAI, or an OpenRouter
model id). When omitted, the chatbot uses the server default (OpenRouter ids are
prefixed with openai/ when needed).
ByokResponse
statussite_idbyokTrue when a BYOK key is stored after this request; false after clear.
providerPresent when byok is true (the provider just stored).
Product
idimage_base64Local installs only (POST /install from a shop the service cannot reach):
the product's main image, base64-encoded. Not stored; ignored for public shops.
titlenamedescriptionshort_descriptionskupriceEffective price (sale price when on sale, otherwise regular price).
regular_pricesale_priceprice_htmlHTML-formatted price string (may include <span> tags).
statusProduct publication status (e.g. publish, draft, private).
featuredTrue when the merchant has marked the product as featured.
on_saleTrue when a sale price is active.
permalinkCanonical product page URL.
image_urlProduct categories; each item is a WooCommerce term object.
Product tags; each item is a WooCommerce term object.
Product variation objects (variable products only).
date_createdProduct creation timestamp (used by get_featured_products new_arrivals sort).
date_modifiedcreated_atAlias for date_created (plugin may send either field).
updated_atAlias for date_modified (plugin may send either field).
InstallRequest
domainsystemwoocommerce — full catalogue with image + text data.
knowledge_base — text-only Confluence/article chunks for askagento.com chat.
plugin_versionwoocommerce_versiontotal_productsshop_ipOptional IPv4 string for the shop host (plugin may send DNS resolution result).
InstallVerifyRequest
domainShop host name, e.g. shop.example.com. A full URL is also accepted.
image_urlURL of one product image, picked at random from the catalogue about to be
installed. Products are indexed by their images, so a catalogue without
one cannot be installed: omitting it yields blocked
(no_product_images).
InstallVerifyResponse
okTrue only when verdict is pass.
verdictcodeMachine-readable outcome, e.g. reachable, local_domain, private_ip,
dns_unresolved, tls_invalid, password_protected, image_forbidden,
image_not_found, no_product_images, rate_limited, timeout.
reasonSentence suitable for display to the shop administrator.
localTrue when the shop is local (local_domain, private_ip, dns_unresolved):
it can still install in local mode with up to local_max_products products
and its product images sent inline (see POST /install).
local_max_productsPer-check detail, in the order the checks ran.
UpdateRequest
systemdomainplugin_versionwoocommerce_versiontotal_productsUpdateResponse
statussite_idsynced_productsupdate_neededTrue when the catalogue hash changed on this sync (re-embed required). Unchanged-hash syncs do not clear a previously true flag.
messageUninstallRequest
systemdomainplugin_versionwoocommerce_versionInstallAcceptedResponse
statussite_idNew site identifier; send it in X-Askagento-Site-Id on every authenticated call.
api_keySecret key; accepted on every authenticated route. Keep it on your server and never expose it in a web page.
public_keyPublic key; accepted only on POST /chatbot, POST /search and POST /mcp. Safe to embed in storefront pages and AI agent configs.
messageInstallStatusResponse
site_idinstalled_atstatus_messagestatusRecommendationsPayload
site_idgenerated_atISO 8601 timestamp (UTC) with Z suffix
Map of source product id to cross-sell targets (similarity-ranked)
Map of source product id (string) to ranked neighbor list
RecommendationNeighbor
product_iddistanceHybrid score; lower is better when present
titleimage_urlsourcehybrid, image, or text
SearchRequest
textSearch text, at least 2 characters
image_base64Base64-encoded image bytes. A leading data:image/...;base64, prefix is stripped if present. Never fetched over the network.
modalityOmit to infer from the body: text only → text, image_base64 only → image,
both present → both. Setting both requires text (≥2 chars) and image_base64.
limitmerchandiseApply the shop's merchandising (see POST /merchandising). Set false when your own code reorders the results.
SearchHit
product_idtitleimage_urldistanceNull for a pinned product that the search itself did not return.
pinnedPresent and true when the product was added by a pin rule.
SearchResponse
site_idmodalityqueryEchoed text query when modality is text or both
ChatMessage
rolecontentChatbotRequest
actionchat — full conversation; last user turn drives product retrieval (see POST /chatbot).
health — connectivity probe; messages optional and ignored; max_completion_tokens ignored.
Required when action=chat (non-empty after normalization); omitted or ignored for health. Up to 24 turns; each content truncated to 12 000 chars.
max_completion_tokensAlias max_tokens also accepted; capped at 4096. Ignored when action=health (server uses 3).
ChatbotResponse
site_idactionlatency_msRound-trip latency to the chat provider in milliseconds
replyText reply from the model
products_retrievedNumber of catalogue products injected as context for action=chat; always 0 for health
limits_tokens_remainingRemaining token quota for the site after this call; null if no quota is set
ChatbotErrorResponse
errorllm_statusHTTP status code returned by the upstream chat API
McpRequest
jsonrpcmethodOne of: initialize, notifications/initialized, tools/call, tools/list
Request id (omit for notifications)
For tools/call: {"name": "chat_with_shop"|"get_catalogue_stats"|"get_featured_products"|"get_product_by_id"|"get_shop_status"|"get_similar_products"|"list_categories"|"list_tags"|"search_products", "arguments": {...}}
PlanResponse
site_idplanPlan slug (free, basic, pro); null if no plan is set
plan_labelHuman-readable plan label
UsageResponse
site_idplanPlan slug; null if no plan is set
plan_labelRemaining monthly plan allowance for this site; null if no limits are tracked. Reset to the tier maximum each billing period. Does not include add-on packs.
Unspent one-time add-on pack credits, omitted keys meaning zero; null when the site has none. These do not expire and are only spent once limits reaches zero, so the site's true remaining balance is limits + pack_units.
Tier-level maximums for the current plan; null if no plan is set. Includes a products field (how many products the plan indexes) in addition to tokens/searches.
product_countNumber of products in the shop's catalogue; null if not yet recorded
max_productsNumber of products the service indexes on the current plan; null if no plan is set.
over_product_limitTrue when the catalogue is larger than the current plan indexes. While true, catalogue-backed endpoints return 403 (code: product_limit_exceeded) until the catalogue is covered by a larger plan or reduced in size.
FilterRequest
actionfilter_actionAlias for action; supply either action or filter_action.
canonical_filtersAlias for canonical_attributes when generating attribute filters.
LabelRequest
modeactioncanonical_attributescanonical_categoriescanonical_tagsLabelFilterJsonResponse
site_idmodeaction