고객 수정
v1 API 상세: 회원
등록된 고객 정보를 수정합니다.
API 엔드포인트
요청 파라미터
요청 파라미터
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| user_id | String | Y | 고객 ID 또는 external_uid (URL 경로) |
| name | String | N | 고객 이름 |
| phone | String | N | 휴대폰 번호 |
| String | N | 이메일 주소 (연락용 이메일입니다 — 로그인 이메일은 바뀌지 않습니다) | |
| tel | String | N | 유선 전화번호 |
| nickname | String | N | 별명 |
| gender | Integer | N | 성별 (0: 비공개, 1: 남성, 2: 여성) |
| birth | String | N | 생년월일 6자리 |
| login_id | String | N | 로그인 아이디 |
| login_pw | String | N | 로그인 비밀번호 |
| comment | String | N | 추가 정보/메모 |
코드 예제
curl -X PUT "https://api.bootapi.com/v1/users/67e4b4425ec892162491d0ec" \
-H "Authorization: Basic {base64(client_key:secret_key)}" \
-H "Content-Type: application/json" \
-d '{
"name": "홍길동",
"phone": "01098765432",
"email": "new-email@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.user.update({
user_id: '67e4b4425ec892162491d0ec',
name: '홍길동',
phone: '01098765432',
email: 'new-email@example.com'
})
console.log(response)from bootpay_backend import BootpayCommerce
commerce = BootpayCommerce(
client_key='your-commerce-client-key',
secret_key='your-commerce-secret-key',
mode='production'
)
response = commerce.user.update({
'user_id': '67e4b4425ec892162491d0ec',
'name': '홍길동',
'phone': '01098765432',
'email': 'new-email@example.com'
})
print(response)use Bootpay\ServerPhp\BootpayCommerceApi;
$commerce = new BootpayCommerceApi("your-commerce-client-key", "your-commerce-secret-key");
$response = $commerce->user->update([
'user_id' => '67e4b4425ec892162491d0ec',
'name' => '홍길동',
'phone' => '01098765432',
'email' => 'new-email@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.SUser;
TokenPayload tp = new TokenPayload("your-commerce-client-key", "your-commerce-secret-key");
BootpayStore commerce = new BootpayStore(tp).withToken();
SUser user = new SUser();
user.userId = "67e4b4425ec892162491d0ec";
user.name = "홍길동";
user.phone = "01098765432";
user.email = "new-email@example.com";
BootpayStoreResponse response = commerce.user.update(user);
System.out.println(response);require 'bootpay'
commerce = BootpayStore::RestClient.new(client_key: 'your-commerce-client-key', secret_key: 'your-commerce-secret-key')
response = commerce.user_update(
user_id: '67e4b4425ec892162491d0ec',
name: '홍길동',
phone: '01098765432',
email: 'new-email@example.com'
)
puts response.dataimport "github.com/bootpay/backend-go/v2"
commerce := bootpay.NewCommerceAPI("your-commerce-client-key", "your-commerce-secret-key", nil, "production")
response, err := commerce.User.Update(bootpay.CommerceUser{
UserId: "67e4b4425ec892162491d0ec",
Name: "홍길동",
Phone: "01098765432",
Email: "new-email@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.UserUpdate(new CommerceUser {
UserId = "67e4b4425ec892162491d0ec",
Name = "홍길동",
Phone = "01098765432",
Email = "new-email@example.com"
});
Console.WriteLine(await response.Content.ReadAsStringAsync());응답
성공 응답
JSON
{
"user_id": "67e4b4425ec892162491d0ec",
"name": "홍길동",
"email": "new-email@example.com",
"phone": "01098765432",
"updated_at": "2025-07-11T14:00:00Z"
}실제 응답은 회원 상세와 같은 전체 회원 객체입니다. 위에는 주요 필드만 적었습니다.
에러 응답
HTTP/1.1 404 Not Found
Content-Type: application/jsonJSON
{
"error_code": "USER_NOT_FOUND",
"message": "회원정보가 없습니다. 다시 확인해주세요."
}에러 코드
오류 코드
| 코드 | 메시지 | 대처 방법 |
|---|---|---|
USER_NOT_FOUND | 회원정보가 없습니다. 다시 확인합니다. | user_id를 확인합니다 |
USER_EMAIL_INVALID | 이메일이 입력되지 않았거나 이메일 형식에 맞지 않는다 다시 입력합니다 | 올바른 이메일 형식으로 입력합니다 |