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

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

const me = await client.me.get()
if (me.permissions.some((r) => r.allow && r.actions.includes('manage') && r.subjects.includes('Spree::Product'))) {
  // show "Create product" button
}
{
  "user": {
    "id": "admin_UkLWZg9DAJ",
    "email": "nathanael@ritchie.name",
    "first_name": "Venessa",
    "last_name": "Bechtelar",
    "full_name": "Venessa Bechtelar",
    "created_at": "2026-05-24T17:37:03.068Z",
    "updated_at": "2026-05-24T17:37:03.068Z",
    "roles": [
      {
        "id": "role_UkLWZg9DAJ",
        "name": "admin"
      }
    ]
  },
  "permissions": [
    {
      "allow": true,
      "actions": [
        "manage"
      ],
      "subjects": [
        "all"
      ],
      "has_conditions": false
    },
    {
      "allow": false,
      "actions": [
        "cancel"
      ],
      "subjects": [
        "Spree::Order"
      ],
      "has_conditions": false
    },
    {
      "allow": true,
      "actions": [
        "cancel"
      ],
      "subjects": [
        "Spree::Order"
      ],
      "has_conditions": true
    },
    {
      "allow": false,
      "actions": [
        "destroy"
      ],
      "subjects": [
        "Spree::Order"
      ],
      "has_conditions": false
    },
    {
      "allow": true,
      "actions": [
        "destroy"
      ],
      "subjects": [
        "Spree::Order"
      ],
      "has_conditions": true
    },
    {
      "allow": false,
      "actions": [
        "edit",
        "update"
      ],
      "subjects": [
        "Spree::RefundReason"
      ],
      "has_conditions": true
    },
    {
      "allow": false,
      "actions": [
        "edit",
        "update"
      ],
      "subjects": [
        "Spree::ReimbursementType"
      ],
      "has_conditions": true
    },
    {
      "allow": false,
      "actions": [
        "update",
        "destroy"
      ],
      "subjects": [
        "Spree::Role"
      ],
      "has_conditions": true
    }
  ]
}

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

Bearer token for admin authentication

Response

current admin user and permissions

Current admin user profile and serialized permissions

user
object
required
permissions
object[]
required