Partner Validation Support and Rules
Each partner program has its own validation rules, and only some can check a membership live. The table lists both for every program.
Validation behavior
Member validation depends on the selected partner program. Some partners provide a member validation API endpoint, while others do not. Cosmo handles /programs/{programId}/validate-member as follows:
Cosmo first checks the submitted details against the partner's validation rules. If the checks pass, Cosmo calls the partner's endpoint and returns the validation result.
Cosmo checks the submitted membership details against the validation rules provided by the partner. Cosmo returns isValid: true if the details satisfy these rules, and isValid: false otherwise. A true result confirms compliance with the validation rules only; it does not confirm that the membership exists or is eligible to receive points. For these partners, eligibility is checked when you submit the points issuance request.
Rules by program
Before the rules are applied, Cosmo removes spaces from destinationUserId, and trims and lowercases destinationUserEmail.
| Program ID | Partner Validation Endpoint | Required validation fields | Validation rules | Regex |
|---|---|---|---|---|
AIR_REWARDS | AVAILABLE | destinationUserEmail | A valid email address. | — |
ALFURSAN | AVAILABLE | destinationUserId | Digits only, 8 or 10 digits long. A 10-digit number cannot start with 0; for an 8-digit number, the last digit must equal the first 7 digits mod 7. | ^(\d{8}|[1-9]\d{9})$ |
ALL | NOT AVAILABLE | destinationUserId | ALL card number: 16 letters or digits, starting with 308103, 308106 or 308409. The 7th character must be 1–6 and the last character is a check digit calculated with the Luhn algorithm over the first 15 characters (Luhn mod 36 when the number contains letters). | ^(308103|308106|308409)[1-6][A-Za-z0-9]{9}$ |
ALMOSAFER_POINTS | AVAILABLE | destinationUserId | Almosafer reference number: "ALM" followed by exactly 9 digits. | ^ALM[0-9]{9}$ |
EMCAN | AVAILABLE | destinationUserId | Digits only. | ^\d+$ |
FLYNAS | AVAILABLE | destinationUserId | naSmiles membership number, digits only. | ^\d+$ |
GEMS_REWARDS | AVAILABLE | destinationUserId | A non-empty membership number. | — |
MILES_AND_SMILES | AVAILABLE | destinationUserId | Miles&Smiles number: uppercase "TK" followed by digits. | ^TK\d+$ |
PRIVILEGE_CLUB | NOT AVAILABLE | destinationUserId | Privilege Club membership number: digits only, at most 9 digits. | ^\d{1,9}$ |
QITAF | NOT AVAILABLE | destinationUserId | Saudi mobile number as 05XXXXXXXX or 5XXXXXXXX, or a Saudi landline as 01XXXXXXXX or 1XXXXXXXX (area digit 1, 2, 3, 4, 6 or 7). Do not include the country code (+966 / 966). | ^(05|5)\d{8}$|^(01|1)[123467]\d{7}$ |
RADISSON_REWARDS | AVAILABLE | destinationUserId, destinationUserEmail | A 16-character membership number and a valid email address of at most 241 characters. | — |
SHUKRAN | NOT AVAILABLE | destinationUserId | Shukran card number: exactly 16 digits, starting with 11–19, with a valid check digit (the last digit). | ^1[1-9]\d{14}$ |