Перейти к содержанию

Push API v1.1.0

API for sending push messages (single, batch) to the Koshelek App users.

General information

The manual is intended for partner companies of Bescontact LLC that provide loyalty cards issuance in the Koshelek app using the Koshelek platform.

Push API provides the partner with an interface for sending push messages to customer devices.

Updates: Push API v1.0.0 → v1.1.0

PUT /public/user/reset-password

  • New method is useful when you need to reset your Push API password.

Interaction model

The API uses the RESTful model (all the data is transferred as JSON objects). The feature of this model is that a partner and Koshelek use two interfaces for the interaction:

  • Push API — used by the partner to send push messages.
  • Callback API — used by Koshelek to transmit information on push messages delivery and reading by recipient to the partner.

Partner and Koshelek interaction model

Connecting to API and resetting initial password

Push API is provided by 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 initial password for API authorization.

Initial password obtained upon API connection setup needs to be reset by calling PUT /public/user/reset-password. Please note that any API call made with initial password will return HTTP status code “401 Unauthorized” from all API resources except for the one designed for password reset.

Number of accounts is not restricted. Still, each account determines the following:

  • A partner whose clients will receive push messages.
  • A Callback API URL for sending the information on push messages delivery and reading status.


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


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

HTTP 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.

HTTP code Description
200 API request is successfully processed.

If an error occurred during the request processing, the host returns an HTTP response containing one of the status codes from the table below, and the error description as a JSON object in the body (the UTF-8 encoding is used):

HTTP Code Description
304 New request came earlier than expected.
400 Invalid request format.
401 Authorization error.
404 Requested data not found.

Response body examples, HTTP code 400:

    "status": "BAD_REQUEST",
    "errors": [
        "msisdn: size must be between 0 and 10000",
        "subId: may not be null"

Response body examples, HTTP code 400:

    "status": "UNAUTHORIZED",
    "errors": [
        "Auth token is invalid"