API Reference
Authentication API
Sign-in and refresh token endpoints for the NTL Bill Online API.
POST
/v1/auth/sign-inSign in with environment credentials to receive an access token and refresh token.
Auth: No token required
Request body
| Field | Type | Required | Description |
|---|---|---|---|
username | string | Yes | Account provided by Nhất Tín. |
password | string | Yes | Password for the corresponding environment. |
curl --request POST \
--url https://apisandbox.ntlogistics.vn/v1/auth/sign-in \
--header "Content-Type: application/json" \
--data '{"username":"your_account","password":"your_password"}'Response
{
"success": true,
"data": {
"jwt_token": "<access_token>",
"token_type": "Bearer",
"token_expires_in": "1m",
"refresh_token": "<refresh_token>",
"refresh_expires_in": "2m"
}
}
POST
/v1/auth/refresh-tokenRefresh the access token when the current token expires.
Auth: Refresh token required
Refresh token request body
| Field | Type | Required | Description |
|---|---|---|---|
refresh_token | string | Yes | Refresh token from the latest sign-in or refresh response. |