Skip to Content
The Makinari API repo now includes an MCP Server — connect your AI models directly. View on GitHub →
MCP ServerToolsPromotions

Promotions

Manage commerce promotions (percent, fixed, or BOGO). Every promotion belongs to a campaign — use the campaigns tool first to obtain campaign_id.

Use action="create" (requires name, discount_type, discount_value, campaign_id). Use list/get to inspect. Use update/delete with id (alias: promotion_id). If applies_to="selected_items", pass catalog_item_ids and/or catalog_category_ids. For BOGO, required_items / required_categories are the buy-side; catalog_* ids are the get-side. usage_count is read-only. Checkout does not apply promo codes yet.

Input Schema

ParameterTypeDescription
actionstringcreate, list, get, update, delete
idstringPromotion UUID (required for get, update, delete). Alias: promotion_id
promotion_idstringAlias of id
site_idstringSeller site UUID (defaults to current site)
user_idstringOwner user UUID (defaults to site owner)
campaign_idstringCampaign UUID (required for create)
namestringPromotion name (required for create)
descriptionstringPromotion description
codestringOptional promo code; unique per site when set
discount_typestringpercent, fixed, or bogo
discount_valuenumberPercent 0-100, fixed amount, or BOGO marker
applies_tostringall (default) or selected_items
min_order_amountnumberMinimum order amount to qualify
usage_limitnumberGlobal max redemptions
usage_limit_per_usernumberPer-user redemption cap
statusstringdraft (default), active, paused, expired
starts_atstringValidity start (ISO timestamptz)
ends_atstringValidity end (ISO timestamptz)
channelsarraymarketplace, shop, pos
location_idsarrayOptional business location UUIDs
active_weekdaysarray0-6 (Sun-Sat)
required_items_modestringall or any
bogo_buy_qtynumberBOGO buy quantity (default 1)
bogo_get_qtynumberBOGO get quantity (default 1)
image_urlstringPublic image URL
show_on_shopbooleanShow on shop
show_on_marketplacebooleanShow on marketplace
currencystringCurrency code
catalog_item_idsarrayItem UUIDs the discount applies to (replace-if-provided on update)
catalog_category_idsarrayCategory UUIDs the discount applies to
required_itemsarray{ catalog_item_id, min_quantity? } required to qualify
required_categoriesarray{ catalog_category_id, min_quantity? } required to qualify
searchstringSearch name or code on list
active_nowbooleanOn list, only promotions whose window includes now
limitnumberMax results for list
offsetnumberPagination offset

REST Endpoint

POST /api/agents/tools/promotions
POST /api/agents/tools/promotions Authorization: Bearer YOUR_API_KEY Content-Type: application/json { "action": "create", "site_id": "YOUR_SITE_ID", "campaign_id": "YOUR_CAMPAIGN_ID", "name": "20% off coffee", "discount_type": "percent", "discount_value": 20, "applies_to": "selected_items", "catalog_item_ids": ["CATALOG_ITEM_UUID"], "status": "active" }

Response:

{ "success": true, "promotion": { "id": "...", "name": "20% off coffee", "discount_type": "percent", "discount_value": 20, "status": "active", "catalog_items": [{ "id": "...", "catalog_item_id": "..." }] } }
Last updated on