Đăng nhập lấy token
POST /<provider>/sign-in
API dùng để xác thực và lấy token truy cập cho các yêu cầu tiếp theo.
Headers
| Name | Required | Description |
|---|---|---|
Content-Type | ✅ | application/json |
X-Tax-Code | ✅ | Mã số thuế người bán (cửa hàng...) |
Body Parameters
| Name | Required | Description |
|---|---|---|
username | ✅ | Tên đăng nhập |
password | ✅ | Mật khẩu |
Response
| Name | Description |
|---|---|
success | API thực thi thành công hay không |
token | Thông tin token truy cập vào hệ thống |
message | Thông báo tổng quan (nếu có) |
error_code | Mã lỗi (nếu có) |
errors | Danh sách lỗi (nếu có) |
- cURL
- Response
curl --location 'https://stag-invoice-hub.atomsolution.vn/m-invoice/sign-in' \
--header 'x-tax-code: 0106026495-998' \
--header 'Content-Type: application/json' \
--data-raw '{"username":"ATOM","password":"Kythuat@123"}'
{
"token": "O87316arj5+Od3Fqyy5hzdBfIuPk73eKqpAzBSvv8sY=",
"message": "Thành công",
"success": true
}