Medusa Promotions API

A promotion discounts an amount or percentage off a cart's items, shipping methods, or the entire order. Promotions have different types, such as a `standard` promotion that just discounts an amount, or a `buyget` promotion to enforce a "buy X get Y" promotion. A promotion has rules to restrict how and when they're applied. Promotions belong to a campaign, which sets conditions on the promotion such as when it starts and ends. These API routes allow admin users to manage promotions.

GitHub OpenAPI
Business capability
Discount & Promotion Management BC-440.30

Operations 11

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /admin/promotions List promotions · List Promotions #
Ask an LLM
“Which promotions are set up in my store?”
“Can I find a promotion by its code?”
Tell an agent
List all promotions.
Find the promotion with code {code}.
POST /admin/promotions Create a promotion · Create Promotion #
Ask an LLM
“How do I create a new promotion for a campaign?”
“Can a promotion be applied automatically?”
Tell an agent
Create a {type} promotion {code} under campaign {campaign_id} with application method {application_method}.
Add automatic promotion {code} of type {type} to campaign {campaign_id}, method {application_method}.
GET /admin/promotions/rule-attribute-options/{rule_type} List rule attributes for a promotion type · List Rule Attribute Options of a Rule Type #
Ask an LLM
“What attributes can I use to set up a promotion's rules?”
“Which attributes are available for a buyget promotion?”
Tell an agent
List rule attributes for {rule_type} of promotion type {promotion_type}.
Show {rule_type} attributes for application method {application_method_type}.
GET /admin/promotions/rule-value-options/{rule_type}/{rule_attribute_id} List rule values for an attribute · List Rule Values Given a Rule Attribute #
Ask an LLM
“What values can a promotion rule attribute take?”
“Can I see the currency options for a promotion rule?”
Tell an agent
List values for {rule_type} attribute {rule_attribute_id}.
Show {rule_type} rule values for attribute {rule_attribute_id} matching {value}.
GET /admin/promotions/{id} Get a promotion · Get a Promotion #
Ask an LLM
“What are the details of one promotion?”
“Can I look up a promotion by its ID?”
Tell an agent
Get promotion {id}.
Show the details of promotion {id}.
POST /admin/promotions/{id} Update a promotion · Update a Promotion #
Ask an LLM
“How do I change a promotion's code or type?”
“Can I switch which campaign a promotion belongs to?”
Tell an agent
Update promotion {id} to code {code}, type {type}, campaign {campaign_id}.
Set promotion {id} to application method {application_method}.
DELETE /admin/promotions/{id} Delete a promotion · Delete a Promotion #
Ask an LLM
“How do I remove a promotion?”
“Can I delete a promotion by its ID?”
Tell an agent destructive · confirm first
Delete promotion {id}.
Remove promotion {id} from the store.
POST /admin/promotions/{id}/buy-rules/batch Create, update or delete a promotion's buy rules · Manage the Buy Rules of a Promotion #
Ask an LLM
“How do I add or change the buy rules of a buyget promotion?”
“Can I delete a buy rule from a promotion?”
Tell an agent
Apply buy rules {create} to promotion {id}.
Update buy rules {update} on promotion {id}.
POST /admin/promotions/{id}/rules/batch Create, update or delete a promotion's rules · Manage a Promotion's Rules #
Ask an LLM
“How do I manage the rules of a standard promotion?”
“Can I add or remove promotion rules in bulk?”
Tell an agent
Apply rules {create} to promotion {id}.
Update rules {update} on promotion {id}.
POST /admin/promotions/{id}/target-rules/batch Create, update or delete a promotion's target rules · Manage Target Rules of a Promotion #
Ask an LLM
“How do I manage the target rules of a promotion?”
“Can I change which items a promotion applies to?”
Tell an agent
Apply target rules {create} to promotion {id}.
Update target rules {update} on promotion {id}.
GET /admin/promotions/{id}/{rule_type} List a promotion's rules · List Rules of a Promotion #
Ask an LLM
“What rules does a promotion have?”
“Can I see only the target rules of a promotion?”
Tell an agent
List {rule_type} rules of promotion {id}.
Show {rule_type} rules for promotion {id} of type {promotion_type}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/medusa:medusa-promotions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

medusa-promotions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 2.19.0
  title: Medusa Admin Promotions API
  license:
    name: MIT
    url: https://github.com/medusajs/medusa/blob/develop/LICENSE
  description: 'A promotion discounts an amount or percentage off a cart''s items, shipping methods, or the entire order.


    Promotions have different types, such as a `standard` promotion that just discounts an amount, or a `buyget` promotion to enforce a "buy X get Y" promotion.


    A promotion has rules to restrict how and when they''re applied.


    Promotions belong to a campaign, which sets conditions on the promotion such as when it starts and ends.


    These API routes allow admin users to manage promotions.'
servers:
- url: http://localhost:9000
- url: https://api.medusajs.com
tags:


# --- truncated at 32 KB (103 KB total) ---
# Full source: https://artifacts.apis.io/medusa/openapi/medusa-promotions-api-openapi.yml