Skip to main content
Skip table of contents

[POST] Get Token

Request Description

CODE
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

Header Parameters

content-type

string

required

It must be equal to "application/json".

Body Parameters

username

string

required

Your login for working with the API. It is provided to you when connecting to the API.

password

string

required

Your password for working with the API. It provided to you when connecting to the API.

Request Example

CODE
{
  "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.

Header Parameters

date

string

required

Date and time of token creation.

Body Parameters

token

string

required

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.

refresh_token

string

required

Technical parameter (not used for authorization).

Example of Successful Response

CODE
{
  "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.

Body Parameters

errors

array [objects]

required

Error list.

errors / [error object] / error

number

required

Error code.

errors / [error object] / message

string

required

Error description.

Example of Error Response

CODE
{
  "errors": [
    {
      "error": 1005,
      "message": "Invalid authorization data."
    }
  ]
}

Noventiq Checkout

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.