Skip to main content
This step retrieves profile and related information using the UID, eventId, and consentToken returned after a successful journey. These values are used to call SDK methods to fetch user profile data after login, registrant details after event check-in, download the KYC certificate, and retrieve SDK capability information such as the installed SDK version. Ensure that a valid consentToken is available before calling these methods.

1. User Data (after login)

    Quepass.getUserData(    
        token: consentToken,    
        pii_Only: true,    
        eventId: eventId,    
        uid: uid    
    ) { status, response in    
        if status, let data = response.data {    
            // Use profile data    
        }    
    }    

2. Registrant Data (after event check-in)

    Quepass.getRegistrantData(    
        token: consentToken,    
        pii_Only: true,    
        eventId: eventId,    
        uid: uid    
    ) { status, response in    
        if status, let data = response.data {    
            let registrant = data["registrant"] as? [String: Any]    
        }    
    }    

3. GetKycCertificate

Quepass.getKycCertificate(uid: "USER_UID") { success, data in
    if success, let certificate = data {
        print("KYC Certificate:", certificate)
    } else {
        print("Failed to fetch KYC certificate")
    }
}

4. Customer Status

    let statusString = isActive ? "Active" : "Inactive"
 Quepass.UpdateCustomerStatus(status: statusString, uid: uid) { success, response in
            print("Customer status updated")
             
            }

5. Customer Life Cycle

    let status = isActive ? "Active" : "Inactive"
        
        Quepass.UpdateCustomerLifeCycle(uid: uid, status: status, from: from, to: to) { success, response in
            DispatchQueue.main.async {
                
                guard success else {
                    let errorMsg = response.data?["message"] as? String ?? "Failed to update lifecycle."
                    return
                }
                
                // Convert dictionary to JSON string if needed
                if let dataDict = response.data,
                   let jsonData = try? JSONSerialization.data(withJSONObject: dataDict, options: [.prettyPrinted]),
                   let jsonString = String(data: jsonData, encoding: .utf8) {
                    print("Server Response: \(jsonString)")
                }
                
               print("Lifecycle Updated Successfully!")
 
            }
        }

Ensure a valid consentToken is provided before calling these methods.