AskAgento API
Information
Askagento API
    AI Agents & MCPpostCORS for AI AgentsoptionsAI ChatbotpostCORS for AI ChatbotoptionsAI Recommend (cross-sell)getAI Recommend (upsell)getAI SearchpostCORS for AI SearchoptionsAutocompletegetCORS for AutocompleteoptionsAuto FilterpostCORS for Auto FilteroptionsAuto LabelpostCORS for Auto LabeloptionsBring-your-own-key (BYOK) LLM credentialspostCurrent subscription plangetInstallation statusgetInstall pluginpostInstall verifypostCORS preflightoptionsLost-demand insightsgetReport a storefront sessionpostCORS preflight for session reportsoptionsReport an orderpostRevenue attribution summarygetSave merchandisingpostUninstall pluginpostUpdate product datapostUsage limitsget
Schemas
powered by Zudoku
Welcome to AskAgento API
Welcome to AskAgento API

Schemas


AttributionSummaryResponse

site_id
​string
days
​integer
from
​string · date
to
​string · date
currency
​string | null

ISO 4217 code of the reported order totals.

tracking_since
​string | null · date

First day with any attribution data for this site.

​AttributionCounts
​object
plan
​object | null
​object[]

AttributionCounts

orders
​integer
revenue
​number
ai_orders
​integer
ai_revenue
​number
sessions
​integer
ai_sessions
​integer

LostDemandResponse

site_id
​string
days
​integer
from
​string · date
to
​string · date
data_days
​integer

Days in the window with any search or chat activity.

​object
​object[]
​object[]
chat_topics_source
​string · enum
Enum values:
ai
exact
none

OrderAttribution

source
​string · enum · required

AskAgento surface the shopper last clicked a product in.

Enum values:
chatbot
cross_sell
related
search_image
search_text
upsell
session_id
​string · maxLength: 64
interaction_id
​string · maxLength: 64
clicked_at
​integer

Unix time of the click.

product_ids
​integer[] · maxItems: 50

Order line products the shopper clicked through AskAgento.

direct
​boolean

True when the order contains a product the shopper clicked through AskAgento.

MerchandisingRequest

​MerchandisingRule[] · maxItems: 200

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_last
​boolean

Move out-of-stock products below in-stock ones. They are not removed.

Default: false
​object

0 (ignored) to 10 (counts as much as how well a product matches the search). Omitted signals are 0.

​MerchandisingSynonym[] · maxItems: 200

Words that mean the same in this shop. They are added to the search text of /search (text, voice, text + image), the chatbot and agents, and widen /suggest.

​MerchandisingRedirect[] · maxItems: 200

Searches that open a page instead of showing results. /search answers a text or voice search matching one with redirect and no results (a redirected text search is not counted against limits.searches); /suggest lists the redirect while typing.

MerchandisingRedirect

phrases
​string[] · maxItems: 20 · required

Compared case-insensitively, with repeated spaces collapsed.

url
​string · maxLength: 500 · required

Absolute http(s) URL to open.

Example: https://shop.example/returns
match
​string · enum

exact: the search text equals a phrase. contains: the search text contains a phrase as whole words.

Enum values:
exact
contains
Default: exact
label
​string · maxLength: 80

Text shown for the redirect in autocomplete (defaults to the phrase).

MerchandisingResponse

status
​string
rules
​integer

Number of search rules stored

out_of_stock_last
​boolean
​object
synonyms
​integer

Number of synonym groups stored

redirects
​integer

Number of search redirects stored

MerchandisingRule

phrases
​string[] · maxItems: 20

Compared case-insensitively, with repeated spaces collapsed.

match
​string · enum

exact: the search text equals a phrase. contains: the search text contains a phrase.

Enum values:
exact
contains
Default: exact
pin
​integer[] · maxItems: 50

Shown first, in this order. Added to the results even when the search did not return them.

boost
​integer[] · maxItems: 50

Moved above the other results when returned.

bury
​integer[] · maxItems: 50

Moved to the bottom when returned.

MerchandisingSynonym

terms
​string[] · minItems: 2 · maxItems: 10 · required
one_way
​boolean

false: any term finds the others. true: the first term also finds the later ones, but not the other way round (e.g. [hoodie, sweatshirt]).

Default: false

OrderReportRequest

​required
status
​string · enum · required
Enum values:
paid
refunded
cancelled
total
​number

Order total (required when status is paid).

currency
​string
paid_at
​integer

Unix time the order was paid (defaults to now; at most ~13 months old).

​OrderAttribution

OrderReportResponse

status
​string
result
​string · enum
Enum values:
counted
duplicate
reversed
not_found
order_id
​string

SessionReportRequest

session_id
​string · minLength: 8 · maxLength: 64 · pattern: ^[A-Za-z0-9_-]+$ · required
ai
​boolean
Default: false

SessionReportResponse

status
​string
result
​string · enum
Enum values:
new
ai
seen

ByokRequest

action
​string · enum · required

set stores the merchant key; clear removes BYOK credentials from the install record.

Enum values:
set
clear
provider
​string · enum

Required when action=set.

Enum values:
openai
openrouter
api_key
​string

Merchant LLM API key. Required when action=set. Never logged by the API.

model
​string

Optional 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

status
​string · required
site_id
​string · required
byok
​boolean · required

True when a BYOK key is stored after this request; false after clear.

provider
​string · enum

Present when byok is true (the provider just stored).

Enum values:
openai
openrouter

WooCommerceTermObject

WooCommerce taxonomy term (category or tag).
id
​integer
name
​string
slug
​string

Product

id
​integer · required
image_base64
​string

Local installs only (POST /install from a shop the service cannot reach): the product's main image, base64-encoded. Not stored; ignored for public shops.

title
​string
name
​string
description
​string
short_description
​string
sku
​string
price
​string

Effective price (sale price when on sale, otherwise regular price).

regular_price
​string
sale_price
​string
price_html
​string

HTML-formatted price string (may include <span> tags).

​
status
​string

Product publication status (e.g. publish, draft, private).

featured
​boolean

True when the merchant has marked the product as featured.

on_sale
​boolean

True when a sale price is active.

permalink
​string · uri

Canonical product page URL.

image_url
​string · uri
​WooCommerceTermObject[]

Product categories; each item is a WooCommerce term object.

​WooCommerceTermObject[]

Product tags; each item is a WooCommerce term object.

​object[]
​object[]

Product variation objects (variable products only).

date_created
​string · date-time

Product creation timestamp (used by get_featured_products new_arrivals sort).

date_modified
​string · date-time
created_at
​string · date-time

Alias for date_created (plugin may send either field).

updated_at
​string · date-time

Alias for date_modified (plugin may send either field).

InstallRequest

domain
​string · required
​Product[] · required
system
​string · enum · required

woocommerce — full catalogue with image + text data. knowledge_base — text-only Confluence/article chunks for askagento.com chat.

Enum values:
woocommerce
knowledge_base
plugin_version
​string
woocommerce_version
​string
total_products
​integer
shop_ip
​string

Optional IPv4 string for the shop host (plugin may send DNS resolution result).

InstallVerifyRequest

domain
​string · required

Shop host name, e.g. shop.example.com. A full URL is also accepted.

Example: shop.example.com
image_url
​string

URL 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).

Example: https://shop.example.com/wp-content/uploads/2026/01/hat.jpg

InstallVerifyResponse

ok
​boolean

True only when verdict is pass.

verdict
​string · enum
Enum values:
pass
blocked
inconclusive
code
​string

Machine-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.

Example: image_forbidden
reason
​string

Sentence suitable for display to the shop administrator.

Example: The shop refuses image requests from our servers (hotlink protection or a firewall).
local
​boolean

True 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_products
​integer
​object[]

Per-check detail, in the order the checks ran.

UpdateRequest

​Product[] · required
system
​string · enum · required
Enum values:
woocommerce
domain
​string
plugin_version
​string
woocommerce_version
​string
total_products
​integer

UpdateResponse

status
​string · required
site_id
​string · required
synced_products
​integer · required
update_needed
​boolean · required

True when the catalogue hash changed on this sync (re-embed required). Unchanged-hash syncs do not clear a previously true flag.

message
​string · required

UninstallRequest

system
​string · enum · required
Enum values:
woocommerce
knowledge_base
domain
​string
plugin_version
​string
woocommerce_version
​string

InstallAcceptedResponse

status
​string · required
site_id
​string · required

New site identifier; send it in X-Askagento-Site-Id on every authenticated call.

api_key
​string · required

Secret key; accepted on every authenticated route. Keep it on your server and never expose it in a web page.

public_key
​string · required

Public key; accepted only on POST /chatbot, GET /suggest, POST /search and POST /mcp. Safe to embed in storefront pages and AI agent configs.

Example: pk_3fQx8ZkP2mLr7TnV1cWy9HsB
message
​string · required

StatusOkResponse

status
​string

InstallStatusResponse

site_id
​string
installed_at
​string | null · date-time
status_message
​string
status
​string

RecommendationsPayload

site_id
​string
generated_at
​string

ISO 8601 timestamp (UTC) with Z suffix

​object

Map of source product id to cross-sell targets (similarity-ranked)

​object

Map of source product id (string) to ranked neighbor list

RecommendationNeighbor

product_id
​string
distance
​number | null · float

Hybrid score; lower is better when present

title
​string
image_url
​string
source
​string

hybrid, image, or text

SearchRequest

text
​string

Search text, at least 2 characters

image_base64
​string

Base64-encoded image bytes. A leading data:image/...;base64, prefix is stripped if present. Never fetched over the network.

audio_base64
​string

Voice query: base64-encoded WAV (16-bit PCM, mono, 8–48 kHz, ≤15 s). A leading data:audio/...;base64, prefix is stripped if present. Costs 100 searches.

language
​string

Spoken language for voice (e.g. en-US, de-DE, de_DE, fr). Default en-US.

modality
​string · enum

Omit to infer from the body: text only → text, image_base64 only → image, both present → both, audio_base64 only → voice. Setting both requires text (≥2 chars) and image_base64.

Enum values:
text
image
both
voice
limit
​integer · min: 1 · max: 50
Default: 12
merchandise
​boolean

Apply the shop's merchandising (see POST /merchandising). Set false when your own code reorders the results.

Default: true

SearchHit

product_id
​string
title
​string
image_url
​string
distance
​number | null · float

Null for a pinned product that the search itself did not return.

pinned
​boolean

Present and true when the product was added by a pin rule.

SuggestResponse

site_id
​string · required
query
​string · required

The query as matched (trimmed, lower-cased).

​object[] · required
searches
​string[] · required

Popular searches that continue the typed text (most frequent first); for an empty q, the trending searches of the last 7 days.

Example: ["silver watch","silver earrings"]
​required

SearchRedirect

The shop sends this search to a page (see `MerchandisingRequest.redirects`).
url
​string · required
label
​string · required

SearchResponse

site_id
​string · required
modality
​string · enum · required
Enum values:
text
image
both
voice
​SearchHit[] · required
query
​string

Echoed text query when modality is text or both; the transcript for voice

transcript
​string

Voice only. Recognized speech that was searched (may be empty).

language
​string

Voice only. Spoken language used for recognition (e.g. en-US).

search_credit_cost
​integer

Voice only. Searches debited for this request (100).

​SearchRedirect

Present when the shop redirects this text or voice search to a page; results is then empty. Open redirect.url instead of showing results.

ChatMessage

role
​string · enum · required
Enum values:
system
user
assistant
content
​string · maxLength: 12000 · required

ChatbotRequest

action
​string · enum

chat — full conversation; last user turn drives product retrieval (see POST /chatbot). health — connectivity probe; messages optional and ignored; max_completion_tokens ignored.

Enum values:
chat
health
Default: chat
​ChatMessage[] · maxItems: 24

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_tokens
​integer · max: 4096

Alias max_tokens also accepted; capped at 4096. Ignored when action=health (server uses 3).

Default: 1024
​

Optional. The product page the shopper is asking from (AI Assistant). Its synced details (price, attributes, variants, description) are given to the assistant, so questions like "is it waterproof?" are answered about that product. Ignored when the product is not in the last catalogue sync.

Example: 1234

ChatbotResponse

site_id
​string · required
action
​string · enum · required
Enum values:
chat
health
latency_ms
​integer · required

Round-trip latency to the chat provider in milliseconds

​object · required
reply
​string · required

Text reply from the model

products_retrieved
​integer · required

Number of catalogue products injected as context for action=chat; always 0 for health

limits_tokens_remaining
​integer | null

Remaining token quota for the site after this call; null if no quota is set

ChatbotErrorResponse

error
​string
llm_status
​integer

HTTP status code returned by the upstream chat API

McpRequest

jsonrpc
​string · enum · required
Enum values:
2.0
method
​string · required

One of: initialize, notifications/initialized, tools/call, tools/list

​

Request id (omit for notifications)

​object

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

McpResponse

jsonrpc
​string · enum
Enum values:
2.0
​
​object | null
error
​object | null

PlanResponse

site_id
​string
plan
​string | null

Plan slug (free, basic, pro); null if no plan is set

plan_label
​string | null

Human-readable plan label

UsageLimits

tokens
​integer

Remaining AI token quota

searches
​integer

Remaining search quota

UsageResponse

site_id
​string
plan
​string | null

Plan slug; null if no plan is set

plan_label
​string | null
​UsageLimits

Remaining 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.

​UsageLimits

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.

​UsageLimits

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_count
​integer | null

Number of products in the shop's catalogue; null if not yet recorded

max_products
​integer | null

Number of products the service indexes on the current plan; null if no plan is set.

over_product_limit
​boolean

True 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

action
​string · enum
Enum values:
analyze
generate
upload
export
filter_action
​string · enum

Alias for action; supply either action or filter_action.

Enum values:
analyze
generate
upload
export
canonical_filters
​string[]

Alias for canonical_attributes when generating attribute filters.

LabelRequest

mode
​string · enum · required
Enum values:
attributes
categories
tags
action
​string · enum · required
Enum values:
analyze
generate
upload
export
canonical_attributes
​string[]
canonical_categories
​string[]
canonical_tags
​string[]

LabelFilterJsonResponse

Shape depends on `mode` and `action`. `generated_preview`, `uploaded_products` (upload), `filename` (export), and informational `message`.
site_id
​string
mode
​string
action
​string
Additional properties are allowed

LabelLlmErrorResponse

error
​string
llm_status
​integer

HTTP status from the upstream chat API when the failure was from the LLM

ErrorResponse

error
​string
On this page
  • AttributionSummaryResponse
  • AttributionCounts
  • LostDemandResponse
  • OrderAttribution
  • MerchandisingRequest
  • MerchandisingRedirect
  • MerchandisingResponse
  • MerchandisingRule
  • MerchandisingSynonym
  • OrderReportRequest
  • OrderReportResponse
  • SessionReportRequest
  • SessionReportResponse
  • ByokRequest
  • ByokResponse
  • WooCommerceTermObject
  • Product
  • InstallRequest
  • InstallVerifyRequest
  • InstallVerifyResponse
  • UpdateRequest
  • UpdateResponse
  • UninstallRequest
  • InstallAcceptedResponse
  • StatusOkResponse
  • InstallStatusResponse
  • RecommendationsPayload
  • RecommendationNeighbor
  • SearchRequest
  • SearchHit
  • SuggestResponse
  • SearchRedirect
  • SearchResponse
  • ChatMessage
  • ChatbotRequest
  • ChatbotResponse
  • ChatbotErrorResponse
  • McpRequest
  • McpResponse
  • PlanResponse
  • UsageLimits
  • UsageResponse
  • FilterRequest
  • LabelRequest
  • LabelFilterJsonResponse
  • LabelLlmErrorResponse
  • ErrorResponse