Retrieving operation data

This request is used to retrieve information about operations completed over a specific period of time.

Old Dashboard returns data for specific time period. You can also specify the projects specified in the requested project (a single project, several, or all) . Projects must be included in the list of allowed projects in accordance with the token and token key transmitted in the request.

The availability rate of data received by using Data API can have a delay of up to 5 minutes.

Create a request for payment and operations information

POST the request to https://data.ecommpay.com/v1/operations/get.

In the request, pass the following parameters:
  • interval—an object containing data about the requested time interval, which defines a selection of operations:
    • from—date and time of interval start, in the YYYY-MM-DD hh:mm:ss format
    • to—date and time of interval end, in the YYYY-MM-DD hh:mm:ss format
  • token and signature—the token and token key that were generated in Old Dashboard. For more information about generating the token and the token key, see Generating token and token key for Data API.
  • project_id—project identifier, defines for which projects operation data is requested. This is an optional parameter, if it is not passed, the data is provided for all projects available to the user. If you need to get data for several projects, pass the IDs in the array separated by commas.

The number of records with information about operations returned in a single response can be limited by the limit parameter. This parameter can take values in the range 0—1,000, and is set to 1,000 by default.

If you need to get information about operations that exceed 1,000, pass the offset parameter in requests—the sequential number of the operation, after which the list of operations in the response starts. For example, if you need to get information on 2,000 operations, then specify in the first request "limit": "1000", "offset": "0", and in the second request—"limit": "1000", "offset": "1000".

Figure: Example of the payment and operation information request

{
  "project_id":[
    0,
    12
  ],
  "interval": {
    "from":"2018-08-01 00:00:00",
    "to":"2018-08-28 23:59:59"
  },
  "tz":"UTC",
  "limit":"600",
  "token":"ZOyTL5shY8ddhpxdQyplRPJYmGV7Kv",
  "signature":"yPu0wYr2BVmJQhaXILAnZWTKmqwSd3jJM+YWmTL7uGn26IglUOMzQtRkvdC0yaq030+eNXVtJjjtgrkglpeXJg=="
}

In response, you receive a list of operations for a specified time interval.

Figure: Example of the response for the payment and operation information request

{
    "operations": [
        {
            "channel_amount": 10014324,
            "channel_currency": "RUB",
            "operation_completed_at": "2018-08-27T16:32:57+00:00",
            "customer_ip": "185.123.193.224",
            "operation_status": "success",
            "operation_type": "sale",
            "amount": 10014324,
            "operation_created_at": "2018-08-27T16:32:54+00:00",
            "currency": "RUB",
            "operation_id": "3897239160459",
            "account_number": "424242******4242",
            "payment_id": "TEST_456",
            "payment_method_name": "visa",
            "payment_method_type": "visa",
            "project_id": "11",
            "shipment_date": ""
        }
    ],
    signature: "3XOq69q0FamTY1Y0ej5/x4Sq2Uw+qAIdV4N6E6dnTCxFJLFdZbCj4iOKvPLwQQrRtwxFy5gTz1ggQkoMK9tw5w=="
}