🌐 Member Registration REST API
The cpl_real_rewards_ui module exposes a lightweight JSON REST endpoint to ingest new loyalty member registrations from web portals, mobile apps, or external paperform integrations (cplnewmember.paperform.co).
1. Endpoint Specification
- URL:
https://rewards.cpl.com.pg/api/loyalty/register_member - Method:
POST - Authentication: Header
X-API-Key: <rrp.register_api_key> - Content-Type:
application/json
2. Request Payload Schema
{
"first_name": "John",
"last_name": "Doe",
"email": "johndoe@example.com",
"phone": "+67571234567",
"card_number": "CPLR10009988",
"store": "POM_HARBOUR_CITY",
"gender": "male",
"id_type": "passport",
"id_number": "P12345678",
"suburb": "Hohola",
"region": "Port Moresby"
}
3. Response Codes & Handling
Success (HTTP 200):
{
"status": "success",
"partner_id": 4120,
"message": "Loyalty Member profile generated for John Doe."
}
Duplicate Card Error (HTTP 200):
{
"status": "error",
"message": "The Loyalty Card CPLR10009988 is already active on another profile."
}