Retail Services Platform Callbacks
Overview
This page is intended for informing Retail Services platform partners about callbacks that we can enable upon their request.
A callback is a function that allows informing a partner when a certain event happens. It is individually set up for an application and is triggered for an account in the following cases:
Subscription(s) is activated.
Credentials are generated.
Subscriber status is set.
Subscription expires in a certain period.
Subscription has been terminated.
Support engineer transitions an account to pro.
Support engineer suspends data access for a user account.
Callbacks are optional, we enable them upon your request on the integration stage.
Callback specifications
A POST request is sent to the URL specified for each partner with the following parameters:
Header:
Content-Type: application/json
Custom headers may be included as key-value pairs. These headers are partner-specific and follow the general format of
<Custom-Header-Name>: <value>
Request body: Defined for each callback, as detailed in the table below
Event | Use case | Request body |
---|---|---|
Subscription activation |
| { "accountId": "<AccountId>", "subscriptions": [ { "feedName": "<FeedName1>", "endDate": <timestamp> }, ... { "feedName": "<FeedNameN>", "endDate": <timestamp> } ] } |
Generation of credentials | NoteThis callback is available for applications with credentials generation enabled.
| { "accountId": "<AccountId>", "login": "<GeneratedLogin>", "password": "<GeneratedPassword>" } |
Setting subscriber status |
| { "accountId": "<AccountId>", "subscriberStatus": "<SubscriberStatus>" } |
Subscription expiration |
| { "accountId": "<AccountId>", "subscriptions": [ { "feedName": "<FeedName1>", "endDate": <timestamp> }, ... { "feedName": "<FeedNameN>", "endDate": <timestamp> } ] } |
Subscription termination |
| { "accountId": "<AccountId>", "subscriptions": [ { "feedName": "<FeedName1>", "endDate": <timestamp> }, ... { "feedName": "<FeedNameN>", "endDate": <timestamp> } ] } |
Transitioning non-professional user to professional |
| { "accountId": "<AccountId>", "subscriberStatus": "<SubscriberStatus>" } |
Data access suspension |
| { "accountId": "<AccountId>" } |
Responses
Expected response | Other responses |
---|---|
200 OK | If a partner's application is not available or an internal error occurs, the responses with the following statuses may be expected.
In such a case, the system resends the request 4 additional times at 10-second intervals until receiving 200 OK response is received or the request limit is reached. |