iOS


1. Register Member

This register is done by calling Goodie.register() function. This function will retrieve or create user. to do request You have to make a function to get 'deviceUniqueId' for your device (HP).

Here is example:

1.	GoodieCore.register(username: "username", merchantId: "merchantId", phoneNumber: "phoneNumber", password: "password", firstName: "firstName", lastName: "lastName",   deviceUniqueId: "deviceUniqueId", birthDate: "18-01-1992", referralCode: "referralCode", completion: { (RegisterResponse) in  
2.	    if RegisterResponse.abstractResponse?.responseStatus == "MEM000" {  
3.	        //success  
4.	    }else{  
5.	        //failed  
6.	    }  
7.	}) { (Error) in  
8.	    //error  
9.	}  
                        

Where :
Param Type Description
username String username is used as a login member to sdk goodie
merchantId String merchantId is identifier that will be used to identity a merchant
phoneNumber String phoneNumber is used to receive verification code
password String password is used as for authentication purpose
firstName String firstName is used as a display first name inside application
lastName String lastName is used as a display last name inside application
deviceUniqueId String deviceUniqueId is identify android device
birthDate String birthDate format is “dd-mm-yyyy”
referralCode String refferal code is a unique number assigned to your account. You can use this code to refer your friends for get rewarded.

Response :
1.	{  
2.	    "memberId": "D0A57818-1351-463D-9AD0-8A593250A68F",  
3.	    "referralPoint": 0,  
4.	    "abstractResponse": {  
5.	        "responseStatus": "MEM000",  
6.	        "responseMessage": "Register member success"  
7.	    }  
8.	}