POST api/group/healthgoals/{id}?gId={gId}

set user health goals for challenge. Like steps,calories,distance etc

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

object representing logged in userid that need to set goal.

integer

Required

gId

set health goal for specific challenge

integer

Required

Body Parameters

object representing goals data that need sync.

GroupGoalReq
NameDescriptionTypeAdditional information
goal_type

user goal type whether he/she wants to gain,lose,maintain weight

string

Required

steps

total daily steps goal. like daily 10,000 steps or more

integer

Required

weight

weight goal gain/lose weight

decimal number

Required

starting_weight

starting weight of user to measure progress

decimal number

None.

water_intake

daily water intake goal. like daily 1000 ml water etc

decimal number

Required

calories

total daily calories goals

integer

Required

distance

total daily distance goals in meters

decimal number

Required

bodyfat

goal to gain or lose body fat

integer

None.

no_of_days_goal

achieve goal in number of days

integer

Required

avg_weight_per_week

average weight gain or lose per week

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "goal_type": "sample string 1",
  "steps": 2,
  "weight": 3.0,
  "starting_weight": 1.0,
  "water_intake": 4.0,
  "calories": 5,
  "distance": 6.0,
  "bodyfat": 1,
  "no_of_days_goal": 7,
  "avg_weight_per_week": 8.0
}

application/xml, text/xml

Sample:
<group_goal_req xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Domain.RequestAgg.v5">
  <avg_weight_per_week>8</avg_weight_per_week>
  <bodyfat>1</bodyfat>
  <calories>5</calories>
  <distance>6</distance>
  <goal_type>sample string 1</goal_type>
  <no_of_days_goal>7</no_of_days_goal>
  <starting_weight>1</starting_weight>
  <steps>2</steps>
  <water_intake>4</water_intake>
  <weight>3</weight>
</group_goal_req>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

On success, Lifetrons response codes On failure, Lifetrons response codes

Response
NameDescriptionTypeAdditional information
resp_code

Lifetrons response code

string

None.

resp_msg

Lifetrons response message

string

None.

Response Formats

application/json, text/json

Sample:
{
  "resp_code": "sample string 1",
  "resp_msg": "sample string 2"
}

application/xml, text/xml

Sample:
<Response xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/LifetronsPhoneApi.Models">
  <resp_code>sample string 1</resp_code>
  <resp_msg>sample string 2</resp_msg>
</Response>