Tạo nhân viên
API này dùng để thêm mới nhân viên vào Shop
Roles []shop_user_role.UserRole json:"roles"
POST /CreateAccountUser HTTP/1.1
Host: $BASE_URL.Shop
Content-Type: application/json
Accept: */*
Content-Length: 53
{
"full_name": "text",
"password": "text",
"phone": "text"
}
A successful response
{
"block_reason": "text",
"blocked_at": "2025-07-05T13:59:34.277Z",
"created_at": "2025-07-05T13:59:34.277Z",
"email": "text",
"email_verification_sent_at": "2025-07-05T13:59:34.277Z",
"email_verified_at": "2025-07-05T13:59:34.277Z",
"full_name": "text",
"id": "text",
"is_blocked": true,
"phone": "text",
"phone_verification_sent_at": "2025-07-05T13:59:34.277Z",
"phone_verified_at": "2025-07-05T13:59:34.277Z",
"ref_aff": "text",
"ref_sale": "text",
"short_name": "text",
"source": "unknown",
"total_shop": 1,
"updated_at": "2025-07-05T13:59:34.277Z"
}
Request:
curl --location '$BASE_URL.Shop/CreateAccountUser' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer $API-KEY' \
--data '{
"full_name": "<string>",
"password": "<string>",
"phone": "<string>"
}'
Response:
{
"block_reason": "string",
"blocked_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"email": "string",
"email_verification_sent_at": "2019-08-24T14:15:22Z",
"email_verified_at": "2019-08-24T14:15:22Z",
"full_name": "string",
"id": "string",
"is_blocked": true,
"phone": "string",
"phone_verification_sent_at": "2019-08-24T14:15:22Z",
"phone_verified_at": "2019-08-24T14:15:22Z",
"ref_aff": "string",
"ref_sale": "string",
"short_name": "string",
"source": "unknown",
"total_shop": 0,
"updated_at": "2019-08-24T14:15:22Z"
}
Cấu trúc body của request:
full_name required
string
Tên nhân viên
password required
string
Mật khẩu đăng nhập
phone required
string
Số điện thoại
Cấu trúc thuộc tính dữ liệu trả về:
block_reason
string
Lý do bị chặn
blocked_at
string<date-time>
Thời gian bị chặn
created_at
string<date-time>
Thời gian khởi tạo
string
Địa chỉ email
email_verification_sent_at
string<date-time>
Thời gian gửi email xác thực
email_verified_at
string<date-time>
Thời gian xác thực email
full_name
string
Tên nhân viên
id
string
ID của nhân viên
is_blocked
boolean
Trạng thái chặn
True
False
phone
string
Số điện thoại
phone_verification_sent_at
string<date-time>
Thời gian gửi xác thực số điện thoại
phone_verified_at
string<date-time>
Thời gian xác thực số điện thoại
short_name
string
Tên rút ngắn
total_shop
int
Tổng số shop làm chủ
updated_at
string<date-time>
Thời gian cập nhật
Last updated