Skip to content

Connection to API

Partner connection requirements


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

Parameter Description
host:port Address and port of the Koshelek host providing the API.
login:password Username and password for API requests authorization.
offerId Partner's loyalty program ID in the Koshelek platform. The parameter value is required and must be specified in 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 has been successfully processed, the Koshelek host returns an HTTP response containing the status code 200, and the body with a payload that is described in the request documentation.

If an error occurred during the request processing, it is returned with an HTTP response containing the status code 422 and a string with the error description in the body (UTF-8 encoding is used).