POST api/user/healthgoals/{id}

set user daily goals. Like steps,calories,distance etc

Request Information

URI Parameters

NameDescriptionTypeAdditional information
id

object representing logged in userid that need to set goal.

integer

Required

Body Parameters

object representing goals data that need sync.

Goals
NameDescriptionTypeAdditional information
goal_id

string

None.

user_id

integer

None.

org_member_id

integer

None.

goal_type

string

Required

steps

integer

None.

weight

decimal number

None.

water_intake

decimal number

None.

calories

integer

None.

distance

decimal number

None.

sleep

integer

None.

bodyfat

integer

None.

no_of_days_goal

integer

None.

avg_weight_per_week

decimal number

None.

current_weight

decimal number

None.

request_status

string

None.

created_on

decimal number

None.

updated_on

decimal number

None.

accepted_on

decimal number

None.

Request Formats

application/json, text/json

Sample:
{
  "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
}

application/xml, text/xml

Sample:
<goals xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CommonClasses.user">
  <accepted_on>21.1</accepted_on>
  <avg_weight_per_week>13</avg_weight_per_week>
  <bodyfat>11</bodyfat>
  <calories>8</calories>
  <created_on>17.1</created_on>
  <current_weight>14</current_weight>
  <distance>9</distance>
  <goal_id>sample string 1</goal_id>
  <goal_type>sample string 4</goal_type>
  <no_of_days_goal>12</no_of_days_goal>
  <org_member_id>3</org_member_id>
  <request_status>sample string 15</request_status>
  <sleep>10</sleep>
  <steps>5</steps>
  <updated_on>19.1</updated_on>
  <user_id>2</user_id>
  <water_intake>7</water_intake>
  <weight>6</weight>
</goals>

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>