API Requests
For service point list synchronization
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:
Send List of Service Points
POST
https://<base-URL>/places/sync
Partner's host prepares and sends a full list of service points to the Cardsmobile host. The list contains information on each service point (name or title, address, working hours, contact data, etc.). The Cardsmobile host receives the list for processing and returns an ID of the synchronization session.
Headers
Name | Type | Description |
---|---|---|
offerId* | string | ID of a loyalty program in the Cardsmobile platform |
Request Body
Name | Type | Description |
---|---|---|
places* | array | Service point list |
Structure of the request body:
The
address
field is mandatory.Where applicable, text data must be transferred in Russian using the UTF-8 encoding.
Response Parameters
If the Cardsmobile host returns an ID of the synchronization session (thesessionId
field), it means that processing of the transferred list has begun.
Get Status of List Processing
GET
https://<base-URL>/places/sync/{sessionId}
Partner's host uses the sessionId
value to address the Cardsmobile host periodically in order to determine the current processing status of the sent service point list. If the FINISHED status is received, the synchronization session is completed.
Path Parameters
Name | Type | Description |
---|---|---|
sessionId* | string | ID of the synchronization session |
Headers
Name | Type | Description |
---|---|---|
offerId* | string | ID of a loyalty program in the Cardsmobile platform |
How often to check the processing status?
The FINISHED status means that the processing is finished. In average, list processing takes about a minute. In general, the processing time depends on the size of the list and the number of changes made.
On unprocessed list items:
In the final response ("status": "FINISHED"
), all the detected processing errors, if any, will be transmitted in the errors
array. Data on the service point containing errors is rejected by the Cardsmobile host. In this case, the partner must consider that these points were not added (updated), and must send correct data during the next synchronization.
Last updated