API Create Store by OTP (Affiliate)
Use API add staff is mean manage your store.
Caution : The API Add Staff to the Store need to infusion token in header
post/get
https://online-gateway.ghn.vn/shiip/public-api/v2/shop/affiliateCreate
https://dev-online-gateway.ghn.vn/shiip/public-api/v2/shop/affiliateCreate
curl --location --request POST 'https://dev-online-gateway.ghn.vn/shiip/public-api/v2/shop/affiliateCreate' \
--header 'Content-Type: application/json' \
--header 'Token: 637170d5-942b-11ea-9821-0281a26fb5d4' \
--data-raw '{
"phone": "0988367330",
"otp": "262965",
"address":"35 đồng đen",
"district_id":1442,
"ward_code":"20106"
}'
Parameter
Field | Type | Description |
---|---|---|
token | String |
Must be sent with all client requests. This Token helps server to validate request source. Provided by GHN. |
phone | Int |
Phone number of shop owner (The phone number created in system of GHN). |
otp | Int |
Get in API OTP |
address | String |
Client address for Saler |
district_id | Int |
District ID drop off parcels.Use API Get District |
ward_code | String |
Ward Code pick up parcels.Use API Get Ward |
{
"code": 200,
"message": "Success",
"data": {
"client_id":2500024,
"shop_id":53620
}
}
Structure Response
Field | Description |
---|---|
client_id |
Client ID |
shop_id |
Shop ID |
{
"code": 400,
"message": "Client have existed in Shop",
"data": null
"code_message": "CLIENT_HAVE_EXISTED",
"code_message_value": "Người dùng đã được thêm vào cửa hàng"
}