Для AI-агентов: markdown этой страницы — /docs/mcp-pricing.mdиндекс документации — /llms.txt
MCP: pricing
Обновлено
Определения инструментов. Обновляйте tools/list после изменения прав. required_scopes: ALL.
list_promo_code_versions
List the stored versions of one promo code (id), newest first: each version number with who stored it, when, and the code as it was then, its pause included. Paginated by before_version (the previous page’s next_before_version). Use a version number with restore_promo_code_version.
Scopes (ALL): ["pricing:write"]. Risk: "read".
manage_pricing_rules
Manage tenant pricing rules. Exactly five actions exist: list (the sole read), create, update, delete, and set_active. All mutation actions require request_id; update/delete/set_active also require expected_version. Rules are addressed only by their `id`; references inside the rule are `group_id`, `catalog_id`, `required_group_ids`, `required_catalog_ids` and gift `ids`. A `recommend` rule suggests products beside the checkout without changing the amount: when.required_catalog_ids lists the products that must be among the selected lines, then.filter.catalog_ids the products suggested; a reference to a product of another business is refused with PRICING_RULE_REFERENCE_UNKNOWN. A promo code is a separate tool, manage_promo_codes.
Scopes (ALL): ["pricing:write"]. Risk: "money".
manage_promo_codes
Manage promo codes: action list, create, update, pause (paused true/false), delete or usage. A code has the `text` the buyer types, a kind percent or fixed (value, and currency for fixed), a scope (the whole order, products or sections by `id`), optional limit_total, limit_per_user and a validity window. A code that was already redeemed is only switched off by delete (outcome deactivated). usage returns reserved, used, released and refunded redemptions. Every code carries its version; update and pause send it back as expected_version, and a code changed since then is refused with PRECONDITION_FAILED.
Scopes (ALL): ["pricing:write"]. Risk: "money".
restore_promo_code_version
Put one promo code (id) back to a stored version (version from list_promo_code_versions). The stored copy must pass today’s rules — its products and sections must still be in this business and its text free — and becomes the next version; redemptions orders already used stay. Returns the code with its new version.
Scopes (ALL): ["pricing:write"]. Risk: "money".
set_buyer_recommendations
Replace the personal suggestions for one buyer (user_id): items [{catalog_id, optional combination_key, rank}] up to 50, valid until expires_at. They appear beside the buyer's checkout ahead of the rule-based ones and never change the amount. An empty list clears them.
Scopes (ALL): ["pricing:write"]. Risk: "write".