Skip to main content

14. Create Account

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

Parameters

ParameterRequiredDescription
nameyesDisplay name of the account
first_addressyesDetailed address (e.g., house number, alley, street, ward/commune, etc.)
provinceyesProvince/City name – e.g., Hà Nội, Thái Bình
districtyesDistrict or city under the province – e.g., Cầu Giấy, Tp. Thái Bình
telyesPhone number for contact
emailyesEmail address of the account

Note

info

Note: Accounts created via the API can log in using the email and create orders on the GHTK system just like any regular account.

info

Note: If the B2C shop's customer already has an account on the GHTK system, you can retrieve the token from the "Edit Shop Information" section. It is not mandatory to create a new account via API.

Response

When an account is successfully created:
ParameterRequiredDescription
data.codeyesGHTK’s account code
data.tokenyesAccount’s token
{
"success": true,
"message": "Thành công",
"data": {
"code": "S55163",
"token": "93A7392A44c99e7Ca395eef1321D03731B844111"
}
}
When the provided email or phone number is already in use for another account
{
"success": false,
"message": "Email shop này đã tồn tại",
"data": null
}

When the B2C account does not have permission to create new accounts
{
"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
}