Name | Description |
---|---|
access_token | JSON Web Token retrieved from the Sessions endpoint (you can also pass this into the Authorization header) |
organization_ids | comma delimited list of organization ids to scope the items to |
filters |
Filter options: Filter by Person: - filters[assigned_contacts] = 1,2,me (people who these have these people assigned to them) - filters[assigned_tos] = 5,6,me,assigned,unassigned (people who are assigned to these person ids) - filters[exclude_ids] = 1,2 (if you want to skip specific people) - filters[faculty] = true,false (people who's faculty attribute set to true, false, or either) - filters[genders] = male,female,other (people who's gender is set to male, female, or other) - filters[group_ids] = 1,2 (people who have a group membership on the groups with the given ids) - filters[ids] = 3,4 (if you are wanting a specific list of people) - filters[include_archived] = [true,false] - filters[interaction_type_ids] = 1,2 (people that have at least one Interaction of the gives types) - filters[label_ids] = 1,2 (people who have an organizational label with the given ids) - filters[name] = search string (the system will try to search by first and last name, or email address if you include a '@') - filters[organization_ids] = 3,4 - filters[permissions] = 3,1,4,owner,admin,user (people who have these permissions) - filters[statuses] = uncontacted,attempted_contact,contacted,do_not_email,do_not_contact,completed,in_progress (filter by people's followup_status on organizational_permissions) Filter by Updated At: Match people that have an updated_at value in between two given times, two time values should be given in ISO8601 format. - filters[updated_at][] = 2018-04-09T00:00:00Z - filters[updated_at][] = 2018-05-31T19:59:59Z Filter by Survey: - filters[answer_sheets][survey_ids] = 1,2,3,4 Filter by Answers: Where :question_id is the numerical question id. Note the trailing [] in the param name, this signifies that the param can be specified multiple times to filter by multiple values. Case is ignored. - filters[answer_sheets][answers][:question_id][] = answer value one - filters[answer_sheets][answers][:question_id][] = answer value two Example: filters[answer_sheets][survey_ids]=16&filters[answer_sheets][answers][32][]=Yes&filters[answer_sheets][answers][32][]=No&filters[answer_sheets][answers][64][]=JoeThis example query returns answer_sheets for the survey with id 16, where the answer to the question with id 32 is either "yes" or "no", and where the answer to the question with id 64 is "Joe". Filter by Answers Matching Options: One option per question is supported. Each different option changes the filter behaviour. Note that, regardless of the option, the matching will always ignore case. Where :question_id is the numerical question id and :option is one of the acceptable options listed below. - filters[answer_sheets][answers_options][:question_id] = :option The following values are accepted for option: - all (match all of the given values, they must match exactly) - any (match any of the given values, they must match exactly) - contains (match answers that contain the given values) - date (match answers that equal the given values, treating the values as dates) - date_range (match answers that have a date in between two given dates, two date values should be given) - does_not_contain (match answers that do not contain the given values) Example 1: filters[answer_sheets][survey_ids]=16&filters[answer_sheets][answers][8][]=maybe&filters[answer_sheets][answers_options][8]=containsThis example query returns answer_sheets for the survey with id 16, where the answer to the question with id 8 contains "maybe". Example 2: filters[answer_sheets][survey_ids]=16&filters[answer_sheets][answers][8][]=2018-05-18T16:00:00Z&filters[answer_sheets][answers][8][]=2018-04-01T16:00:00Z& filters[answer_sheets][answers_options][8]=date_rangeThis example query returns answer_sheets for the survey with id 16, where the answer to the question with id 8 contains a date in between or equal to April 1, 2018 and May 18, 2018. Filter by Questions by Answer existence: One option per question is supported. Each different option changes the filter behaviour. Note that, regardless of the option, the matching will always ignore case. Where :question_id is the numerical question id and :option is one of the acceptable options listed below. - filters[answer_sheets][answers_options][:answer_id] = :option The following values are accepted for option: - no_response (match questions that have no response) - any_response (match questions that have any non-empty response value) Example 1: filters[answer_sheets][survey_ids]=16&filters[answer_sheets][answers][8][]&filters[answer_sheets][answers_options][8]=no_responseThis example query returns answer_sheets for the survey with id 16, where the answer to the question with id 8 is not answered. Example 2: filters[answer_sheets][survey_ids]=16&filters[answer_sheets][answers][8][]&filters[answer_sheets][answers_options][8]=any_responseThis example query returns answer_sheets for the survey with id 16, where the answer to the question with id 8 is answered. |
include | comma delimited relationships you want included in the response in snake_case format |
fields | A comma separated list of fields to return in the response for the given type. A resource object's attributes and its relationships are collectively called its 'fields'. Clients may restrict the set of fields in order to improve performance. Multiple types can be specified. If no fields param is specified then by default all fields are returned. Example |
page |
pagination details: - page[limit] = number of people you want to receive per page, default 25 - page[offset] = skip the first n number of records before reading people, default 0 |
sort |
order you want to receive people in, defaults to last_name, first_name. Sort options: - sort = first_name (order by first_name) - sort = last_name (order by last_name) - sort = gender (order by gender) - sort = organizational_permissions.followup_status (order by followup status) - sort = answer_sheets.completed_at (order by oldest completed answer sheet) - sort = -answer_sheets.completed_at (order by latest completed answer sheet) - sort = answer_sheets.updated_at (order by oldest updated answer sheet) - sort = -answer_sheets.updated_at (order by latest updated answer sheet) |
Name | Description |
---|---|
data |
primary JSON API payload (Incomplete list of fields) |
included | related models (controlled by the include param) |
meta | will contain additional information about the current request, including the total number of records before the limit/offset operations |
Version: HTTP/1.0 Accept: application/vnd.api+json Content-Type: application/vnd.api+json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNiwiZXhwIjoxNzA0NDczMjIxLCJpYXQiOjE3MDQ0NzMwNDF9.c4C7eYzPl5M3mDhgK4d-L8FnNWUlcLa3h67qvLQpg4c Host: example.org Cookie:
GET /apis/v4/people?organization_ids=27&include=email_addresses%2Cinteractions&page%5Blimit%5D=50
organization_ids=27 include=email_addresses,interactions page={"limit"=>"50"}
X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none Referrer-Policy: strict-origin-when-cross-origin Content-Type: application/vnd.api+json Vary: Accept X-MH-Session: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNiwiZXhwIjoxNzA0NjQ1ODQxLCJpYXQiOjE3MDQ0NzMwNDF9.RmwgHLCymF5SmkwJwYz1wpiL7YZMplVC7NCccjhvsa8 Access-Control-Expose-Headers: X-MH-Session ETag: W/"e80ebb0248be193b97e69ae48c8700f0" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: e9c4054e-a575-4a16-94d3-5ac8100e83c1 X-Runtime: 0.090680 Content-Length: 1928
200
Version: HTTP/1.0 Accept: application/vnd.api+json Content-Type: application/vnd.api+json Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNiwiZXhwIjoxNzA0NDczMjIxLCJpYXQiOjE3MDQ0NzMwNDF9.c4C7eYzPl5M3mDhgK4d-L8FnNWUlcLa3h67qvLQpg4c Host: example.org Cookie:
GET /apis/v4/people?organization_ids=27&include=
organization_ids=27 include=
X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff X-Download-Options: noopen X-Permitted-Cross-Domain-Policies: none Referrer-Policy: strict-origin-when-cross-origin Content-Type: application/vnd.api+json Vary: Accept X-MH-Session: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoxNiwiZXhwIjoxNzA0NjQ1ODQxLCJpYXQiOjE3MDQ0NzMwNDF9.RmwgHLCymF5SmkwJwYz1wpiL7YZMplVC7NCccjhvsa8 Access-Control-Expose-Headers: X-MH-Session ETag: W/"7ce8655862a7068dbb7676fff72f5e6a" Cache-Control: max-age=0, private, must-revalidate X-Request-Id: 2ad8a23b-9133-4825-b685-1109f307216e X-Runtime: 0.085416 Content-Length: 1521
200