Get
[POST] .../v1/retailcard/get
Returns customer card information. Supports filters, including card additional fields, search, sort_orders, limit and offset; returns result, next_offset and total. Card fields are returned in fields, separately from customer.fields, when additional fields are enabled by the tariff. Requires card select permission. Invalid filters, denied access and storage errors return 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. |
| offset | Int32 | Optional | Offset from the beginning of the result set. |
| search | String | Optional | Data string used to search for a customer card by phone number or full name. |
| sort_orders | Array of RetailCard_SortOrder | Optional | Output data sorting. |
Filterable Fields
| Field | Type | Description |
|---|---|---|
| barcode_type_id | int | |
| barcode_value | string | Customer card barcode. |
| bonus_amount | decimal | |
| customer_id | int | Customer IDs. |
| date | int | |
| enabled | bool | |
| expiry_date | int | |
| group_id | int | Customer card group IDs. |
| id | int | Customer card IDs. |
| last_purchase | int | |
| last_update | int | |
| promo_id | int | Loyalty program IDs. |
| unlimited | bool |
Sortable Fields
| Field |
|---|
| customer.name |
| date |
| expiry_date |
| group.name |
| id |
| promo.name |
Request Example
{
"filters": [
{
"Field": "barcode_type_id",
"Operator": "Equal",
"Value": "string"
}
],
"limit": 1,
"offset": 1,
"search": "string",
"sort_orders": [
{
"column": "id",
"direction": "ASC"
}
]
}
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 RetailCard | Result array. |
| total | Int64 | Total number of result items. |
Response Example
{
"next_offset": 1,
"ok": true,
"result": [
{
"barcode_type": {
"id": 1,
"last_update": 1,
"name": "string"
},
"barcode_value": "string",
"bonus_amount": 1.0,
"customer": {
"address": "string",
"date_of_birth": "string",
"debt": 1.0,
"deleted_mark": true,
"description": "string",
"email": "string",
"fields": [
{
"data_type": "string",
"field_id": 1,
"is_custom": true,
"key": "string",
"metadata": "string",
"name": "string",
"required": true,
"value": "string"
}
],
"first_name": "string",
"full_name": "string",
"group": {
"child_count": 1,
"id": 1,
"last_update": 1,
"name": "string",
"parent_id": 1
},
"id": 1,
"last_name": "string",
"last_purchase": 1,
"last_update": 1,
"main_phone": "string",
"middle_name": "string",
"phones": "string",
"refer_id": 1,
"region": {
"id": 1,
"last_update": 1,
"name": "string",
"parent_id": 1
},
"sex": "none"
},
"date": 1,
"enabled": true,
"expiry_date": "string",
"fields": [
{
"data_type": "string",
"field_id": 1,
"is_custom": true,
"key": "string",
"metadata": "string",
"name": "string",
"required": true,
"value": "string"
}
],
"group": {
"child_count": 1,
"id": 1,
"last_update": 1,
"name": "string",
"parent_id": 1
},
"id": 1,
"last_purchase": 1,
"last_update": 1,
"promo": {
"active": true,
"days": [
1
],
"description": "string",
"end_date": "string",
"end_time": "string",
"id": 1,
"last_update": 1,
"name": "string",
"priority": 1,
"start_date": "string",
"start_time": "string",
"sub_type": 1,
"type": {
"id": 1,
"last_update": 1,
"name": "string"
}
},
"unlimited": true
}
],
"total": 1
}