Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12446,7 +12446,7 @@ paths:
- `project_story_category_ids` (Survey Campaigns completed) with `project_story_category_filter_data: {id: {story_date_from}}`
- `attendance_rate`: `{change_id, from, to, event_scope}`
- `same_day_rate` (Same-day rate): `{change_id, event_scope, event_filter_params, qualifying_change_ids, match: all|any, qualifying_event_scope, qualifying_event_filter_params, from, to}`. On the days the `change_id` Engagement Tracker was recorded for a Contact at an event, the percentage of those days on which the `qualifying_change_ids` Engagement Trackers (all of them, or any one) were also recorded for them at an event on the same date, in the Organisation's time zone. A day with no matching record counts as not met; Contacts with no such days never match. E.g. children who received all four meals on every day they attended class: `from: "100", to: "100"`
- `distance_travelled`: `{trackers: [{indicator_id, directions: [improved|no_change|worsened]}], same_project}`
- `distance_travelled`: `{trackers: [{indicator_id, directions: [improved|no_change|worsened|reached_top]}], match: any|all|at_least, match_count, same_project}`. Compares each Contact's first and latest answer to each Choice Tracker; `reached_top` means the latest answer is the best on the scale, whatever the first was. `match` says how many of the trackers a Contact must meet: `any` (default), `all`, or `at_least` `match_count` of them. E.g. Contacts who improved or reached the top answer in at least 2 of 3 goals: three trackers with `directions: [improved, reached_top]`, `match: at_least`, `match_count: 2`. With `denominator: enough_data`, a percentage is out of the Contacts with two responses on that many trackers
- `indicator_comparisons`: `{indicator_id: {response: any|latest, op, sub_ratio_ids, values}}`
- `indicator_sub_ratios_hash`: `{indicator_id: [sub_ratio_id]}`

Expand Down
2 changes: 1 addition & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -3208,7 +3208,7 @@ function buildDocsPage() {
${endpointCard("POST", "/cohort_trackers/preview", "Preview Cohort Tracker criteria", true, [], [
{ code: "200", cls: "response-2xx", desc: "<code>count</code> of matching Contacts and the normalised <code>criteria</code>" },
{ code: "422", cls: "response-4xx", desc: "An unknown <code>membership</code>" }
], "Body: <code>charity_id</code>, <code>cohort_tracker: {criteria, membership}</code>. <code>criteria</code> takes any key the Contacts page's Filters sidebar sends. <code>project_ids</code>, <code>bundle_ids</code>, <code>narrow_bundle_ids</code>, <code>projects_states_hash</code>, <code>project_beneficiary_states</code>, <code>project_story_category_ids</code>, <code>attendance_rate</code>, <code>same_day_rate</code> (Same-day rate), <code>distance_travelled</code>, <code>indicator_comparisons</code> and <code>indicator_sub_ratios_hash</code> follow the Project or Album and the reporting period; the other sections (e.g. <code>group_ids</code>, <code>age_from</code>) apply to the Contacts' current details. Keys no filter reads are dropped.")}
], "Body: <code>charity_id</code>, <code>cohort_tracker: {criteria, membership}</code>. <code>criteria</code> takes any key the Contacts page's Filters sidebar sends. <code>project_ids</code>, <code>bundle_ids</code>, <code>narrow_bundle_ids</code>, <code>projects_states_hash</code>, <code>project_beneficiary_states</code>, <code>project_story_category_ids</code>, <code>attendance_rate</code>, <code>same_day_rate</code> (Same-day rate), <code>distance_travelled</code> (Distance Travelled Direction; <code>match: any|all|at_least</code> with <code>match_count</code> sets how many of its Choice Trackers a Contact must meet, e.g. improved in at least 2 of 3 goals, and the <code>reached_top</code> direction matches a latest answer that is the best on the scale), <code>indicator_comparisons</code> and <code>indicator_sub_ratios_hash</code> follow the Project or Album and the reporting period; the other sections (e.g. <code>group_ids</code>, <code>age_from</code>) apply to the Contacts' current details. Keys no filter reads are dropped.")}
${endpointCard("POST", "/cohort_trackers", "Create a Cohort Tracker", true, [], [
{ code: "201", cls: "response-2xx", desc: "Cohort Tracker created" },
{ code: "403", cls: "response-4xx", desc: "Not an editor or reporter of the Organisation" },
Expand Down
Loading