Skip to main content
GET
/
api
/
v3
/
admin
/
promotion_actions
/
types
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const { data: actionTypes } = await client.promotionActions.types()
{
  "data": [
    {
      "type": "create_line_items",
      "label": "Create line items",
      "description": null,
      "preference_schema": []
    },
    {
      "type": "create_item_adjustments",
      "label": "Create per-line-item adjustment",
      "description": null,
      "preference_schema": []
    },
    {
      "type": "create_adjustment",
      "label": "Create whole-order adjustment",
      "description": null,
      "preference_schema": []
    },
    {
      "type": "free_shipping",
      "label": "Free shipping",
      "description": null,
      "preference_schema": []
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Response

200 - application/json

action types found