---
title: "Get Children Group of the Customer Group"
method: GET
path: "/customer_groups/{parentCustomerGroupId}/customer_group_children"
tags: ["Customer Group Children"]
---

# Get Children Group of the Customer Group

`GET /customer_groups/{parentCustomerGroupId}/customer_group_children`

## Request

- Base URL: `https://open.shopline.io/v1`
- URL: `https://open.shopline.io/v1/customer_groups/{parentCustomerGroupId}/customer_group_children`
- Auth: HTTP bearer

To get child customer groups of the customer group.<br>取得母分群的子分群。

## Path parameters

- `parentCustomerGroupId` string, required

## Query parameters

- `page` integer
- `per_page` integer
- `sort_by` string

## Response `200`

OK

- object
  - `parent` CustomerGroup
    - `id` string
    - `name` string
    - `count` number: The customer group user count.<br>分群顧客人數
    - `email_users_count` number: Email count of the customer group.<br>分群中有email的人數
    - `mobile_phone_users_count` number: Mobile phone count of the customer group.<br>分群中有手機的人數
    - `updated_at` string
    - `created_at` string
    - `status` 'active' | 'expired'
    - `update_type` 'manual' | 'auto': The updated way.<br>更新方式
    - `update_cycle` number: The updated cycle in days.<br>更新週期（天數）
    - `created_by` 'manual' | 'auto': The updated way only for child customer group.<br>子分群更新方式
    - `parent_id` string: ID of parent customer group.<br>母分群的ID
    - `last_child_id` string: last child id.<br>最新子分群的ID
    - `last_updated_at` string
    - `next_update_at` string
    - `expired_at` string: The expired time of the customer group.<br>此分群的過期時間
  - `children` CustomerGroup[]
    - `id` string
    - `name` string
    - `count` number: The customer group user count.<br>分群顧客人數
    - `email_users_count` number: Email count of the customer group.<br>分群中有email的人數
    - `mobile_phone_users_count` number: Mobile phone count of the customer group.<br>分群中有手機的人數
    - `updated_at` string
    - `created_at` string
    - `status` 'active' | 'expired'
    - `update_type` 'manual' | 'auto': The updated way.<br>更新方式
    - `update_cycle` number: The updated cycle in days.<br>更新週期（天數）
    - `created_by` 'manual' | 'auto': The updated way only for child customer group.<br>子分群更新方式
    - `parent_id` string: ID of parent customer group.<br>母分群的ID
    - `last_child_id` string: last child id.<br>最新子分群的ID
    - `last_updated_at` string
    - `next_update_at` string
    - `expired_at` string: The expired time of the customer group.<br>此分群的過期時間
  - `pagination` Paginatable
    - `current_page` integer: The current page number<br>當前分頁
    - `per_page` integer: Number of result per page<br>每頁顯示 n 筆資料<br>(Default: 24)
    - `total_count` integer: Number of result in total<br>資料總量
    - `total_pages` integer: Number of pages in total<br>總頁數量

## Other responses

- `422`: Unprocessable entity error
- `500`: Server error

---

[API](https://skmtc.dev/shoplineapp/apis/shopline-open-api.md) - [All operations](https://skmtc.dev/shoplineapp/apis/shopline-open-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shoplineapp/apis/shopline-open-api/revisions/d2518391b149?raw)
