# Login
# Login EI
Sử dụng APi này để login tài khoản đăng ký trên hệ thống của EI-Shop, cho cả khách hàng cá nhân và khách hàng công ty
# Endpoint
POST http://api.example.com/api/auth/login
# Parameters
Name | Type | Description | Required |
---|---|---|---|
Required parameters | String | ✔️ | |
Optional parameters | String | ➖ |
# Response
{
"status": true,
"messageCode": "success",
"messageContent": "success",
"data": {
"id": 13,
"companyId": 1,
"customerName": "customerName",
"code": "code",
"avatar": "link-img",
"email": "email",
"phone": "phone",
"address": "address",
"taxCode": "taxCode",
"dataAddress": [],
"dataAddressInvoice": [],
"tokens": {
"status": true,
"access": {
"token": "token",
"expires": "2021-07-21T07:14:15.378Z"
},
"refresh": {
"token": "token",
"expires": "2022-06-21T07:14:15.381Z"
}
}
}
}
curl -X POST http://api.example.com/api/auth/login \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"username": "my-username",
"password": "my-password"
}'
# Login GG
Sử dụng APi này để login tài khoản đăng ký trên hệ thống của EI-Shop, cho cả khách hàng cá nhân và khách hàng công ty
# Endpoint
POST http://api.example.com/api/auth/login
# Parameters
Name | Type | Description | Required |
---|---|---|---|
Required parameters | String | ✔️ | |
Optional parameters | String | ➖ |
# Response
Status:200
{
Items:{
}
}
curl -X POST http://api.example.com/api/auth/login \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <const name="MOCK_TOKEN" />' \
--data '{
"username": "my-username",
"password": "my-password"
}'