GET
/
admin
/
promotions
/
rule-value-options
/
{rule_type}
/
{rule_attribute_id}
JS SDK
import Medusa from "@medusajs/js-sdk"

export const sdk = new Medusa({
  baseUrl: import.meta.env.VITE_BACKEND_URL || "/",
  debug: import.meta.env.DEV,
  auth: {
    type: "session",
  },
})

sdk.admin.promotion.listRuleValues("rules", "attr_123")
.then(({ values }) => {
  console.log(values)
})
{
"limit": 123,
"offset": 123,
"count": 123,
"values": [
{
"value": "reg_123",
"label": "Europe Region"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

rule_type
enum<string>
required

The rule type.

Available options:
rules,
target-rules,
buy-rules
rule_attribute_id
string
required

The rule attribute's ID.

Query Parameters

offset
number

The number of items to skip when retrieving a list.

limit
number

Limit the number of items returned in the list.

order
string

The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with -.

promotion_type
enum<string>

The promotion type to retrieve rules for.

Available options:
standard,
buyget
application_method_type
enum<string>

The application method type to retrieve rules for.

Available options:
fixed,
percentage
with_deleted
boolean

Whether to include deleted records in the result.

Response

OK

The paginated list of rule values. The pagination fields. The list of rule values.

limit
number
required

The maximum number of items returned.

offset
number
required

The number of items skipped before retrieving the returned items.

count
number
required

The total number of items.

values
object[]
required

The list of rule values.