[POST] Get Token
Request Description
POST /v1/login_check
The request is designed to receive a token that is later used to authorize the user when working with other API.
Connection Data
- Endpoint URL:
- Production environment: https://api.ecommerce.noventiq.com/v1/login_check
- Test environment: https://api.ecommerce.noventiq.com.demoslweb.com/v1/login_check
- Request Method: POST
- Format: JSON
Your login for working with the API. It provided to you when connecting to the API.
Request Example
{
"username": "user",
"password": "1234"
}
Response Description
In response to the request, you receive the server response code corresponding to the processing result. Depending on the code, the response body may contain additional parameters.
Successful Response
If processing is successful, the following will return in response:
- Server response code: HTTP/1.1 200 ОК.
- Response body: authorization data in JSON format.
Authorization token.
NOTE: A token received is valid for 24 hours from the moment of receipt. If a new token is received before the previous one expires, then the previously received token remains valid.
NOTE: A token received is valid for 24 hours from the moment of receipt. If a new token is received before the previous one expires, then the previously received token remains valid.
Example of Successful Response
{
"token": "fj45u923j59ju42395iu9423i59243u0",
"refresh_token": "4e283bb7620068c42d6"
}
Error Response
If an error occurs while processing the request, you receive a server response code corresponding to the result of processing.
Depending on the code, the response body may contain additional parameters.
HTTP Server Response Error Code
HTTP code | Description |
HTTP/1.1 400 Bad Request | The request is not valid (error in parameters; necessary data is not transferred, etc.). An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 401 Unauthorized | Unsuccessful authorization. An additional error code (one or more) will be transferred in the response bodу. |
HTTP/1.1 404 Not found | Invalid request URL. |
HTTP/1.1 500 Request Error | Internal Server Error. Please try again later or contact support. |
Additional Error Codes for HTTP 400
Error | Message | Description |
If at least one error from the list below is found, then it returns in response to a request, other errors are not validated. | ||
110 | JSON is not valid. | The request cannot be processed. Request field structure is not valid. Check the fields in the request body against the JSON format. |
111 | Invalid data format (Content-type). | The request cannot be processed. Invalid request header. Content-type must be equal to application/json. |
1005 | Invalid authorization data. | The request is not valid, the data required is missing, etc. |
Additional Error Codes for HTTP 401
Error | Message | Description |
If at least one error from the list below is found, then it returns in response to a request, other errors are not validated. | ||
1006 | Bad credentials. | Authentication failed. |
Example of Error Response
{
"errors": [
{
"error": 1005,
"message": "Invalid authorization data."
}
]
}