Login | Sign Up
  • FA
  • EN

API Docs

POST /api/v1/tracker/shares

Create a new shared tracker configuration to share tracker data with another user.


Permissions

PermissionDescription
shared_trackers.createCreate shared tracker

Request Body Parameters

NameTypeRequiredDescription
viewer_user_idintegerYesID of the user to share tracker data with
start_datestringNoStart date for the sharing period (YYYY-MM-DD) or null
end_datestringNoEnd date for the sharing period (YYYY-MM-DD) or null
include_wakeupbooleanNoWhether to include wakeup data (default: true)
include_weightbooleanNoWhether to include weight data (default: true)
include_waterbooleanNoWhether to include water intake data (default: true)
include_sleepbooleanNoWhether to include sleep data (default: true)
include_supplementbooleanNoWhether to include supplement data (default: true)
include_mealbooleanNoWhether to include meal data (default: true)
include_workoutbooleanNoWhether to include workout data (default: true)
notify_wakeupbooleanNoWhether to notify when the owner logs a wakeup (default: false)
notify_weightbooleanNoWhether to notify when the owner logs their weight (default: false)
notify_waterbooleanNoWhether to notify when the owner logs water intake (default: false)
notify_sleepbooleanNoWhether to notify when the owner logs sleep (default: false)
notify_supplementbooleanNoWhether to notify when the owner logs a supplement (default: false)
notify_mealbooleanNoWhether to notify when the owner logs a meal (default: false)
notify_workoutbooleanNoWhether to notify when the owner logs a workout (default: false)
descriptionstringNoOptional description for the shared tracker (max 2000 characters)

Note: If both start_date and end_date are provided, end_date must be after start_date. When both are null, all tracker data is shared without date restrictions.


Request Example

{
  "viewer_user_id": 456,
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "description": "January fitness tracking data",
  "include_wakeup": true,
  "include_weight": false,
  "include_water": true,
  "include_sleep": true,
  "include_supplement": false,
  "include_meal": true,
  "include_workout": true
}

Response

200 OK

Returns the created shared tracker resource.

{ /* shared tracker resource */ }

See Shared Tracker Resource.


Error Responses

StatusDescriptionReference
422Validation errorValidation error
401UnauthorizedAuthentication error
403ForbiddenPermission error
footer wave
logo

Dambel, the smart world of fitness and nutrition

LinkedinInstagramXYoutubeTelegramGitHub