API Reference
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,
L26) unless stated, and takes the two headers on the authentication page
— a credential (Authorization: Bearer … or AccessId + AccessKey) and tenantCode. Module
sub-prefixes: crm/ (L48), erp/ (L46), mlm/ (L139).
| Family | Prefix | What it serves | Notes |
|---|---|---|---|
| Member record | core2/tnt/dm/membership-cards and core2/tnt/dm/crm/membership-cards (MembershipCardController, L47–48, 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 together | Each 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, enhanced | crm/membership/cards-hdrs (MembershipCardHdrController, 15) | /query/enhancement, referral look-ups (/referrals/referee/{referral_code}, /referrals/referrer/{login_subject_guid}), label look-ups | Also mapped under a legacy micro-services prefix marked remove later in the source |
| Classes, card types, periods, attachments, audit | membership-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 shows | membership-class/public-ep/query is one of only two unauthenticated reads in the module |
| Imports and reports | crm/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 | |
| Points | crm/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 balances — /balance/{card_no}[/{point_currency}] returns the valid balance from the control-account basket (expired lots excluded), /current-balance/query and /current-balance/{cardNo}[/{pointCurrency}] read the running total in bl_crm_membership_points_current_balance; recalculation, repost, exception-report and batch-upsert maintenance endpoints | backoffice-ep, etl-ep and login-entity-ep twins throughout |
| Points — control accounts and contras | crm/membership-points-ctrl-acc (12), crm/membership-points-ctrl-contra-details (16), the expiry / recalculation queue and history controllers | The 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 consumed | Written by the balance-update processor; read-mostly for integrations |
| Points totals | core2/dm/membership-points-total (MembershipPointTotalController, L43 — platform prefix DOMAIN_URL_PREFIX, not the tenant prefix, 12) | Aggregated point totals | The one membership controller outside core2/tnt/dm/; it still expects tenantCode |
| Point currencies and rates | crm/membership-points-currency (8), crm/membership-points-to-currency-rate (7) | The PTS CCY Module and PTS to CCY Config registers of Membership Admin | membership-points-currency/public-ep/query and /website-ep/{websiteHdrGuid}/query serve the storefront |
| MLM | mlm/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 controllers | Programs, their participants, the upline / downline lineage, invitations and their acceptance, entity contacts, and the link from a program to a contact-centre endpoint | The lineage is what an MLM commission scheme walks — see Commission Scheme |
| Vouchers and coupons | erp/coupons (CouponController, L92 — 63 mappings), erp/coupon/lines (15), erp/coupon-line-scan-events (10), erp/recurring-coupon-hdrs (10), erp/vouchers (VoucherController, L37 — 17) | The voucher header (coupon), its ticket serial numbers (coupon/lines), scan / redemption events, recurring voucher templates, and the voucher-item side | The 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
| Endpoint | Page |
|---|---|
GET core2/tnt/dm/membership-cards/query | GET Members by Criteria |
POST core2/tnt/dm/membership-cards | POST Create Member |
PUT core2/tnt/dm/membership-cards | PUT Update Member |
POST core2/tnt/dm/crm/membership-points-txn/txn-line/backoffice-ep | POST Create Member Point Transaction |
GET core2/tnt/dm/crm/membership-points-txn/backoffice-ep/lines/query | GET Membership Points Transactions by Criteria |
GET core2/tnt/dm/crm/membership-points-txn/current-balance/query | GET 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 with
source = ADMIN_MANUAL_POINTS_ASSIGNMENT). Nothing in these tables posts to the ledger.