Skip to content

GET Members by Criteria

Endpoint

URL: https://api.akaun.com/core2/tnt/dm/membership-cards/query
Method: GET
Headers:

  • Authorization: Bearer <token> (or an AccessId + AccessKey pair)
  • tenantCode: <Tenant Code>
  • Content-Type: application/json

Headers and credentials are described once, on the authentication page; this page does not repeat them.


Description

This endpoint gets existing members by query criteria.

The controller is MembershipCardController (@GetMapping /query); the filters are the fields of MembershipCardQueryCriteria plus the paging and status fields every criteria class inherits.


cURL Example

curl 'https://api.akaun.com/core2/tnt/dm/membership-cards/query?calcTotalRecords=true&card_no=GS-0001235' \
  --header 'Authorization: <JWT Token>' \
  --header 'tenantCode: gadgetsphere'

Query Parameters

Pagination & Sorting

  • limit (default: 100)
  • offset (default: 0)
  • orderBy
  • order (default: ASC)
  • calcTotalRecords (boolean)

Filtering Fields

  • guids: Set
  • entity_hdr_guids: Set
  • card_no
  • member_id
  • id_no
  • id_type
  • phone
  • is_phone_encoded
  • email
  • ref_1, ref_2, ref_3, ref_4, ref_5
  • login_subject_guid
  • start_date
  • end_date
  • entity_hdr_guid
  • company_guid
  • branch_guid
  • created_from
  • created_to
  • contact_key_guid
  • name
  • client_key
  • client_source
  • membership_class_guid: UUID
  • membership_class_guids: Set
  • membership_class_code
  • gender
  • dob (ISO datetime)
  • country_code
  • hdr_created_date_to
  • hdr_created_date_on
  • hdr_created_date_from
  • hdr_updated_date_to
  • hdr_updated_date_from
  • hdr_updated_date_on
  • status_01
  • card_no_like
  • name_like
  • id_no_like
  • id_type_like
  • phone_like
  • email_like
  • member_id_like
  • end_date_from
  • end_date_to
  • dob_from
  • dob_to
  • start_date_from
  • start_date_to
  • card_type
  • card_type_guids: Set
  • client_customer_code
  • nationality
  • occupation
  • marital_status
  • card_end_date_from
  • card_end_date_to
  • card_start_date_from
  • card_start_date_to
  • xtn_icno
  • xtn_hand_phone
  • xtn_home_phone
  • xtn_office_phone
  • xtn_email

Also accepted (same criteria class, not shown above): status, excluded_statuses, search_word, orderByMultiColumn, snapshot, querying_timezone, updated_date_from / updated_date_to, is_card_no_encoded, param_code, param_name, value_string, value_numeric, client_value, birthday_months, selected_timezone, is_lifetime, branch_guids, branch_name, branch_code, sales_agent_guids, sales_agent_name, sales_agent_code, so_delivery_city, so_delivery_state, so_delivery_postal_code, ext_*_date_*, convert.

Response

Content-Type: application/json

Example Response

{
    "totalRecords": 1,
    "offset": 0,
    "limit": 100,
    "code": "OK_RESPONSE",
    "message": "",
    "data": [
        {
            "bl_crm_membership_hdr": {
                "guid": "00000000-0000-4000-8000-000000000023",
                "parent_guid": null,
                "company_guid": null,
                "branch_guid": null,
                "login_subject_guid": null,
                "entity_hdr_guid": "00000000-0000-4000-8000-000000000024",
                "entity_line_guid": null,
                "contact_key_guid": "00000000-0000-4000-8000-000000000025",
                "card_type_guid": null,
                "membership_class_guid": null,
                "membership_class_code": null,
                "card_no": "GS-0001235",
                "card_no_old": null,
                "id_no": null,
                "id_type": null,
                "name": "Retail Customer 2",
                "phone": null,
                "email": null,
                "ref_1": null,
                "ref_2": null,
                "ref_3": null,
                "ref_4": null,
                "ref_5": null,
                "start_date": null,
                "end_date": null,
                "card_start_date": null,
                "card_end_date": null,
                "client_key": null,
                "client_source": null,
                "client_value": null,
                "client_customer_code": null,
                "status_01": null,
                "status_02": null,
                "xtn_icno": null,
                "xtn_hand_phone": null,
                "xtn_home_phone": null,
                "xtn_office_phone": null,
                "xtn_email": null,
                "gender": null,
                "dob": null,
                "country_code": null,
                "remarks": null,
                "obj_status": null,
                "member_id": "GS-M-000124",
                "card_type": null,
                "nationality": null,
                "ethnicity": null,
                "language_code": null,
                "title": null,
                "region_code": null,
                "marital_status": null,
                "occupation": null,
                "job_title": null,
                "job_industry": null,
                "job_role": null,
                "country_alpha3_code": null,
                "country_alpha2_code": null,
                "status_logic": null,
                "referral_code": "GSREF124",
                "addresses_json": {},
                "job_skills": {},
                "property_json": {},
                "module_guid": null,
                "applet_guid": null,
                "namespace": null,
                "created_by_subject_guid": "00000000-0000-4000-8000-000000000009",
                "updated_by_subject_guid": "00000000-0000-4000-8000-000000000009",
                "created_date": "2025-11-21T05:40:37.317102Z",
                "updated_date": "2025-11-21T05:42:58.547494Z",
                "status": "ACTIVE",
                "revision": "00000000-0000-4000-8000-000000000026",
                "vrsn": null,
                "branch_name": null,
                "branch_code": null,
                "sales_agent_guid": null,
                "sales_agent_name": null,
                "sales_agent_code": null
            },
            "bl_crm_membership_ext": []
        }
    ]
}

Notes

  • Use calcTotalRecords=true only when necessary, as it may add overhead.
  • The same mapping is served at core2/tnt/dm/crm/membership-cards/query and at /backoffice/query; etl-ep (/etl-ep/query) and login-entity-ep twins exist for integrations and signed-in members.
  • The response is a MembershipCardContainer: one bl_crm_membership_hdr row plus its bl_crm_membership_ext rows.
  • Sample values are synthetic GadgetSphere data.