Skip to content

POST Create Member

Endpoint

URL: https://api.akaun.com/core2/tnt/dm/membership-cards
Method: POST
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 creates a new membership row for a member. It requires a JSON payload containing the membership header. The API responds with the created membership data and any related extended information.

Served by MembershipCardController (@PostMapping), body MembershipCardContainer (bl_crm_membership_hdr + optional bl_crm_membership_ext rows), validated by MembershipCardDataConsistencyObject.


cURL Example

curl -X POST 'https://api.akaun.com/core2/tnt/dm/membership-cards' \
  --header 'Authorization: <JWT Token>' \
  --header 'tenantCode: gadgetsphere' \
  --header 'Content-Type: application/json' \
  --data '{
    "bl_crm_membership_hdr" : {
        "guid": "00000000-0000-4000-8000-000000000021",
        "company_guid": null,
        "branch_guid": null,
        "login_subject_guid": null,
        "entity_hdr_guid": "00000000-0000-4000-8000-000000000022",
        "entity_line_guid": null,
        "contact_key_guid": null,
        "card_type_guid": null,
        "membership_class_guid": null,
        "membership_class_code": null,
        "card_no": "GS-0001234",
        "card_no_old": null,
        "id_no": null,
        "id_type": null,
        "name": "Retail Customer 1",
        "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-000123",
        "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": "GSREF123",
        "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-20T08:40:41.36272441Z",
        "updated_date": "2025-11-20T08:40:41.362725185Z",
        "status": "ACTIVE",
        "revision": "00000000-0000-4000-8000-000000000027",
        "vrsn": null,
        "branch_name": null,
        "branch_code": null,
        "sales_agent_guid": null,
        "sales_agent_name": null,
        "sales_agent_code": null
    }
}'

Request Body

Content-Type: application/json

  • bl_crm_membership_hdr (object, required): Contains the full membership details.

All Fields:

  • guid
  • parent_guid
  • company_guid
  • branch_guid
  • login_subject_guid
  • entity_hdr_guid
  • entity_line_guid
  • contact_key_guid
  • card_type_guid
  • membership_class_guid
  • membership_class_code
  • card_no
  • card_no_old
  • id_no
  • id_type
  • name
  • phone
  • email
  • ref_1
  • ref_2
  • ref_3
  • ref_4
  • ref_5
  • start_date
  • end_date
  • card_start_date
  • card_end_date
  • client_key
  • client_source
  • client_value
  • client_customer_code
  • status_01
  • status_02
  • xtn_icno
  • xtn_hand_phone
  • xtn_home_phone
  • xtn_office_phone
  • xtn_email
  • gender
  • dob
  • country_code
  • remarks
  • obj_status
  • member_id
  • card_type
  • nationality
  • ethnicity
  • language_code
  • title
  • region_code
  • marital_status
  • occupation
  • job_title
  • job_industry
  • job_role
  • country_alpha3_code
  • country_alpha2_code
  • status_logic
  • referral_code
  • addresses_json
  • job_skills
  • property_json
  • module_guid
  • applet_guid
  • namespace
  • created_by_subject_guid
  • updated_by_subject_guid
  • created_date
  • updated_date
  • status
  • revision
  • vrsn
  • branch_name
  • branch_code
  • sales_agent_guid
  • sales_agent_name
  • sales_agent_code

Response

Content-Type: application/json

Sample Response

{
    "code": "OK_RESPONSE",
    "data": {
        "bl_crm_membership_hdr": {
            "guid": "00000000-0000-4000-8000-000000000021",
            "parent_guid": null,
            "company_guid": null,
            "branch_guid": null,
            "login_subject_guid": null,
            "entity_hdr_guid": "00000000-0000-4000-8000-000000000022",
            "entity_line_guid": null,
            "contact_key_guid": null,
            "card_type_guid": null,
            "membership_class_guid": null,
            "membership_class_code": null,
            "card_no": "GS-0001234",
            "card_no_old": null,
            "id_no": null,
            "id_type": null,
            "name": "Retail Customer 1",
            "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-000123",
            "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": "GSREF123",
            "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-20T08:40:41.36272441Z",
            "updated_date": "2025-11-20T08:40:41.362725185Z",
            "status": "ACTIVE",
            "revision": "00000000-0000-4000-8000-000000000027",
            "vrsn": null,
            "branch_name": null,
            "branch_code": null,
            "sales_agent_guid": null,
            "sales_agent_name": null,
            "sales_agent_code": null
        },
        "bl_crm_membership_ext": []
    },
    "message": ""
}

Notes

  • Ensure JWT token is valid and tenant code is correct.
  • guid values must be unique UUIDs, but can be set to null if you want the system to auto generate a UUID for you.
  • entity_hdr_guid links to the customer table
  • obj_status is used to store member verification status
    (default value = UNVERIFIED, possible values = VERIFIED, UNVERIFIED, REVIEWED, EXPIRED)
  • Requires TNT_API_MEMBERSHIP_CARD_CREATE; the create writes an audit-trail row. When entity_hdr_guid is empty the service can resolve the customer entity by matching.
  • Same mapping at /backoffice; etl-ep and login-entity-ep twins exist, and POST …/membership-cards/with-customer/etl-ep creates the member and its customer entity together.
  • Sample values are synthetic GadgetSphere data.