Skip to main content

13. Tạo tài khoản

Create Account

Path

POST /services/shops/add
POST https://services.giaohangtietkiem.vn/services/shops/add HTTP/1.1
Token: APITokenSample-ca441e70288cB0515F310742
Host: services.giaohangtietkiem.vn
Content-length: 351
Content-Type: application/x-www-form-urlencoded

name=shop+test&first_address=ng%C3%B5+2%2C+Phan+B%C3%A1+V%C3%A0nh%2C+C%E1%BA%A7u+Di%E1%BB%85n&province=H%C3%A0+N%E1%BB%99i&district=B%E1%BA%AFc+T%E1%BB%AB+Li%C3%AAm&tel=01234555666&email=shoptest%40email.com

Parameter Description

ParamsRequiredDescription
nameyesDisplay name of the account
first_addressyesDetailed address of the account (house number, alley, street, ward, etc.)
provinceyesName of province/city, e.g., Hanoi, Thai Binh.
districtyesName of district e.g., Cau Giay, Thai Binh City.
telyesContact phone number of the account.
emailyesEmail of the account.

Note

info

Note: Accounts created via the API can log in using their email and place orders on the GHTK system like any other regular accounts.

info

Note: If the customer of the B2C shop already has an account on GHTK, the token information can be retrieved from the "Edit Shop Information" section. There is no need to create a new account via the API.

Response

Response when account creation is successful:
ParamsRequiredDescription
data.codeyesAccount code on the GHTK system.
data.tokenyesToken of the account.
{
"success": true,
"message": "Thành công",
"data": {
"code": "S55163",
"token": "93A7392A44c99e7Ca395eef1321D03731B844111"
}
}
In the case that the email or phone number has already been used for another account.
{
"success": false,
"message": "Email shop này đã tồn tại",
"data": null
}

In the case that the B2C account does not have permission to create a new account.
{
"success": false,
"message": "Tài khoản của bạn không có quyền tạo tài khoản mới trên GHTK",
"data": null
}