Sign in to get token
POST /<provider>/sign-in
API used to authenticate and obtain an access token for subsequent requests.
Headers
| Name | Required | Description |
|---|---|---|
Content-Type | ✅ | application/json |
X-Tax-Code | ✅ | Seller's tax code (store, etc.) |
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
username | string | ✅ | Username |
password | string | ✅ | Password |
Response
| Name | Type | Description |
|---|---|---|
success | boolean | Whether the API executed successfully |
token | string | Access token information for the system |
message | string | General message (if any) |
error_code | string | Error code (if any) |
errors | array[object] | List of errors (if any) |
- cURL
- Response
curl --location 'https://stag-invoice-hub.1invoice.vn/1Invoice/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
}