PUT api/user/profile/{id}

Update user profile details. use this when new user signup

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

logged in person id.

integer

Required

Body Parameters

object representing the details that need to save user profile details.

UpdateProfile
NameDescriptionTypeAdditional information
display_name

display name set by user on Lifetrons

string

Required

String length: inclusive between 0 and 100

gender

user gender male or female

string

None.

email

user e-mail address.

string

Data type: EmailAddress

user_photo

user image when it select from his/her devices. It is a base64 image

string

None.

date_Of_birth

long milisecond format for date of birth

decimal number

None.

height

height(in cm) is used to calculate user health conditions like BMI etc.

decimal number

None.

time_zone

user time zone info

string

None.

Request Formats

application/json, text/json

Sample:
{
  "display_name": "sample string 1",
  "gender": "sample string 2",
  "email": "sample string 3",
  "user_photo": "sample string 4",
  "date_Of_birth": 1.1,
  "height": 1.1,
  "time_zone": "sample string 5"
}

application/xml, text/xml

Sample:
<update_profile xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models.v5.UsersModel">
  <date_Of_birth>1.1</date_Of_birth>
  <display_name>sample string 1</display_name>
  <email>sample string 3</email>
  <gender>sample string 2</gender>
  <height>1.1</height>
  <time_zone>sample string 5</time_zone>
  <user_photo>sample string 4</user_photo>
</update_profile>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

On success, returns Lifetrons response code On failure, return unauthorized access.

UserInfoResp
NameDescriptionTypeAdditional information
profile

user profile information

ProfileInfo

None.

app_update

get app info like to required update,code version,version

AppUpdateDetails

None.

resp_code

Lifetrons response code

string

None.

resp_msg

Lifetrons response message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "profile": {
    "user_id": 1,
    "uid": "sample string 2",
    "country_code": "sample string 3",
    "date_Of_birth": 1.1,
    "first_name": "sample string 4",
    "last_name": "sample string 5",
    "display_name": "sample string 6",
    "gender": "sample string 7",
    "goals": {
      "goal_id": "sample string 1",
      "user_id": 2,
      "org_member_id": 3,
      "goal_type": "sample string 4",
      "steps": 5,
      "weight": 6.0,
      "water_intake": 7.0,
      "calories": 8,
      "distance": 9.0,
      "sleep": 10,
      "bodyfat": 11,
      "no_of_days_goal": 12,
      "avg_weight_per_week": 13.0,
      "current_weight": 14.0,
      "request_status": "sample string 15",
      "created_on": 17.1,
      "updated_on": 19.1,
      "accepted_on": 21.1
    },
    "height": 1.1,
    "weight_unit": 11,
    "sync_data_ToGFit": 12,
    "mobile_number": "sample string 8",
    "image_url": "sample string 18",
    "user_name": "sample string 9",
    "email": "sample string 10",
    "time_zone": "sample string 13",
    "phone_number": "sample string 14",
    "email_confirmed": true,
    "phone_number_confirmed": true,
    "has_password": true
  },
  "app_update": {
    "android_update": {
      "last_required_code_version": 1,
      "current_code_version": 2,
      "app_version": "sample string 3"
    },
    "ios_update": {
      "last_required_code_version": 1,
      "current_code_version": 2,
      "app_version": "sample string 3"
    }
  },
  "resp_code": "sample string 1",
  "resp_msg": "sample string 2"
}

application/xml, text/xml

Sample:
<user_info xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Domain.ResponseAgg.v5">
  <resp_code xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 1</resp_code>
  <resp_msg xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">sample string 2</resp_msg>
  <app_update xmlns:d2p1="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Domain.AppAgg">
    <d2p1:android_update>
      <d2p1:app_version>sample string 3</d2p1:app_version>
      <d2p1:current_code_version>2</d2p1:current_code_version>
      <d2p1:last_required_code_version>1</d2p1:last_required_code_version>
    </d2p1:android_update>
    <d2p1:ios_update>
      <d2p1:app_version>sample string 3</d2p1:app_version>
      <d2p1:current_code_version>2</d2p1:current_code_version>
      <d2p1:last_required_code_version>1</d2p1:last_required_code_version>
    </d2p1:ios_update>
  </app_update>
  <profile xmlns:d2p1="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models.v5.UsersModel">
    <d2p1:country_code>sample string 3</d2p1:country_code>
    <d2p1:date_Of_birth>1.1</d2p1:date_Of_birth>
    <d2p1:display_name>sample string 6</d2p1:display_name>
    <d2p1:email>sample string 10</d2p1:email>
    <d2p1:email_confirmed>true</d2p1:email_confirmed>
    <d2p1:first_name>sample string 4</d2p1:first_name>
    <d2p1:gender>sample string 7</d2p1:gender>
    <d2p1:goals xmlns:d3p1="http://schemas.datacontract.org/2004/07/CommonClasses.user">
      <d3p1:accepted_on>21.1</d3p1:accepted_on>
      <d3p1:avg_weight_per_week>13</d3p1:avg_weight_per_week>
      <d3p1:bodyfat>11</d3p1:bodyfat>
      <d3p1:calories>8</d3p1:calories>
      <d3p1:created_on>17.1</d3p1:created_on>
      <d3p1:current_weight>14</d3p1:current_weight>
      <d3p1:distance>9</d3p1:distance>
      <d3p1:goal_id>sample string 1</d3p1:goal_id>
      <d3p1:goal_type>sample string 4</d3p1:goal_type>
      <d3p1:no_of_days_goal>12</d3p1:no_of_days_goal>
      <d3p1:org_member_id>3</d3p1:org_member_id>
      <d3p1:request_status>sample string 15</d3p1:request_status>
      <d3p1:sleep>10</d3p1:sleep>
      <d3p1:steps>5</d3p1:steps>
      <d3p1:updated_on>19.1</d3p1:updated_on>
      <d3p1:user_id>2</d3p1:user_id>
      <d3p1:water_intake>7</d3p1:water_intake>
      <d3p1:weight>6</d3p1:weight>
    </d2p1:goals>
    <d2p1:has_password>true</d2p1:has_password>
    <d2p1:height>1.1</d2p1:height>
    <d2p1:image_url>sample string 18</d2p1:image_url>
    <d2p1:last_name>sample string 5</d2p1:last_name>
    <d2p1:mobile_number>sample string 8</d2p1:mobile_number>
    <d2p1:phone_number>sample string 14</d2p1:phone_number>
    <d2p1:phone_number_confirmed>true</d2p1:phone_number_confirmed>
    <d2p1:sync_data_ToGFit>12</d2p1:sync_data_ToGFit>
    <d2p1:time_zone>sample string 13</d2p1:time_zone>
    <d2p1:uid>sample string 2</d2p1:uid>
    <d2p1:user_id>1</d2p1:user_id>
    <d2p1:user_name>sample string 9</d2p1:user_name>
    <d2p1:weight_unit>11</d2p1:weight_unit>
  </profile>
</user_info>