Wiki

Clone wiki

ma3route-api-documentation / Edit Profile

Home

#!https
POST /users

To edit profile send a POST request to https://www.ma3route.com/findit-api/v2/json/users

Parameters

  • editprofile boolean true/false. MUST be true to enable editing else the system will try to register the user.

The request body should be a json object with it's fields as in:

#!json
{
    "firstname":"?", 
    "middlename":"?",     
    "lastname":"?",    
    "alias":"?",
    "resetpassword"     
}
* firstname a string value. * middlename a string value. * lastname a string value. * email a string value. A valid email address that was used to register e.g info@ma3route.com. * alias a string value. Optional. * resetpassword a boolean true/false. If true, the password of the user whose email is provided will be reset.

Once you post, you will receive a response from the server, which is a JSON object that will indicate if you successfully posted the ad or if an error occurred. For now, we are not pointing to the exact cause of the error, this will be done in future enhancements.

Server response

#!json
{
   "meta":{      
   },
   "data":{
      "success":true,
      "message":"You successfully posted an update"
   }
}
OR

#!json
{
   "meta":{     
   },
   "data":{
      "success":false,
      "message":"Error! Check that you have all mandatory properties in the object. Avoid empty strings!"
   }
}

Updated