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

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

// Pass `expand: ['customers']` to embed the group's customers in the response
// — omit it for the much smaller index-payload shape.
const group = await client.customerGroups.get('cg_UkLWZg9DAJ', { expand: ['customers'] })
{
  "id": "cg_UkLWZg9DAJ",
  "name": "VIPs",
  "description": "Top spenders",
  "customers_count": 1,
  "created_at": "2026-05-24T17:36:39.681Z",
  "updated_at": "2026-05-24T17:36:39.681Z",
  "customers": [
    {
      "id": "cus_UkLWZg9DAJ",
      "email": "paola_balistreri@dicki.com",
      "first_name": "Janett",
      "last_name": "Marvin",
      "phone": null,
      "accepts_email_marketing": false,
      "full_name": "Janett Marvin",
      "available_store_credit_total": "0",
      "display_available_store_credit_total": "$0.00",
      "login": "paola_balistreri@dicki.com",
      "metadata": {},
      "last_sign_in_at": null,
      "current_sign_in_at": null,
      "created_at": "2026-05-24T17:36:39.940Z",
      "updated_at": "2026-05-24T17:36:39.940Z",
      "sign_in_count": 0,
      "failed_attempts": 0,
      "last_sign_in_ip": null,
      "current_sign_in_ip": null,
      "tags": [],
      "internal_note_html": null,
      "default_billing_address_id": null,
      "default_shipping_address_id": null,
      "orders_count": 0,
      "total_spent": "0.0",
      "display_total_spent": "$0.00",
      "last_order_completed_at": null
    }
  ]
}

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

Path Parameters

id
string
required

Customer group prefixed ID

Query Parameters

expand
string

Comma-separated associations to embed. Supported: customers.

fields
string

Comma-separated list of fields to include. id is always included.

Response

customer group with embedded customers

id
string
required
name
string
required
description
string | null
required
customers_count
number
required
created_at
string
required
updated_at
string
required
customers
object[]