Connection to API
Connection requirements
Documentation has moved
The information on this page is no longer updated and may be obsolete. The most current Koshelek documentation is now available at the new address:
Interaction model
The API uses the RESTful model, all the data are transferred as JSON objects.
Connection Parameters
The API is provided by the Cardsmobile host. The following request parameters are provided for a partner in order to get access:
Parameter | Description |
---|---|
host:port | Address and port of Cardsmobile host providing the API. |
login:password | Username and password for API request authorization. |
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 in the Authorization
HTTP header.
Request Structure And Format
All API requests expect the following in the request header:
Image Format
Allowed format for images involved in API exchange: PNG or JPG. For image resolution requirements, refer to API requests documentation.
HTTP Response Codes
If the request has been successfully processed, the Cardsmobile 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 OK | API request is successfully processed. |
If an error occurred during the request processing, the host will return an HTTP response containing a status code from the table below and the error description as a JSON object:
HTTP Code | Description |
---|---|
400 Bad Request | Invalid request format/structure. |
401 Unauthorized | Request authorization error. |
403 Forbidden | Request authentication error (lack of rights to perform the request). |
422 Unprocessable Entity | Business scenario processing error. |
500 Internal Server Error | Problems on Cardsmobile server. |
Error body
For any of the 4XX error codes described above, the response body contains a JSON object with fields code
and details
:
Refer to API response documentation to review description of possible validation or business scenario processing errors.
Last updated