Spree Admin SDK
Delete a role
Deletes a role. Fails with 422 while the role is protected or still referenced by staff members or pending invitations.
Required scope: write_staff (for API-key authentication).
DELETE
Spree Admin SDK
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
await client.roles.delete('role_abc123')spree api delete /roles/{id}{
"error": {
"code": "validation_error",
"message": "Roles cannot be deleted"
}
}Deletes a role. Fails with 422 while the role is protected or still referenced by staff members or pending invitations.
Required scope: write_staff (for API-key authentication).
import { createAdminClient } from '@spree/admin-sdk'
const client = createAdminClient({
baseUrl: 'https://your-store.com',
secretKey: 'sk_xxx',
})
await client.roles.delete('role_abc123')spree api delete /roles/{id}{
"error": {
"code": "validation_error",
"message": "Roles cannot be deleted"
}
}Was this page helpful?
