Skip to content
Membership endpoints

Membership endpoints

For the REST API — the path grammar, access endpoints, authentication, paging, response envelopes and error codes — see the developer integration path. There is one API for the whole platform; there is no separate Membership API.

Integrate an external system →

The endpoint families this module’s applets call

Every mapping below is under the tenant prefix core2/tnt/dm/ (Core2Config.TENANT_DOMAIN_URL_PREFIX) unless stated, and takes the two headers on the authentication page — a credential (Authorization: Bearer … or AccessId + AccessKey) and tenantCode. Module sub-prefixes: crm/, erp/, mlm/.

FamilyPrefixWhat it servesNotes
Member recordcore2/tnt/dm/membership-cards and core2/tnt/dm/crm/membership-cards (MembershipCardController, 28 mappings)Create, update, delete, list, get, /query, /query/snapshot, /query/count, a phone / e-mail duplicate check (/duplicates/backoffice); /with-customer/etl-ep creates the member and its customer entity togetherEach operation has backoffice, etl-ep and login-entity-ep variants. The container is bl_crm_membership_hdr plus bl_crm_membership_ext rows
Member record, enhancedcrm/membership/cards-hdrs (MembershipCardHdrController, 15)/query/enhancement, referral look-ups (/referrals/referee/{referral_code}, /referrals/referrer/{login_subject_guid}), label look-upsAlso mapped under a legacy micro-services prefix marked remove later in the source
Classes, card types, periods, attachments, auditmembership-class and crm/membership-class (25), crm/membership-card-type-hdrs (12), crm/membership-period-lines (30), crm/membership/attachments (8), membership-audit-trails / crm/membership-audit-trails (6)The member class (tier) register, card types, membership period lines, uploaded attachments, and the audit trail the Membership Admin screen showsmembership-class/public-ep/query is one of only two unauthenticated reads in the module
Imports and reportscrm/membership/import-file-hdrs (9) and its /helper (4); crm/membership-points-transaction/import-file-hdrs (8) and import-file-helpers (4); crm/membership-reports (4); crm/membership-report-file-hdrs (6)The CSV uploads (members, point transactions) and the membership report queue behind the Membership Admin Upload and Membership Report menus
Pointscrm/membership-points-txn (MembershipPointsTxnController, 55)Create a header with lines, a single line (/txn-line), lines only; read a line, a header, /query, /lines/query; two balance calls that are not alike — /current-balance/query and /current-balance/{cardNo}[/{pointCurrency}] read the running total in bl_crm_membership_points_current_balance (what the till shows), while /balance/{card_no}[/{point_currency}] returns the balance_amount of one control-account lot row for the card — the first one found, in no particular order and whatever its status — not a sum of valid lots; and when that row’s next expiry check has passed, the read rewrites the row (its balance and an end date of now) before returning it. Use current-balance for a balance and the lot rows (membership-points-ctrl-acc, the Points Expiry tab) for what is still valid; recalculation, repost, exception-report and batch-upsert maintenance endpointsbackoffice-ep, etl-ep and login-entity-ep twins throughout
Points — control accounts and contrascrm/membership-points-ctrl-acc (12), crm/membership-points-ctrl-contra-details (16), the expiry / recalculation queue and history controllersThe per-lot rows that carry date_start / date_end / next_expiry_date_check, and the contra rows that record which lot a redemption or expiry consumedWritten by the balance-update processor; read-mostly for integrations
Points totalscore2/dm/membership-points-total (MembershipPointTotalController — platform prefix DOMAIN_URL_PREFIX, not the tenant prefix, 12)Aggregated point totalsThe one membership controller outside core2/tnt/dm/; it still expects tenantCode
Point currencies and ratescrm/membership-points-currency (8), crm/membership-points-to-currency-rate (7)The PTS CCY Module and PTS to CCY Config registers of Membership Adminmembership-points-currency/public-ep/query and /website-ep/{websiteHdrGuid}/query serve the storefront
MLMmlm/programs (7), mlm/program-participants (8), mlm/lineages (8, with /uplines/{participantGuid} and /downlines/{participantGuid}), mlm/invitation (6), mlm/invitation-acceptance (POST "", POST /password-creation), mlm/entity-contacts (6), mlm/mlm-program-cc-ep-link (6) — seven controllersPrograms, their participants, the upline / downline lineage, invitations and their acceptance, entity contacts, and the link from a program to a contact-centre endpointThe lineage is what an MLM commission scheme walks — see Commission Scheme
Vouchers and couponserp/coupons (CouponController, 63 mappings), erp/coupon/lines (15), erp/coupon-line-scan-events (10), erp/recurring-coupon-hdrs (10), erp/vouchers (VoucherController, 17)The voucher header (coupon), its ticket serial numbers (coupon/lines), scan / redemption events, recurring voucher templates, and the voucher-item sideThe applet the registry calls Voucher Management is a coupon applet in the backend’s vocabulary — see Voucher Management

Mapping counts are method-level mappings per controller (the class-level @RequestMapping excluded), counted at backend commit 45edc03526.

The six endpoints documented page by page

EndpointPage
GET core2/tnt/dm/membership-cards/queryGET Members by Criteria
POST core2/tnt/dm/membership-cardsPOST Create Member
PUT core2/tnt/dm/membership-cardsPUT Update Member
POST core2/tnt/dm/crm/membership-points-txn/txn-line/backoffice-epPOST Create Member Point Transaction
GET core2/tnt/dm/crm/membership-points-txn/backoffice-ep/lines/queryGET Membership Points Transactions by Criteria
GET core2/tnt/dm/crm/membership-points-txn/current-balance/queryGET Membership Points Current Balance

Every sample on those pages uses synthetic GadgetSphere data (cards GS-0001234…, point currency GSPTS, tenant gadgetsphere).

How points reach these tables from a sale

A point transaction line is normally written by the backend, not by a client: when a document whose type and posting status match the company’s member-point configuration (default INTERNAL_SALES_ORDER at FINAL) carries a member, GenericDocumentPointUpdateProcessor turns each line that has point_amount and point_currency into a REWARD or REDEEM line, and the balance-update processor maintains the control-account and current-balance rows. POST …/txn-line is the manual path (Membership Admin’s Add Point Adjustment uses it, sending a line with txn_type = ADJ). Nothing in these tables posts to the ledger.

Related documentation

Last updated on