Skip to main content

Overview

The Promotions API enables you to create flexible discount campaigns including percentage discounts, fixed amount discounts, free shipping, and buy X get Y offers. Base Path: /admin/promotions Source: packages/medusa/src/api/admin/promotions/route.ts

List Promotions

Retrieve all promotions with filtering and pagination.

Query Parameters

string
Comma-separated list of fields to include.
number
default:"15"
Maximum number of promotions to return.
number
default:"0"
Number of promotions to skip.
string
Search query for promotion code or name.
string
Filter by campaign ID.
boolean
Filter by whether promotion is automatically applied.

Request

Response

Promotion[]
Array of promotion objects.
string
Promotion type: standard or buyget.
boolean
Whether the promotion is automatically applied without a code.
Source: packages/medusa/src/api/admin/promotions/route.ts:13

Create Promotion

Create a new promotion.

Request Body

string
Unique promotion code. Required if is_automatic is false.
string
required
Promotion type: standard or buyget.
boolean
default:"false"
Whether to automatically apply the promotion.
string
Associate promotion with a campaign.
object
required
How the discount is applied.
object[]
Conditions that must be met for the promotion to apply.

Request

Response

Source: packages/medusa/src/api/admin/promotions/route.ts:38

Get Promotion

Retrieve a single promotion by ID.

Path Parameters

string
required
The promotion’s ID.

Request

Response

Update Promotion

Update an existing promotion.

Path Parameters

string
required
The promotion’s ID.

Request Body

Accepts the same fields as Create Promotion, all optional.

Request

Delete Promotion

Delete a promotion.

Request

Response

Campaigns

Campaigns group related promotions together.

List Campaigns

Retrieve all campaigns.
Source: packages/medusa/src/api/admin/campaigns/route.ts

Create Campaign

Create a new campaign.

Request Body

string
required
Campaign name.
string
Campaign description.
string
required
Unique identifier for the campaign.
string
Campaign start date.
string
Campaign end date.
object
Campaign budget configuration.

Add Promotions to Campaign

Associate promotions with a campaign.
Source: packages/medusa/src/api/admin/campaigns/[id]/promotions/route.ts

Promotion Examples

Percentage Discount

20% off entire order:

Fixed Amount Discount

10offordersover10 off orders over 50:

Free Shipping

Free shipping for VIP customers:

Buy X Get Y

Buy 2 items, get 1 free:

Product-Specific Discount

30% off specific products:

Automatic Promotion

Automatic 5% discount for all orders:

Next Steps

Pricing

Manage product pricing

Orders

View promotion usage in orders