그룹 회원 제거
기업 그룹(UserGroup)에 등록된 회원(User)을 제거합니다. 제거한 회원이 낸 주문은 기업 그룹에서 조회되지 않습니다.
API 엔드포인트
권한의 역할 부분(user · manager 등)은 Bootpay-Role 헤더로 바꿀 수 있습니다. 대상 회원은 URL 경로로 지정하며 회원 JWT는 읽지 않습니다. v1 회원 그룹 API 상세 명세에서 인증과 응답 필드를 확인합니다.
DELETE
/v1/user-groups/:user_group_id/user/:idBase URLhttps://api.bootapi.com
권한
manager:user_group_remove_user요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| user_group_id | String | Y | 그룹 ID 또는 그룹 생성 때 지정한 uid (URL 경로) |
| id | String | Y | 제거할 회원 ID, 가맹점 고유값 또는 로그인 ID (URL 경로, 요청 본문 아님) |
코드 예제
curl -X DELETE "https://api.bootapi.com/v1/user-groups/67e2052b03d0cb4e4117b0af/user/67e2052b03d0cb4e4117b0b1" \
-H "Authorization: Basic {base64(client_key:secret_key)}" \
-H "Bootpay-Role: manager"import { BootpayCommerce } from '@bootpay/backend-js';
const commerce = new BootpayCommerce({
client_key: '{client_key}',
secret_key: '{secret_key}'
});
const userGroupId = '67e2052b03d0cb4e4117b0af';
const response = await commerce.userGroup.userDelete(userGroupId, '67e2052b03d0cb4e4117b0b1');
console.log(response);from bootpay_backend.commerce import BootpayCommerce
commerce = BootpayCommerce('{client_key}', '{secret_key}')
user_group_id = '67e2052b03d0cb4e4117b0af'
response = commerce.user_group.user_delete(user_group_id, '67e2052b03d0cb4e4117b0b1')
print(response)use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("{client_key}", "{secret_key}");
$userGroupId = '67e2052b03d0cb4e4117b0af';
$response = $commerce->userGroup->userDelete($userGroupId, '67e2052b03d0cb4e4117b0b1');
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;
TokenPayload tokenPayload = new TokenPayload("{client_key}", "{secret_key}");
BootpayStore bootpay = new BootpayStore(tokenPayload).withToken();
String userGroupId = "67e2052b03d0cb4e4117b0af";
String userId = "67e2052b03d0cb4e4117b0b1";
BootpayStoreResponse response = bootpay.userGroup.userDelete(userGroupId, userId);
System.out.println(response.getData());require 'bootpay'
commerce = BootpayStore::RestClient.new(client_key: '{client_key}', secret_key: '{secret_key}')
user_group_id = '67e2052b03d0cb4e4117b0af'
response = commerce.delete_user_from_group(
user_group_id: user_group_id,
user_id: '67e2052b03d0cb4e4117b0b1'
)
puts response.datacommerce := bootpay.NewCommerceAPI("{client_key}", "{secret_key}", nil, "production")
userGroupId := "67e2052b03d0cb4e4117b0af"
response, err := commerce.UserGroup.UserDelete(userGroupId, "67e2052b03d0cb4e4117b0b1")
fmt.Println(response, err)using Bootpay.Commerce;
var commerce = new BootpayCommerceApi("{client_key}", "{secret_key}");
var userGroupId = "67e2052b03d0cb4e4117b0af";
var response = await commerce.UserGroupUserDelete(userGroupId, "67e2052b03d0cb4e4117b0b1");
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
HTTP 200 에 본문은 true 입니다.
JSON
true에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
USER_NOT_FOUND | 회원정보가 없습니다. 다시 확인해주세요. | user_id를 확인합니다 |
USER_GROUP_NOT_FOUND | 회원 그룹 정보를 찾지 못했습니다. 다시 로그인 해주세요. | user_group_id를 확인합니다 |
USER_NOT_IN_GROUP | 사용자가 그룹에 속해있지 않습니다. | 사용자의 그룹 소속을 확인합니다 |
탈퇴한 회원도 그룹에서 제거할 수 있습니다. 이 API 는 대상 회원의 탈퇴 여부를 검사하지 않습니다.