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

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

const result = await client.customers.bulkRemoveFromGroups({
  ids: ['cus_UkLWZg9DAJ'],
  customer_group_ids: ['cg_UkLWZg9DAJ'],
})
{
  "customer_count": 1,
  "customer_group_count": 1
}

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

Body

application/json
ids
string[]
required
Example:
["cus_UkLWZg9DAJ"]
customer_group_ids
string[]
required
Example:
["cg_UkLWZg9DAJ"]

Response

200 - application/json

customers removed from groups

customer_count
integer
customer_group_count
integer