Note: To avoid too many queries leading to server overload, the time interval between each query to create an account should be at least 5 seconds
Query Parameters
Name
Type
Description
token
string
Account Authentication Token
Request Body
Name
Type
Description
job
string
Job Title
gender
string
Gender
street
string
Street
district
string
District
city
string
City
phone
string
Phone
name
string
Full name in string format and has at least 3 characters
username
string
Username in string format with no space and special character and a length of 3 to 20 characters
email
string
Email
password
string
Password with a length of 6 to 35 characters
// Response Code "00". Create an account successfully.// Return data:{"respCode": "00","user": {"userId":"zKpEoZmyDwMP9gtGr","name":"Nguyễn Văn A","username":"nguyenvana","email":"nguyenvana@abc.com","status":"Success created" },"msg": "Create user success"}
// Response Code "02". No request body.// Return data:{"respCode": "02","user": null,"msg": "No request body"}// Response Code "03". No name in request body.// Return data:{"respCode": "03","user": null,"msg": "No name in request body"}// Response Code "04". No name in request body.// Return data:{"respCode": "04","user": null,"msg": "No name in request body"}// Response Code "05". No name in request body.// Return data:{"respCode": "05","user": null,"msg": "No name in request body"}// Response Code "06". No password in request body.// Return data:{"respCode": "06","user": null,"msg": "No password in request body"}// Response Code "07". No token provided.// Return data:{"respCode": "07","user": null,"msg": "No token"}// Response Code "13". Email already in use.// Return data:{"respCode": "13","user": null,"msg": "Email already in use"}// Response Code "14". Username already in use.// Return data:{"respCode": "14","user": null,"msg": "Username already in use"}
// Response Code "09". Token is invalid or has expired.// Return data:{"respCode": "09","user": null,"msg": "Invalid token || Token has expired"}
// Response Code "10". Your account is not authorized to perform the query.// Return data:{"respCode": "10","user": null,"msg": "Your account does not have permission"}// Response Code "12". The server has reached the maximum number of accounts.// Return data:{"respCode": "12","user": null,"msg": "The number of accounts has run out"}
// Response Code "01". Wrong request method.// Return data: {"respCode": "01","user": null,"msg": "Request method should be POST"}
// Response Code "08". Server not able to authenticate your account.// Return data: "respCode": "08","user": null,"msg": "Server not able to authenticate your account"}// Response Code "11". Server is not able to check your website resources.// Return data: {"respCode": "11","user": null,"msg": "Server is not able to check your website resources"}// Response Code "15". Server is not able to create new user.// Return data: {"respCode": "15","user": null,"msg": "Server is not able to create new user"}
Example:
// POST:https://abc.hoola.vn/manage/api/users/create-single-user?token=sdhg23797sdbv9186jdvk58body: { name:"Nguyễn Văn A", username:"nguyenvana", email:"nguyenvana@abc.com", password:"1234567890", phone:"0987654321", city:"Hà Nội", district:"Quận Cầu Giấy", street:"40 Hoàng Đạo Thuý", gender:"Nam", job:"Giáo viên THCS"}