Skip to content

Connection to API

Partner connection requirements


The API is provided by the Koshelek host. The following request parameters are provided to a partner in order to get access:

Parameter Description
host:port Address and port of Koshelek host providing the API.
login:password Username and password for API requests authorization.
offerId Partner's loyalty program ID in Koshelek system. The parameter value is required and must be specified at headers of API requests.

API Requests Authorization

The HTTPS protocol is used. HTTP Basic Authentication (RFC 7617) mechanism should be used for API requests authorization. Credentials for authorization are transferred at the Authorization HTTP header.

Encoding Requirements

Both API requests and responses should use UTF-8 encoding.

Response Codes

If the request is successfully processed, the Koshelek host returns an HTTP response containing the status code 200, and the body with a payload described in the request documentation.

If an error occurred during the request processing, the Koshelek host returns an HTTP response containing the status code 422, and a JSON object with the information on the error in the body including textual description (UTF-8 encoding is used).