Get current admin user and permissions
Returns the current admin user profile and a serialized list of permissions (CanCanCan rules). The SPA uses these to drive UI permission checks.
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": "alane.lebsack@stanton.ca",
"first_name": "Columbus",
"last_name": "Stoltenberg",
"full_name": "Columbus Stoltenberg",
"created_at": "2026-06-17T13:37:02.089Z",
"updated_at": "2026-06-17T13:37:02.089Z",
"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
}
]
}Authorizations
Secret API key for admin access
JWT token for admin user authentication
Headers
Bearer token for admin authentication
Was this page helpful?
⌘I
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": "alane.lebsack@stanton.ca",
"first_name": "Columbus",
"last_name": "Stoltenberg",
"full_name": "Columbus Stoltenberg",
"created_at": "2026-06-17T13:37:02.089Z",
"updated_at": "2026-06-17T13:37:02.089Z",
"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
}
]
}
