Skinnyr.com API – Account Management Methods
getAllWeights
Retrieves a list of all weight record entries belonging to the specified user.
Parameters
- String AuthToken
Returns
- Array A nameless array with the following structure:
- Int record_id - The ID of the current record.
- dateTime.iso8601 record_datetime - The date and time that the record was added. If a time is not applicable, the time will show as 12am.
- Double record_weight - The weight value for the current record.
Sample Request
Sample Return
getWeight
Selects a particular weight record.
Parameters
- String AuthToken
- String Weight Sync Id - The sync id belonging to the weight record you wish to return.
Returns
Sample Request
Sample Return
createWeight
Adds a weight record to the specified user’s account. The date and time is recorded according to current time.
Parameters
- String AuthToken
- Double Weight - Weights are accepted in kg only. View conversion formulas
- dateTime.iso8601 Date/time of the weight record
- String Weight Sync Id - The weight sync id generated by your application. (A SHA1 unique to the user and timestamp.) If empty, server will generate a Weight Sync Id for you.
Returns
- Boolean bAdded
- String strSyncId - Only returned when successful, the sync id stored by the server. MAY BE DIFFERENT than an id you've passed in, so be sure to update your own value with the value returned here.
Sample Request
Sample Return
updateWeight
Updates a weight record on the specified user’s account.
Parameters
- String AuthToken
- String Weight Sync Id - The sync id belonging to the weight record you wish to update.
- Double Weight - All weights are accepted in kg only. View conversion formulas
- dateTime.iso8601 Date/time of the weight record
Returns
Sample Request
Sample Return
deleteWeight
Removes the specified weight record from the specified user’s account.
Parameters
- String AuthToken
- String Weight Sync Id - The sync id belonging to the weight record you wish to delete.
Returns
Sample Request
Sample Return