그룹 생성
기업 고객 그룹을 생성합니다. 같은 기업에 속한 사용자를 한 그룹으로 묶어 관리합니다.
API 엔드포인트
권한의 역할 부분(user · manager 등)은 Bootpay-Role 헤더로 바꿀 수 있습니다. v1 회원 그룹 API 상세 명세에서 인증과 응답 필드를 확인합니다.
그룹 유형 (corporate_type)
| 키 | 값 | 설명 |
|---|---|---|
individual | 1 | 개인 그룹 — 회원 가입 시 자동 생성되는 개인 전용 그룹 |
business | 2 | 기업 그룹 — 동일 기업 소속 사용자를 통합 관리, 기업 구독·결제 일괄 처리 |
department | 3 | 부서 그룹 — 기업 내 부서 단위 |
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| company_name | String | N | 회사명 (서버가 빈 값을 검사하지 않으니 보냅니다) |
| business_number | String | Y | 사업자등록번호. 하이픈 없이 저장되며 프로젝트 안에서 중복될 수 없습니다 |
| manager_phone | String | N | 담당자 연락처 |
| manager_email | String | N | 담당자 이메일 |
| registration_number | String | N | 법인등록번호 |
| business_type | String | N | 업종 |
| corporate_established | String | N | 설립일 |
| manager_name | String | N | 담당자명 |
| phone | String | N | 전화번호 |
| String | N | 이메일 | |
| zipcode | String | N | 우편번호 |
| address | String | N | 주소 |
| address_detail | String | N | 상세주소 |
| uid | String | N | 가맹점 고유값. ex_uid·external_uid 로도 보낼 수 있고 프로젝트 안에서 중복될 수 없습니다 |
| bank / bank_code | String | N | 계좌번호 / 은행 코드 |
| auth_bank | Boolean | N | 계좌 인증 여부 |
| pccc | String | N | 개인통관고유부호 |
| use_subscription_aggregate_transaction | Boolean | N | 합산 결제 사용 여부 (기본 false) |
| subscription_month_day / subscription_week_day | Integer | N | 월·주 합산 결제일 (기본 1) |
| limit_month_purchase / limit_week_purchase | Number | N | 월·주 구매 한도 (기본 0) |
| limit_message | String | N | 한도 초과 시 안내 문구 |
생성 요청은 use_limit 를 받지 않습니다. 구매 한도를 켜려면 생성 후 구매 한도 설정을 호출합니다.
코드 예제
curl -X POST "https://api.bootapi.com/v1/user-groups" \
-H "Authorization: Basic {base64(client_key:secret_key)}" \
-H "Content-Type: application/json" \
-d '{
"company_name": "(주)부트페이",
"business_number": "1234567890",
"manager_name": "김철수",
"phone": "0212345678",
"email": "company@example.com"
}'import { BootpayCommerce } from '@bootpay/backend-js'
const commerce = new BootpayCommerce({
client_key: 'your-commerce-client-key',
secret_key: 'your-commerce-secret-key',
mode: 'production'
})
const response = await commerce.userGroup.create({
company_name: '(주)부트페이',
business_number: '1234567890',
manager_name: '김철수',
phone: '0212345678',
email: 'company@example.com'
})
console.log('user_group_id:', response.user_group_id)from bootpay_backend import BootpayCommerce
commerce = BootpayCommerce(
client_key='your-commerce-client-key',
secret_key='your-commerce-secret-key',
mode='production'
)
response = commerce.user_group.create({
'company_name': '(주)부트페이',
'business_number': '1234567890',
'manager_name': '김철수',
'phone': '0212345678',
'email': 'company@example.com'
})
print('user_group_id:', response['user_group_id'])use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
$response = $commerce->userGroup->create([
'company_name' => '(주)부트페이',
'business_number' => '1234567890',
'manager_name' => '김철수',
'phone' => '0212345678',
'email' => 'company@example.com'
]);
print_r($response);import kr.co.bootpay.store.BootpayStore;
import kr.co.bootpay.store.model.request.TokenPayload;
import kr.co.bootpay.store.model.response.BootpayStoreResponse;
import kr.co.bootpay.store.model.pojo.SUserGroup;
TokenPayload tp = new TokenPayload("your-commerce-client-key", "your-commerce-secret-key");
BootpayStore commerce = new BootpayStore(tp).withToken();
SUserGroup userGroup = new SUserGroup();
userGroup.companyName = "(주)부트페이";
userGroup.businessNumber = "1234567890";
userGroup.managerName = "김철수";
userGroup.phone = "0212345678";
userGroup.email = "company@example.com";
BootpayStoreResponse response = commerce.userGroup.create(userGroup);
System.out.println(response);require 'bootpay'
commerce = BootpayStore::RestClient.new(client_key: 'your-commerce-client-key', secret_key: 'your-commerce-secret-key')
response = commerce.create_user_group(
company_name: '(주)부트페이',
business_number: '1234567890',
manager_name: '김철수',
phone: '0212345678',
email: 'company@example.com'
)
puts response.datacommerce := bootpay.NewCommerceAPI("your-commerce-client-key", "your-commerce-secret-key", nil, "production")
response, err := commerce.UserGroup.Create(bootpay.CommerceUserGroup{
CompanyName: "(주)부트페이",
BusinessNumber: "1234567890",
ManagerName: "김철수",
Phone: "0212345678",
Email: "company@example.com",
})
fmt.Println(response, err)using Bootpay.Commerce;
using Bootpay.Commerce.Models;
var commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
var response = await commerce.UserGroupCreate(new CommerceUserGroup {
CompanyName = "(주)부트페이",
BusinessNumber = "1234567890",
ManagerName = "김철수",
Phone = "0212345678",
Email = "company@example.com"
});
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
JSON
{
"user_group_id": "67e2052b03d0cb4e4117b0af",
"corporate_type": 2,
"phone": "0212345678",
"email": "company@example.com",
"company_name": "(주)부트페이",
"business_number": "1234567890",
"manager_name": "김철수",
"sub_group_type": 1,
"sub_group_type_label": "부서",
"sub_group_manager_label": "부서장",
"use_sub_group": false,
"use_limit": false,
"limit_month_purchase": 0.0,
"limit_week_purchase": 0.0,
"subscribed_month_limit": 0.0,
"subscribed_week_limit": 0.0
}응답에 status 는 없습니다. 주소(zip·addr1·addr2), registration_number·business_type·business_category, 통합 결제 설정(use_subscription_aggregate_transaction·subscription_month_day·subscription_week_day), limit_message 도 함께 옵니다.
에러 응답
HTTP/1.1 400 Bad Request
Content-Type: application/jsonJSON
{
"error_code": "USER_GROUP_BUSINESS_NUMBER_ALREADY_EXISTS",
"message": "중복된 사업자번호를 가진 그룹이 이미 존재합니다."
}그룹 상태 (status)
| 키 | 값 | 설명 |
|---|---|---|
active | 1 | 활성 |
inactive | 0 | 비활성 |
deleted | -1 | 삭제됨 |
에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
USER_GROUP_EXTERNAL_UID_EXIST | 중복된 사업자 UNIQ ID 입니다. | 다른 ex_uid를 사용합니다 |
USER_GROUP_BUSINESS_NUMBER_ALREADY_EXISTS | 중복된 사업자번호를 가진 그룹이 이미 존재합니다. | 기존 그룹을 확인합니다 |
USER_BUSINESS_NUMBER_BLANK | 기업회원은 사업자 등록번호를 입력해야합니다. | business_number를 입력합니다 |