this documentation for desplay how to inegrate with us for cashback
This API provides access to voucher operations
for the Client Center, including authentication, retrieving available vouchers, and marking them as used.
Alreaaiaa Health care cards is a Health care cards
Healthcare logo... Unprecedented medical and cosmetic discounts... up to 80%. About us. bg... Contracts. Learn about the new contracts joining the healthcare network.
Our web site Alreaaiaa.com
Endpoint method type: POST
Description: Generates an authentication token required for accessing other API endpoints.
URL: https://erp-testing2025.alreaaiaa.com/api/v1/findClientCenterVouchers
Headers:
Content-Type: application/json
Request Body:
{ "email": "user@example.com", "password": "your_password" }
Response:
json { "msg": "Authentication successful. Access token generated.", "data": { "user": { "id": 1234, "name": "user example", "email": "ِuser@example.com", "phone": "966501234567" }, "token": "eyJ0eXAeiOiJKV1QiLCJhbGciOieJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vZXJwLXRlc3RpbmcyMDI1LmFscmVhYWlhYS5jb20vYXBpL3YxL2dldEF1dGhUb2tlbiIsImlhdCI6MTc0NzY4ODc2eMSwiZXhwIjozNjEzOTI4NzYxLCJuYmYiOjE3NDc2ODg3NjEsImp0aSI6Ilg0YThLcDA3SzNHbkZqMDciLCJzdWIiOiIyNCIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.6irv-X_6EfeHJEBE0kSDAz-52HemRehD5At0w2miDc3o" }, "key": "success" }
Notes: The token should be included in the Authorization header for all protected endpoints:
Authorization: Bearer your-auth-token
Endpoint method type: POST
Description: Returns a list of available vouchers for the authenticated client center.
URL: https://erp-testing2025.alreaaiaa.com/api/v1/findClientCenterVouchers
Headers:
Authorization: Bearer your-auth-token Content-Type: application/json
Request Body:
{ "voucher_code":"VCL5C10420NO9648" }
Response:
json { "msg": "Voucher data", "data": { "id": 109, "client_id": 6, "price_value": 150, "expiry_date": "2025-07-22", "voucher_code": "VCL6C5881NO4658", "status": "verified", "reason": null, "client": { "id": 6, "name": "احمد احمد", "country_code": "+966", "phone": "512345678", "identity_number": "512345678" }, "client_cards": [ { "id": 318, "fullname": "احمد احمد", "phone": "966501234567", "nationality": "SY", "start_date": "2025-03-13", "end_date": "2026-03-13", "gender": "male", "identity_number": "512345678", "email": "user@gmail.com" }, { "id": 320, "fullname": "احمد احمد عبد الله", "phone": "966501234567", "nationality": "SA", "start_date": "2025-03-15", "end_date": "2026-03-15", "gender": "male", "identity_number": "512345678", "email": "user@gmail.com" }, ....... ] }, "key": "success" }
Notes:
It will return voucher data verified or used or canceld vouchers pending not returned If the token is invalid or expired, a 401 Unauthorized error will be returned.
Endpoint method type: POST
Description: Marks a specific voucher as used.
URL: https://erp-testing2025.alreaaiaa.com/api/v1/makeClientCenterVouchersUsed
Headers:
Authorization: Bearer your-auth-token Content-Type: application/json
Request Body:
{ "voucher_code":"VCL6C5881NO4658", "voucher_price":"150", "total_services_price":"600", "total_client_paid_amount":"450" }
Response:
json { "msg": "Voucher updated successfully", "data": { "id": 109, "client_id": 6, "center_id": 5881, "voucher_id": 4, "price_value": 150, "order_id": 684948, "expiry_date": "2025-07-22", "voucher_code": "VCL6C5881NO4658", "status": "used", "reason": null, "created_at": "2025-04-23 21:28:05", "updated_at": "2025-04-23 21:28:05" }, "key": "success" }
Notes:
Once a voucher is marked as used, it cannot be reused. If the voucher ID is invalid or already used, an error message will be returned.
Testing Environment Base URL:
https://erp-testing2025.alreaaiaa.com/api/v1/{API_NAME}
Live Environment Base URL:
https://erp-production.alreaaiaa.com/api/v1/{API_NAME}
Testing Data we provide data for testing and return all endpoint success response
first end point Get Auth Token
body
{ "email": "ِcenteradmintesting@admin.com", "password": "*@123#" }
response
{ "msg": "Authentication successful. Access token generated.", "data": { "user": { "id": 25, "name": "centeradmintesting", "email": "centeradmintesting@admin.com", "phone": "501234569" }, "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJJwLXRlc3Rp20vYXBpL3YxL2dldEF1dGhUb2tlbiIsImlhdCI6MTc0Nzg2NDMwMSwiZXhwIjozNjE0MTA0zAxLCaVciLCJzdWIiOiIyNSIsI....." }, "key": "success" }
second endpoint Find Client Center Vouchers
body
{ "voucher_code":"VCL6C5944NO4058" }
response
{ "msg": "Voucher data", "data": { "id": 105, "client_id": 4, "price_value": 200, "expiry_date": "2025-07-21", "voucher_code": "VCL6C5944NO4058", "status": "verified", "reason": null, "client": { "id": 4, "name": "test client", "country_code": "+966", "phone": "501234569", "identity_number": "501234569" }, "client_cards": [ { "id": 316, "fullname": "client name", "phone": "966330033300", "nationality": "SA", "start_date": "2025-03-11", "end_date": "2026-03-11", "gender": "male", "identity_number": "501234569", "email": "testclient@gmail.com" }, { "id": 317, "fullname": "any name", "phone": "96634510", "nationality": "SA", "start_date": "2025-03-11", "end_date": "2026-03-11", "gender": "female", "identity_number": "96634510", "email": "testclient@gmail.com" }, { "id": 4361176, "fullname": "name ali", "phone": "96634510021", "nationality": "SA", "start_date": "2025-03-11", "end_date": "2026-03-11", "gender": null, "identity_number": "96634510021", "email": "testclient@gmail.com" } ] }, "key": "success" }
invalid example voucher not exist VCL6C5944NO405812
body
{ "voucher_code":"VCL6C5944NO405812" }
response
{ "msg": "Voucher does not exist.", "data": null, "key": "success" }
voucher status used VCL6C5944NO9216
{ "voucher_code":"VCL6C5944NO9216" }
response
{ "msg": "Voucher data", "data": { "id": 104, "client_id": 4, "price_value": 200, "expiry_date": "2025-05-15", "voucher_code": "VCL6C5944NO9216", "status": "used", ////////// lock here ///////// "reason": null, "client": { "id": 4, "name": "test client", "country_code": "+966", "phone": "501234569", "identity_number": "501234569" }, "client_cards": [ { "id": 316, "fullname": "client name", "phone": "966330033300", "nationality": "SA", "start_date": "2025-03-11", "end_date": "2026-03-11", "gender": "male", "identity_number": "501234569", "email": "testclient@gmail.com" }, .... ] }, "key": "success" }
voucher status expired VCL6C5944NO9352
{ "voucher_code":"VCL6C5944NO9352" }
response
{ "msg": "Voucher data", "data": { "id": 103, "client_id": 4, "price_value": 200, "expiry_date": "2025-05-15", ////////// lock here ///////// "voucher_code": "VCL6C5944NO9352", "status": "expired", ////////// lock here ///////// "reason": null, "client": { "id": 4, "name": "test client", "country_code": "+966", "phone": "501234569", "identity_number": "501234569" }, "client_cards": [ { "id": 316, "fullname": "client name", "phone": "966330033300", "nationality": "SA", "start_date": "2025-03-11", "end_date": "2026-03-11", "gender": "male", "identity_number": "501234569", "email": "testclient@gmail.com" }, ........ ] }, "key": "success" }
third endpoint Mark Voucher as Used
body
{ "voucher_code":"VCL6C5944NO4058", "voucher_price":"200", "total_services_price":"600", "total_client_paid_amount":"400" }
response
{ "msg": "Voucher updated successfully", "data": { "id": 105, "client_id": 4, "center_id": 5918904, "voucher_id": 3, "price_value": 200, "order_id": 75131, "expiry_date": "2025-07-21", "voucher_code": "VCL6C5944NO4058", "status": "used", "reason": null, "created_at": "2025-04-22 12:32:10", "updated_at": "2025-04-22 12:32:14" }, "key": "success" }
invalid example
body
{ "voucher_code":"VCL6C5944NO4058154", "voucher_price":"200", "total_services_price":"600", "total_client_paid_amount":"400" }
response
{ "msg": "Voucher does not exist.", "data": null, "key": "success" }