{"files":{"SKILL.md":"---\nname: fitbit-plus-api\ndescription: \"Fitbit Plus API skill. Use when working with Fitbit Plus for oauth, organization, group. Covers 62 endpoints.\"\nversion: 1.0.0\ngenerator: lapsh\n---\n\n# Fitbit Plus API\nAPI version: v7.78.1\n\n## Auth\nOAuth2\n\n## Base URL\nhttps://api.twinehealth.com/pub\n\n## Setup\n1. Configure auth: OAuth2\n2. GET /group -- list groups\n3. POST /oauth/token -- create first token\n\n## Endpoints\n62 endpoints across 22 groups. See references/api-spec.lap for full details.\n\n### Oauth\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /oauth/token | Create an oauth token |\n| GET | /oauth/token/{id}/groups | Get the groups for a token |\n| GET | /oauth/token/{id}/organization | Get the organization for a token |\n\n### Organization\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /organization/{id} | Get an organization |\n\n### Group\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /group | Create a group |\n| GET | /group | List groups |\n| GET | /group/{id} | Get a group |\n\n### Coach\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /coach | List coaches |\n| GET | /coach/{id} | Get a coach |\n\n### Reward_program\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /reward_program | Create a reward program |\n| GET | /reward_program | List reward programs |\n| GET | /reward_program/{id} | Get a reward program |\n| GET | /reward_program/{id}/group | Get group for a reward program |\n\n### Action\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /action | Create action |\n| GET | /action/{id} | Get an action |\n| PATCH | /action/{id} | Update an action |\n\n### Bundle\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /bundle | Create bundle |\n| GET | /bundle/{id} | Get a bundle |\n| PATCH | /bundle/{id} | Update a bundle |\n\n### Calendar_event\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /calendar_event | Create calendar event |\n| GET | /calendar_event | List calendar events |\n| GET | /calendar_event/{id} | Get a calendar event |\n| PATCH | /calendar_event/{id} | Update a calendar event |\n| DELETE | /calendar_event/{id} | Delete a calendar event |\n\n### Calendar_event_response\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /calendar_event_response | Create calendar event response |\n\n### Email_history\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /email_history | List email histories |\n| GET | /email_history/{id} | Get an email history |\n\n### Health_profile\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /health_profile | List health profiles |\n| GET | /health_profile/{id} | Get a health profile |\n\n### Health_profile_question\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /health_profile_question | List health profile questions |\n| GET | /health_profile_question/{id} | Get a health profile question |\n\n### Health_profile_answer\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /health_profile_answer | List health profile answers |\n| GET | /health_profile_answer/{id} | Get a health profile answer |\n\n### Health_question_definition\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /health_question_definition | List health question definitions |\n| GET | /health_question_definition/{id} | Get a health question definition |\n\n### Patient_health_metric\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /patient_health_metric | Create patient health metrics |\n| GET | /patient_health_metric | List patient health metrics |\n| GET | /patient_health_metric/{id} | Get a patient health metric |\n\n### Patient\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /patient | Create a patient |\n| GET | /patient | List patients |\n| PUT | /patient | Upsert patient |\n| GET | /patient/{id} | Get a patient |\n| PATCH | /patient/{id} | Update a patient |\n| GET | /patient/{id}/groups | List groups for a patient |\n| GET | /patient/{id}/coaches | List coaches for a patient |\n\n### Patient_plan_summary\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /patient_plan_summary | List patient plan summaries |\n| GET | /patient_plan_summary/{id} | Get the plan summary for a patient |\n| PATCH | /patient_plan_summary/{id} | Update a plan summary |\n\n### Result\n| Method | Path | Description |\n|--------|------|-------------|\n| GET | /result | List patient health results |\n| GET | /result/{id} | Get a patient health result |\n\n### Reward\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /reward | Create a reward |\n| GET | /reward | List rewards |\n| GET | /reward/{id} | Get a reward |\n\n### Reward_earning\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /reward_earning | Create a reward earning |\n| GET | /reward_earning | List reward earnings |\n| GET | /reward_earning/{id} | Get a reward earning |\n\n### Reward_earning_fulfillment\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /reward_earning_fulfillment | Create a reward earning fulfillment |\n| GET | /reward_earning_fulfillment | List reward earning fulfillments |\n| GET | /reward_earning_fulfillment/{id} | Get a reward earning fulfillment |\n\n### Reward_program_activation\n| Method | Path | Description |\n|--------|------|-------------|\n| POST | /reward_program_activation | Create a reward program activation |\n| GET | /reward_program_activation | List reward program activations |\n| GET | /reward_program_activation/{id} | Get a reward program activation |\n\n## Common Questions\nMatch user requests to endpoints in references/api-spec.lap. Key patterns:\n- \"Create a token?\" -> POST /oauth/token\n- \"List all groups?\" -> GET /oauth/token/{id}/groups\n- \"List all organization?\" -> GET /oauth/token/{id}/organization\n- \"Get organization details?\" -> GET /organization/{id}\n- \"Create a group?\" -> POST /group\n- \"List all group?\" -> GET /group\n- \"Get group details?\" -> GET /group/{id}\n- \"List all coach?\" -> GET /coach\n- \"Get coach details?\" -> GET /coach/{id}\n- \"Create a reward_program?\" -> POST /reward_program\n- \"List all reward_program?\" -> GET /reward_program\n- \"Get reward_program details?\" -> GET /reward_program/{id}\n- \"Create a action?\" -> POST /action\n- \"Get action details?\" -> GET /action/{id}\n- \"Partially update a action?\" -> PATCH /action/{id}\n- \"Create a bundle?\" -> POST /bundle\n- \"Get bundle details?\" -> GET /bundle/{id}\n- \"Partially update a bundle?\" -> PATCH /bundle/{id}\n- \"Create a calendar_event?\" -> POST /calendar_event\n- \"List all calendar_event?\" -> GET /calendar_event\n- \"Get calendar_event details?\" -> GET /calendar_event/{id}\n- \"Partially update a calendar_event?\" -> PATCH /calendar_event/{id}\n- \"Delete a calendar_event?\" -> DELETE /calendar_event/{id}\n- \"Create a calendar_event_response?\" -> POST /calendar_event_response\n- \"List all email_history?\" -> GET /email_history\n- \"Get email_history details?\" -> GET /email_history/{id}\n- \"List all health_profile?\" -> GET /health_profile\n- \"Get health_profile details?\" -> GET /health_profile/{id}\n- \"List all health_profile_question?\" -> GET /health_profile_question\n- \"Get health_profile_question details?\" -> GET /health_profile_question/{id}\n- \"List all health_profile_answer?\" -> GET /health_profile_answer\n- \"Get health_profile_answer details?\" -> GET /health_profile_answer/{id}\n- \"List all health_question_definition?\" -> GET /health_question_definition\n- \"Get health_question_definition details?\" -> GET /health_question_definition/{id}\n- \"Create a patient_health_metric?\" -> POST /patient_health_metric\n- \"List all patient_health_metric?\" -> GET /patient_health_metric\n- \"Get patient_health_metric details?\" -> GET /patient_health_metric/{id}\n- \"Create a patient?\" -> POST /patient\n- \"List all patient?\" -> GET /patient\n- \"Get patient details?\" -> GET /patient/{id}\n- \"Partially update a patient?\" -> PATCH /patient/{id}\n- \"List all coaches?\" -> GET /patient/{id}/coaches\n- \"List all patient_plan_summary?\" -> GET /patient_plan_summary\n- \"Get patient_plan_summary details?\" -> GET /patient_plan_summary/{id}\n- \"Partially update a patient_plan_summary?\" -> PATCH /patient_plan_summary/{id}\n- \"List all result?\" -> GET /result\n- \"Get result details?\" -> GET /result/{id}\n- \"Create a reward?\" -> POST /reward\n- \"List all reward?\" -> GET /reward\n- \"Get reward details?\" -> GET /reward/{id}\n- \"Create a reward_earning?\" -> POST /reward_earning\n- \"List all reward_earning?\" -> GET /reward_earning\n- \"Get reward_earning details?\" -> GET /reward_earning/{id}\n- \"Create a reward_earning_fulfillment?\" -> POST /reward_earning_fulfillment\n- \"List all reward_earning_fulfillment?\" -> GET /reward_earning_fulfillment\n- \"Get reward_earning_fulfillment details?\" -> GET /reward_earning_fulfillment/{id}\n- \"Create a reward_program_activation?\" -> POST /reward_program_activation\n- \"List all reward_program_activation?\" -> GET /reward_program_activation\n- \"Get reward_program_activation details?\" -> GET /reward_program_activation/{id}\n- \"How to authenticate?\" -> See Auth section above\n\n## Response Tips\n- Check response schemas in references/api-spec.lap for field details\n- Create/update endpoints return the modified resource on success\n- Error responses include status codes and descriptions in the spec\n\n## References\n- Full spec: See references/api-spec.lap for complete endpoint details, parameter tables, and response schemas\n\n> Generated from the official API spec by [LAP](https://lap.sh)\n","references/api-spec.lap":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Fitbit Plus API\n@base https://api.twinehealth.com/pub\n@version v7.78.1\n@auth OAuth2\n@endpoints 62\n@hint download_for_search\n@toc oauth(3), organization(1), group(3), coach(2), reward_program(4), action(3), bundle(3), calendar_event(5), calendar_event_response(1), email_history(2), health_profile(2), health_profile_question(2), health_profile_answer(2), health_question_definition(2), patient_health_metric(3), patient(7), patient_plan_summary(3), result(2), reward(3), reward_earning(3), reward_earning_fulfillment(3), reward_program_activation(3)\n\n@group oauth\n@endpoint POST /oauth/token\n@desc Create an oauth token\n@required {body: map}\n@optional {include: any # List of related resources to include in the response}\n@returns(201) Created\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /oauth/token/{id}/groups\n@desc Get the groups for a token\n@required {id: any # Token identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /oauth/token/{id}/organization\n@desc Get the organization for a token\n@required {id: any # Token identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group organization\n@endpoint GET /organization/{id}\n@desc Get an organization\n@required {id: any # Organization identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group group\n@endpoint POST /group\n@desc Create a group\n@required {body: map}\n@returns(201) Created\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /group\n@desc List groups\n@required {filter[organization]: any: any # Organization identifier}\n@optional {filter[name]: any: any # Group name}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /group/{id}\n@desc Get a group\n@required {id: any # Group identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group coach\n@endpoint GET /coach\n@desc List coaches\n@optional {filter[groups]: any: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[groups]`, `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[groups]`, `filter[organization]`.}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /coach/{id}\n@desc Get a coach\n@required {id: any # Coach identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group reward_program\n@endpoint POST /reward_program\n@desc Create a reward program\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /reward_program\n@desc List reward programs\n@optional {filter[groups]: any: any # Comma-separated list of group identifiers. Note that one of the following filters must be specified: `filter[groups]`, `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[groups]`, `filter[organization]`.}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /reward_program/{id}\n@desc Get a reward program\n@required {id: any # Reward program identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /reward_program/{id}/group\n@desc Get group for a reward program\n@required {id: any # Reward program identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group action\n@endpoint POST /action\n@desc Create action\n@required {body: map}\n@returns(201) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /action/{id}\n@desc Get an action\n@required {id: any # Action identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint PATCH /action/{id}\n@desc Update an action\n@required {id: any # Action identifier, body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endgroup\n\n@group bundle\n@endpoint POST /bundle\n@desc Create bundle\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /bundle/{id}\n@desc Get a bundle\n@required {id: any # Bundle identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint PATCH /bundle/{id}\n@desc Update a bundle\n@required {id: any # Bundle identifier, body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endgroup\n\n@group calendar_event\n@endpoint POST /calendar_event\n@desc Create calendar event\n@required {body: map}\n@returns(201) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /calendar_event\n@desc List calendar events\n@optional {filter[patient]: any: any # Patient id to fetch calendar event. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, `filter[organization]`, or `filter[attendees]`., filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, `filter[organization]`, or `filter[attendees]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, `filter[organization]`, or `filter[attendees]`., filter[attendees]: any # Comma-separated list of coach or patient ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, `filter[organization]`, or `filter[attendees]`., filter[type]: any # Calendar event type, filter[completed]: any # If not specified, return all calendar events. If set to `true` return only events marked as completed, if set to `false`, return only events not marked as completed yet., filter[start_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for events starting in November 2017 (America/New_York): `filter[start_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, filter[end_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for events ending in November 2017 (America/New_York): `filter[end_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, filter[completed_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for events completed in November 2017 (America/New_York): `filter[completed_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, filter[created_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for events created in November 2017 (America/New_York): `filter[created_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, filter[updated_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for events updated in November 2017 (America/New_York): `filter[updated_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, page[number]: any # Page number, page[size]: any # Page size, page[limit]: any # Page limit, page[cursor]: any # Page cursor, include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /calendar_event/{id}\n@desc Get a calendar event\n@required {id: any # Calendar event identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint PATCH /calendar_event/{id}\n@desc Update a calendar event\n@required {id: any # Calendar event identifier, body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint DELETE /calendar_event/{id}\n@desc Delete a calendar event\n@required {id: any # Calendar event identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group calendar_event_response\n@endpoint POST /calendar_event_response\n@desc Create calendar event response\n@required {body: map}\n@returns(201) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endgroup\n\n@group email_history\n@endpoint GET /email_history\n@desc List email histories\n@optional {filter[receiver]: any: any # Fitbit Plus user id of email recipient. Required if filter[sender] is not defined., filter[sender]: any # Fitbit Plus user id of email sender. Required if filter[receiver] is not defined., filter[emailType]: any # Type of email, sort: any # valid sorts:   * send_time - ascending by send_time   * -send_time - descending by send_time}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /email_history/{id}\n@desc Get an email history\n@required {id: any # Email history identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group health_profile\n@endpoint GET /health_profile\n@desc List health profiles\n@optional {filter[patient]: any: any # Patient id to fetch health profile. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., page[number]: any # Page number, page[size]: any # Page size, page[limit]: any # Page limit, page[cursor]: any # Page cursor, include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /health_profile/{id}\n@desc Get a health profile\n@required {id: any # Health profile identifier}\n@optional {include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group health_profile_question\n@endpoint GET /health_profile_question\n@desc List health profile questions\n@optional {filter[patient]: any: any # Patient id to fetch healt profile questions. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /health_profile_question/{id}\n@desc Get a health profile question\n@required {id: any # Health profile question identifier}\n@optional {include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group health_profile_answer\n@endpoint GET /health_profile_answer\n@desc List health profile answers\n@optional {filter[patient]: any: any # Patient id to fetch healt profile answers. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[group]`, or `filter[organization]`., page[number]: any # Page number, page[size]: any # Page size, page[limit]: any # Page limit, page[cursor]: any # Page cursor, include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /health_profile_answer/{id}\n@desc Get a health profile answer\n@required {id: any # Health profile answer identifier}\n@optional {include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group health_question_definition\n@endpoint GET /health_question_definition\n@desc List health question definitions\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /health_question_definition/{id}\n@desc Get a health question definition\n@required {id: any # Health question definition identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group patient_health_metric\n@endpoint POST /patient_health_metric\n@desc Create patient health metrics\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /patient_health_metric\n@desc List patient health metrics\n@optional {filter[patient]: any: any # Filter the patient health metrics for a specified patient. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., page[number]: any # Page number, page[size]: any # Page size, page[limit]: any # Page limit, page[cursor]: any # Page cursor}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /patient_health_metric/{id}\n@desc Get a patient health metric\n@required {id: any # Patient health metric identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group patient\n@endpoint POST /patient\n@desc Create a patient\n@required {body: map}\n@returns(201) Created\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /patient\n@desc List patients\n@optional {filter[groups]: any: any # Comma-separated list of group ids. Note that either `filter[group]` or `filter[organization]` must be specified., filter[organization]: any # Fitbit Plus organization id. Note that either `filter[group]` or `filter[organization]` must be specified., filter[identifier][system]: any # Identifier system (example: \"MyEHR\") - requires a \"filter[identifier][value]\" parameter, filter[identifier][value]: any # Identifier value (example: \"12345\") - requires a \"filter[identifier][system]\" parameter, filter[archived]: any # If not specified, return all patients. If set to 'true' return only archived patients, if set to 'false', return only patients who are not archived., filter[created_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for patients created in November 2017 (America/New_York): `filter[created_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, filter[updated_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for patients updated in November 2017 (America/New_York): `filter[updated_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, page[number]: any # Page number, page[size]: any # Page size, page[limit]: any # Page limit, page[cursor]: any # Page cursor}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint PUT /patient\n@desc Upsert patient\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /patient/{id}\n@desc Get a patient\n@required {id: any # Patient identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint PATCH /patient/{id}\n@desc Update a patient\n@required {id: any # Patient identifier, body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /patient/{id}/groups\n@desc List groups for a patient\n@required {id: any # Patient identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /patient/{id}/coaches\n@desc List coaches for a patient\n@required {id: any # Patient identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group patient_plan_summary\n@endpoint GET /patient_plan_summary\n@desc List patient plan summaries\n@optional {filter[patient]: any: any # Patient id to fetch plan summary for. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /patient_plan_summary/{id}\n@desc Get the plan summary for a patient\n@required {id: any # Plan summary identifier}\n@optional {include: any # List of related resources to include in the response}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint PATCH /patient_plan_summary/{id}\n@desc Update a plan summary\n@required {id: any # Plan summary identifier, body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endgroup\n\n@group result\n@endpoint GET /result\n@desc List patient health results\n@required {filter[patient]: any: any # Filter the patient health results for a specified patient}\n@optional {filter[actions]: any: any # A comma-separated list of action identifiers, filter[start_at]: any # Filter results that occurred after the passed ISO date and time string, filter[end_at]: any # Filter results that occurred before the passed ISO date and time string, filter[threads]: any # A comma-separated list of thread identifiers, filter[created_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for results created in November 2017 (America/New_York): `filter[created_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, filter[updated_at]: any # The start (inclusive) and end (exclusive) dates are ISO date and time strings separated by `..`. Example for results updated in November 2017 (America/New_York): `filter[updated_at]=2017-11-01T00:00:00-04:00..2017-12-01T00:00:00-05:00`, page[number]: any # Page number, page[size]: any # Page size, page[limit]: any # Page limit, page[after]: any # Page cursor}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /result/{id}\n@desc Get a patient health result\n@required {id: any # Patient health result identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group reward\n@endpoint POST /reward\n@desc Create a reward\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /reward\n@desc List rewards\n@optional {filter[patient]: any: any # Patient identifier. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[reward_program_activation]: any # Reward program activation identifier, filter[thread]: any # Thread identifier, filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`.}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /reward/{id}\n@desc Get a reward\n@required {id: any # Reward identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group reward_earning\n@endpoint POST /reward_earning\n@desc Create a reward earning\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /reward_earning\n@desc List reward earnings\n@required {filter[groups]: any: any # Group identifiers, filter[patient]: any # Patient identifier}\n@optional {filter[ready_for_fulfillment]: any: any # If true, only returns those reward earnings for which ready_for_fulfillment is true and fulfilled_at is null. If false, only returns those reward earnings for which ready_for_fulfillment is false and fulfilled_at is null.}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /reward_earning/{id}\n@desc Get a reward earning\n@required {id: any # Reward earning identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group reward_earning_fulfillment\n@endpoint POST /reward_earning_fulfillment\n@desc Create a reward earning fulfillment\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /reward_earning_fulfillment\n@desc List reward earning fulfillments\n@required {filter[patient]: any: any # Patient identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /reward_earning_fulfillment/{id}\n@desc Get a reward earning fulfillment\n@required {id: any # Reward earning fulfillment identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@group reward_program_activation\n@endpoint POST /reward_program_activation\n@desc Create a reward program activation\n@required {body: map}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden, 409: Invalid Request}\n\n@endpoint GET /reward_program_activation\n@desc List reward program activations\n@optional {filter[patient]: any: any # Patient identifier. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[groups]: any # Comma-separated list of group ids. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`., filter[organization]: any # Fitbit Plus organization id. Note that one of the following filters must be specified: `filter[patient]`, `filter[groups]`, `filter[organization]`.}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endpoint GET /reward_program_activation/{id}\n@desc Get a reward program activation\n@required {id: any # Reward program activation identifier}\n@returns(200) OK\n@errors {401: Unauthorized, 403: Forbidden}\n\n@endgroup\n\n@end\n"}}