ecommerce_createADiscountV1
Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount.
This record as markdown: /tools/io-github-hostinger-hostinger-api-mcp/ecommerce-createadiscountv1.md
What ecommerce_createADiscountV1 does on Hostinger Api
AI agents use ecommerce_createADiscountV1 to create or update resources in Hostinger Api, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Hostinger Api environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The discount code customers enter at checkout. |
name | string | — | A human-friendly discount name. |
type | string | Yes | The discount type. |
value | integer | Yes | For percentage discounts a whole number 1-100; for fixed discounts an amount in the smallest currency unit (e.g. $10 is 1000). Ignored for free_shipping. |
ends_at | string | — | When the discount expires. A bare date runs to the end of that day in time_zone. Never expires when omitted. |
store_id | string | Yes | The ID of the store to create the discount for. |
starts_at | string | — | When the discount becomes active. A bare date (2026-11-27) anchors to time_zone. Defaults to now when omitted. |
time_zone | string | — | IANA time zone used to interpret starts_at and ends_at. |
allocation | string | — | Whether the discount applies to the cart total or to each eligible item. |
usage_limit | integer | — | Maximum number of times the discount can be redeemed. |
min_cart_value | integer | — | Minimum cart value in the smallest currency unit required for the discount to apply. |
Parameters from the server's own tool schema.
Why ecommerce_createADiscountV1 is rated Medium
Creates reversible discount record in e-commerce system; moderate blast radius if arbitrary discounts applied.
From the tool's definition Create a discount for a store; Returns the created discount.
Risk signalsAccepts freeform code/query input (code) · High parameter count (11 properties)
Attacks that exploit this kind of access
The rule that runs ecommerce_createADiscountV1 safely
PolicyLayer is an MCP gateway: it sits between your AI agents and Hostinger Api, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For ecommerce_createADiscountV1, this is the rule to start with:
ecommerce_createADiscountV1 stays usable, but capped: an agent stuck in a loop can't make hundreds of changes a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect Hostinger Api, apply this rule, and every ecommerce_createADiscountV1 call is checked against it from then on.
Questions about ecommerce_createADiscountV1
Create a discount for a store. Fixed discounts take an amount in the smallest currency unit (e.g. $10 is 1000); percentage discounts take a whole-number value between 1 and 100. Free-shipping discounts ignore value. Returns the created discount. It is categorised as a Write tool in the Hostinger Api MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
ecommerce_createADiscountV1 accepts 11 parameters: code, name, type, value, ends_at, store_id, starts_at, time_zone, allocation, usage_limit, min_cart_value. Required: code, type, value, store_id. The full parameter table on this page comes from the server's own tool schema.
Register the Hostinger Api MCP server in PolicyLayer and add a rule for ecommerce_createADiscountV1: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Hostinger Api. Nothing to install.
ecommerce_createADiscountV1 is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the ecommerce_createADiscountV1 rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for ecommerce_createADiscountV1. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
ecommerce_createADiscountV1 is provided by the Hostinger Api MCP server (hostinger-api-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on Hostinger Api, and thousands of servers like it.
This server
Across the catalogue