Get

[POST] .../v1/retailcard/get

Returns customer card information. Use this method to retrieve retail customer cards for loyalty lookup, POS card binding, customer profile screens and support diagnostics. The request supports filters by ids, group_ids, customer_ids, promo_ids, barcode_value and search text, supports sort_orders, limit and offset and returns result with next_offset and total. The method checks the current request user and requires customer card select permission; missing body, denied permission, invalid filters or sort_orders and storage errors are returned as HTTP 200 ErrorResult business errors.

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_value string Customer card barcode.
customer_ids int Customer IDs.
group_ids int Customer card group IDs.
ids int Customer card IDs.
promo_ids int Loyalty program IDs.

Sortable Fields

Field
customer.name
date
expiry_date
group.name
id
promo.name

Request Example

{
  "filters": [
    {
      "Field": "barcode_value",
      "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",
            "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",
      "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
}