Request Details

Method Controller Resource Parameters
POST user register source-id / no-card OR card_no-auth-no / name : surname : email : dob : country_id

Parameters Guide

Parameter Accepts
source string use outlet if you have the parent outlet id or user if you have the parent user id
id int outlet or user id to be used as parent for this registration (See above source
no-card use the no-card method if you do not have a physical card for this user (User will be given a virtual card automatically). Alternatively, use the below card_no-auth_no for assigning a physical card to the user
card_no int the physical card number you are giving to the user
auth_no int the 3 digit code located at the back of the card specified above
name string specify the clients First Name (Use only Latin characters)
surname string specify the clients Last Name (Use only Latin characters)
email string specify the clients email
dob date specify the clients date of birth in the format of dd-mm-YYYY
country_id int The country's internal id in beep database where the user is being registered

Example Request Format

Direct Url https://api.beepxtra.com/user/register/user-50/no-card/Jack:Duijf:[email protected]:01-01-1901:45
Curl CURL -A "YOURAPPNAME|1.0|AppID|AppKEY|user" -X POST https://api.beepxtra.com/user/register/user-50/no-card/Jack:Duijf:[email protected]:01-01-1901:45
PHP SDK $beepapi->request('post', 'user', 'register/user-50/no-card/Jack:Duijf:[email protected]:01-01-1901:45');

Sample Response

Success
{  
   "success":true,
   "request":{  
      "method":"POST",
      "controller":"user",
      "resource":"register",
      "parameters":"\/user\/register\/user-50\/no-card\/Jack:Duijf:jack@exevior_com:01-01-1901:45",
      "url_elements":[  
         "user",
         "register",
         "user-50",
         "no-card",
         "Jack:Duijf:[email protected]:01-01-1901:45"
      ]
   },
   "error":{  
      "errorid":0,
      "message":0
   },
   "data":{  
      "success":"User created succesfully",
      "id":"142916",
      "card":"90000000000055103"
   }
}
Error
{  
   "success":false,
   "request":{  
      "method":"POST",
      "controller":"user",
      "resource":"register",
      "parameters":"\/user\/register\/user-50\/no-card\/Jack:Duijf:jack@exevior_com:01-01-1901:45",
      "url_elements":[  
         "user",
         "register",
         "user-50",
         "no-card",
         "Jack:Duijf:[email protected]:01-01-1901:45"
      ]
   },
   "error":{  
      "message":"A user with this email already exists",
      "errorid":1000
   },
   "data":{  
      "error":"A user with this email already exists",
      "errorid":1000,
      "errormsg":"A user with this email already exists"
   }
}

Response Guide

Parameter Type Details
error String Contains the error message returned
success boolean returns true id successful
id int The id of the newly registered client
card int The card number assigned to the newly registered client