GetOperations
[POST] .../v1/retailcard/getoperations
Returns customer card bonus history across promotions. Retrieve performed bonus operations for a retail customer card, such as bonus accruals, withdrawals and payment-linked operations. The request supports filters by operation UUIDs or card_id, plus type, start_date, end_date, sort_orders, limit and offset and returns result with next_offset and total. History includes all promotions unless restricted by the promo_id filter, which supports standard integer operators. Use Equal for one promotion or In with a comma-separated list for several promotions. The method checks the current request user and requires customer card operation access permission; missing body, missing card_id when UUIDs are not provided, denied permission, invalid filters or sort_orders and storage errors are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filters | Array of Filter | Optional | Optional filters by fields available for this API method. |
| limit | Int32 | Optional | Maximum number of records to return; the maximum and default are controlled by server settings. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| sort_orders | Array of RetailCardOperationColumn | Optional | Output data sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| card_id | int | Customer card ID. Required when uuids are omitted; history includes all promotions unless filters select promo_id. |
| end_date | int | Period end date as Unix time in seconds. |
| promo_id | int | |
| start_date | int | Period start date as Unix time in seconds. |
| type | int | Operation type: Income or Outcome. |
| uuid | string | Customer card operation UUIDs. Required when card_id is omitted. |
Sortable Fields
| Field |
|---|
| amount |
| date |
| exp_date |
| last_update |
| type |
| value |
Request Example
{
"filters": [
{
"Field": "card_id",
"Operator": "Equal",
"Value": "123"
}
]
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| next_offset | Int32 | Offset for the next data page. |
| ok | Boolean | Indicates whether the request completed successfully. |
| result | Array of RetailCardOperation | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"ok": true,
"result": [],
"total": 0,
"next_offset": 0
}