# Changelog

This changelog covers what's changed in the MPDX APIs.

## 4 June 2021

* Removed Google Contacts integration

## 10 May 2021

* Removed contact/donation\_amount\_recommendations endpoints
* Removed donation\_amount\_recommendations relationships from contacts, donor accounts, and designation accounts
* Mark donation\_amount\_recommendations filters deprecated

## 5 June 2020

* Added user/account\_list\_coaches \[DELETE]

## 18 May 2020

* Added option to sort contact labels by zip (by default sorts by name)

## 27 April 2020

* Added constants query to graphQL endpoint

## 17 April 2020

* Added contact\_status filter to people

## 13 April 2020

* Added opt\_out filter to contacts

## 7 April 2020

* Added user/organization\_accounts/:organization\_account\_id/sync endpoint \[GET]

## 27 March 2020

* Added next\_ask filter to contacts

## 17 March 2020

* Added preferred\_contact\_method to contacts endpoint
* Added preferred\_contact\_method\_hashes to constants endpoint

## 24 January 2020

* Added contact relationship to contacts/analytics endpoint
* Added featured field to filters

## 23 January 2020

* Removed account\_lists/:account\_list\_id/page endpoint \[GET]
* Removed account\_lists/:account\_list\_id/page endpoint \[PUT]
* Removed public/pages/find/:slug endpoint \[GET]
* Removed public/pages/:page\_id/subscriptions/confirm/:code endpoint \[PUT]
* Removed public/pages/:page\_id/subscriptions endpoint \[POST]

## 13 December 2019

* Added user to contacts and tasks
* Added user\_ids filter to contacts and tasks

## 8 November 2019

* Added relationship\_code to contacts

## 6 November 2019

* Added account\_lists/entries endpoint \[LIST]
* Added account\_lists/entries/:id endpoint \[GET]
* Added account\_lists/financial\_accounts endpoint \[LIST]
* Added account\_lists/financial\_accounts/:id endpoint \[GET]
* Added account\_lists/financial\_accounts/:id endpoint \[PUT]
* Added reports/entry\_histories endpoint \[LIST]

## 12 October 2019

* Added reports/tag\_histories endpoint \[LIST]

## 11 September 2019

* Added country, metro\_area and region to account\_lists/pages/subscriptions \[POST]
* Added country, metro\_area and region to designation\_accounts/subscriptions \[POST]

## 10 September 2019

* Added account\_lists/mail\_chimp\_account endpoint \[PUT]

## 28 August 2019

* **BREAKING CHANGE** Removed api\_key string field from mail\_chimp\_accounts \[Security]
* **BREAKING CHANGE** Removed token string field from prayer\_letters\_accounts \[Security]
* Added valid\_token boolean field to prayer\_letters\_accounts

## 27 August 2019

* Added account\_lists/donations/bulk endpoint \[PUT]

## 8 August 2019

* Added public/designation\_accounts/subscriptions endpoint \[POST]

## 17 July 2019

* **BREAKING CHANGE** remove email\_integration and email\_blacklist attributes from google\_integration record.

## 30 May 2019

* Added contacts appeal\_status filter
* Added appeal\_contacts, excluded\_appeal\_contacts, and pledges relationships to contacts

## 28 May 2019

* CSV import files should contain a maximum of 10\_000 lines including the header. Lines beyond the initial 10\_000 will be ignored.

## 1 May 2019

* rate limit added to API of 1000 requests every 5 minutes
* rate limit added to authentication endpoint of 15 requests per minute

## 26 April 2019

* Added an assignable\_language\_hashes field to '/api/v2/constants' endpoint.

## 28 March 2019

* user/account\_list\_coaches endpoint is now sortable by account\_list.name

## 22 March 2019

* **BREAKING CHANGE** account\_lists and account\_lists/:id endpoints includes for users and coaches return subset of attributes. This was updated to secure the endpoint from being exploited to reveal data the user should not be able to access.

## 1 March 2019

* Added account\_lists/notification\_preferences endpoint \[PUT]

## 24 January 2019

* Added appeals/excluded\_appeal\_contacts/bulk endpoint \[DELETE]

## 5 January 2019

* Added reports/donation\_histories endpoint

## 28 December 2018

* Added announcements endpoint \[LIST, SHOW]
* Added user/announcements endpoint \[CREATE]

## 20 December 2018

* Added reports/people\_with\_anniversaries endpoint
* Added reports/people\_with\_birthdays endpoint

## 5 December 2018

* Added organizations/contacts endpoint

## 2 December 2018

* Added organizations/account\_lists/account\_list\_coaches endpoint \[DELETE]
* Added organizations/account\_lists/account\_list\_users endpoint \[DELETE]
* Added organizations/account\_lists/invites endpoint \[DELETE]
* Added organizations/account\_lists endpoint

## 16 November 2018

* Added organizations/impersonation endpoint

## 15 November 2018

* Added user/notifications account\_list\_id filter

## 7 November 2018

* Added organizations endpoint
* Added organizations/admins endpoint
* Added organizations/invites endpoint

## 2 November 2018

* Added user\_notification\_title\_hashes to list of constants at '/api/v2/constants'.

## 31 October 2018

* Added user/notifications endpoint

## 30 October 2018

* Added time\_hashes to list of constants at '/api/v2/constants'.

## 23 October 2018

* Added version and locale attributes to user/devices endpoint
* **BREAKING CHANGE** user/key\_accounts \[DELETE] removed
* add version and locale attributes to user/devices endpoint

## 9 October 2018

* Add app attribute to account\_lists/notification\_prefences endpoint (default is true)
* Add record\_ids filter to contacts/duplicates and contacts/people/duplicates

## 8 October 2018

* **BREAKING CHANGE** account\_lists/notifications \[POST] removed
* **BREAKING CHANGE** account\_lists/notifications \[DELETE] removed
* **BREAKING CHANGE** account\_lists/notifications \[PUT] updatable fields changed to only allow cleared
* account\_lists/notifications/cleared \[PUT] added to bulk update all notifications to `cleared = true`

## 4 October 2018

* Added user/devices endpoint

## 25 September 2018

* **BREAKING CHANGE** contacts/exports \[POST] when using ids filter other filters will be ignored
* **BREAKING CHANGE** contacts/exports/mailing \[POST] when using ids filter other filters will be ignored

## 18 September 2018

* Add legacy\_account\_number attribute to donor\_account
* Add legacy\_designation\_number attribute to designation\_account
* Add legacy\_remote\_id attribute to donation

## 23 August 2018

* Added bulk\_update\_option\_hashes and notification\_hashes to list of constants at '/api/v2/constants'.
* DEPRACATED notification*translated\_hashes. This was a mistake and should not have had \_translated* present in the name.

## 17 August 2018

* Added PUT account\_list/designation\_accounts/:id allowing active to be updated

## 4 May 2018

* Added reports/pledge\_histories endpoint
* Added reports/appointment\_results endpoint

## 26 April 2018

* contacts/exports \[LIST] is now deprecated
* contacts/exports/mailing \[LIST] is now deprecated
* contacts/exports \[POST] allows creating of export\_logs
* contacts/exports/:id \[GET] allows users to retrieve a CSV or XLSX file directly from the API
* contacts/exports/mailing \[POST] allows creating of export\_logs with a custom mailing format
* contacts/exports/mailing/:id \[GET] allows users to retrieve a CSV file directly from the API

## 20 April 2018

* add nil activity type to Activity analytics

## 6 April 2018

* add designation\_account\_id & donor\_account\_id filter to account\_list/donations
* add designation\_account\_id & donor\_account\_id filter to reports/donor\_currency\_donations
* add designation\_account\_id & donor\_account\_id filter to reports/salary\_currency\_donations
* add designation\_account\_id & donor\_account\_id filter to reports/monthly\_giving\_graph
* add designation\_account\_id & donor\_account\_id filter to reports/expected\_monthly\_totals

## 17 November 2017

* CSV Import no longer accepts hash key value format

## 8 November 2017

* designation account display name field no longer duplicates designation\_number
* donor account display name field no longer duplicates account\_number

## 4 November 2017

* user/organization\_accounts no longer returns token field

## 30 October 2017

* Updated 4 filters.
  * gave\_more\_than\_pledged\_within is now gave\_more\_than\_pledged\_range
  * pledge\_amount\_increase\_within is now pledge\_amount\_increase\_range
  * started\_giving\_within is now started\_giving\_range
  * stopped\_giving\_within is now stopped\_giving\_range

## 12 October 2017

* Added api/v2/reports/monthly\_losses\_graphs endpoint.

## 11 October 2017

* added a DELETE action to appeals/excluded\_appeal\_contacts endpoint

## 09 October 2017

* Added /api/v2/coaching/pledges endpoint.

## 6 October 2017

* appeals/appeal\_contacts endpoint is now sortable by contact.name
* appeals/excluded\_appeal\_contacts endpoint is now sortable by contact.name
* Added relationship to donation\_amount\_recommendations to contacts endpoint.
* Added contact/donation\_amount\_recommendations endpoint.
* pledges endpoint is now filterable by status

## 05 October 2017

* Added /api/v2/coaching/account\_lists endpoint.
* Added /api/v2/coaching/contacts endpoint.

## 4 October 2017

* Added ability to sort by contact name field in pledges endpoint.
* Contact Status filter now returns contacts with no status when 'active' is in the list of parameter.
* Added assignable\_location\_hashes to list of constants returned by the '/api/v2/constants' endpoint.

## 3 October 2017

* convert pledge status booleans to enum

## 29 September 2017

* Added pledged\_to\_appeal filter to appeal/:id/appeal\_contacts endpoint.

## 28 September 2017

* Add all person fields to the /user endpoint.

## 27 September 2017

* Removed Burmese, Vietnamese, Japanese and Persian to list available languages.

## 19 September 2017

* Added the /contacts/people endpoint to get and delete a person without the contact id.

## 11 September 2017

* Removed /api/v2/appeals/contacts endpoint.
* Added /api/v2/appeals/appeal\_contacts endpoint.
* Added /api/v2/appeals/excluded\_appeal\_contacts endpoint.
* Upon a successful Account Reset (an admin function), the user is sent an

  email asking them to logout and log back into MPDX. A link to the logout

  route is provided in the email body.

## 8 September 2017

* The ACCEPT-LANGUAGE header can now be used to set the locale on each request.
  * Eg. 'ACCEPT-LANGUAGE: "fr-FR"'

## 5 September 2017

* Added active\_mpd\_start\_at, active\_mpd\_finish\_at, active\_mpd\_monthly\_goal fields to account\_list object.
* Added primary\_appeal relationship to account\_list object.
* Added fix-send-newsletter count to /api/v2/tools/analytics endpoint.

## 31 August 2017

* **BREAKING CHANGE** to the /api/v2/contacts/people/duplicates endpoints. Duplicates are now resources with uuids.

## 30 August 2017

* Added pledges\_amount fields to appeal object.

## 29 August 2017

* Added a 'processed' field on the pledge object.
* Added an 'appeal\_id' filter on the pledges endpoint.
* Add a new include to designation\_accounts called balances showing historic balances

## 21 August 2017

* **BREAKING CHANGE** to the /api/v2/user endpoint. preferences\[setup] now returns a string if the user is not setup correctly.

## 18 August 2017

* Added email\_blacklist attribute to google\_integrations.
* **BREAKING CHANGE** to the /api/v2/contacts/duplicates endpoints. Duplicates are now resources with uuids.

## 17 August 2017

* Moved appeals donations attribute into relationships.

## 08 August 2017

* Added pt-BR (brazilian portuguese) to the list of supported locales on the API.

## 28 July 2017

* Added filter\[display\_currency] to '/api/v2/reports/monthly\_giving\_graph' that changes the converted currency for the graph.

## 24 July 2017

* Expanded the search scope of wildcard\_search under '/api/v2/tasks' endpoint to include associated comments and contacts.

## 21 July 2017

* Addresses, email addresses and phone numbers now can be edited when the source is 'TntImport'.

## 20 July 2017

* The '/admin/impersonation' endpoint now permits the search of impersonated users by email addresses.

## 13 July 2017

* Removed the '/api/v2/user/authentication' endpoint.

## 12 July 2017

* Added a pledge\_frequency\_hashes field to '/api/v2/constants' endpoint.

## 11 July 2017

* Added organization to relationships on designation account objects returned by the API.
* Gift Aid can now be opted out for specific contacts.
* Added a '/reports/donation\_monthly\_totals' endpoint.

## 06 July 2017

* Added the '/admin/impersonation' endpoint.

## 27 June 2017

* Tasks endpoint can now sort by multiple parameters.
* Sorting now allows specifying the NULLS sort order (FIRST or LAST).

## 26 June 2017

* Added contact name search to donor accounts endpoint.

## 20 June 2017

* CSV Import should support importing Referred By.

## 19 June 2017

* TNT import now allows to import Campaign information related to all manually added gifts.

## 13 June 2017

* Added parent\_contacts field to person object.
  * That field contains the ids of contacts associated to the person object.

## 09 June 2017

* Added a tools analytics endpoint:
  * Gives the number of contacts, addresses, phone numbers and email addresses that

    need to be fixed by the user. It also gives a count of the number of duplicated contacts and people associated to him/her.

## 08 June 2017

* Tnt import: improve setting task completed status, and timezone parsing.

## 06 June 2017

* Added wildcard search filter on '/api/v2/contacts/people' endpoint.
* Added location to list of task attributes displayed on '/api/v2/tasks' endpoint.

## 05 June 2017

* Added Vietnamese, Ukrainian, Burmese and Polish to list of languages supported on the API side.

## 09 May 2017

* Added translated constant hashes to list of constants at '/api/v2/constants'.
  * 'activity\_hashes', 'assignable\_likely\_to\_give\_hashes',

    'assignable\_send\_newsletter\_hashes' and 'status\_hashes' were added.
  * They contain hashes with the english and translated version of each constant.

## 08 May 2017

* DB Migrations: AddAmountCurrencyToPledges, AddAppealIdToPledges, CreatePledgeDonations, MigratePledgesDonationIdDataToJoinTable, RemoveDonationIdFromPledges
* Pledge now has many Donations (instead of belongs\_to).
* Pledge now has an amount\_currency.
* TNT Import parses dates according to the user's timezone.
* TNT Import now imports Pledges (called "Promises" in TNT).

## 05 May 2017

* Allow clients to apply merge the different filters together using an 'OR'. To do so add 'any\_filter = true' to your list of filters.

## 04 May 2017

* Added 5 new filters.
  * Those are: gave\_more\_than\_pledged, no\_appeals, pledge\_amount\_increase\_within, started\_giving\_within and

    stopped\_giving\_within. View documentation for details.
* Migration: Add is\_organization to contacts
* TNT Import now imports Contact is\_organization

## 01 May 2017

* Added updated\_at filter to people.
* Allowing clients to set a foreign key to nil.
  * To do so just set "id: 'none'" for a belongs\_to relationship
* Add "qa" Rails environment

## 28 April 2017

* Added batch endpoint at `POST /api/v2/batch`
  * It expects a JSON payload with a `requests` key that has an array of request objects. A request object needs to have a `method` key and a `path` key. It may also have a `body` key.
  * The response will be a JSON array of response objects. A response object has a `status` key, a `headers` key, and a `body` key.  The `body` is a string of the server response.
  * In addition to the `requests` key in the payload, you may also specify a `on_error` key which may be set to `CONTINUE`, or `ABORT`. `CONTINUE` is the default, and it will return a 200 no matter what, and give a response for every request, no matter if they errored or not. `ABORT` will end the batch request early if one of the requests fails. The batch response will have the status code of the failing request, and the response will include responses up to and including the errored request, but no more.
  * Some endpoints are unable to be used within a batch request. At this time, only bulk endpoints are disallowed from being used in a batch request.

## 26 April 2017

* Now allowing anyone invited to share an account to edit any of the account's resources on MPDX.
* Allowing reverse filters for any contacts or tasks filters.
  * To do so just add 'reverse\_FILTER\_NAME\_HERE = true' to the filter hash.

## 25 April 2017

* Added /account\_lists/invites/accept endpoint to allow users to accept an account list invite.

## 20 April 2017

* Added received\_not\_processed to pledges.
* Contact suggested\_changes used to sometimes suggest a blank value for status, this was a bug that has been fixed.

## 18 April 2017

* Added direct deposit to contact endpoints.
* Updated translations and added it, th and id.
* Added a contact name\_like filter.

## 13 April 2017

* Removed total\_donations from all contact endpoints.
* Added api\_class and help\_email attributes to a new constant field called organizations\_attributes.
* Added contact referrals relationships to contact serializer.
* Added people bulk endpoints.

## 11 April 2017

* Update Contact suggested\_changes after an import.
* Added updated\_in\_db\_at to all 409 Conflict error payloads.
* Permit override param on imports.

## 10 April 2017

* Allows the client not to specify a particular accept or content-type header on the contacts export endpoints.
* Added a late\_by\_90\_days field to contacts analytics endpoint.

## 8 April 2017

* Add `mobile_alert_frequencies` to Constants.

## 7 April 2017

* Added a way to overwrite data on PATCH requests without providing an `updated_in_db_at` value.

## 6 April 2017

* Contacts Wildcard Search is now returning contacts where the value is in notes.
* Addresses are now returning the source\_donor\_account relationship.
* Contacts are now returning the primary\_or\_first\_person relationship.

## 5 April 2017

* Added total\_donation to donation detail
* Amount under donation endpoint is now just returning an amount without symbol

## 4 April 2017

* TNT Import now imports social media accounts.
* TNT Import now imports contact envelope\_greeting.

## 3 April 2017

* Imports API now accepts comma delimited tag\_list, instead of tags.

## 2 April 2017

* Added Russian, Arabic, German and Korean to list of languages supported on the API side.

## 31 March 2017

* Added converted\_amount and converted\_currency to donation objects returned by the API.
* Added turkish to list of language constants.
* Add missing attributes metro\_area, region, remote\_id, and seasonal to Address serialization
* CSV Import: Remove support for Contact Name, instead we'll require at least First Name, or Last Name
* CSV Import: Remove Referred By because it's not supported yet
* CSV Import: Auto generate a Contact Name based on first and last names

## 30 March 2017

* Added bulk create actions for contacts/tags and tasks/tags
* Added a way to bulk remove multiple tags from multiple records on the contacts/tags and tasks/tags endpoints
* Bulk contacts/tags and tasks/tags now work like any other bulk endpoint
* Enabled being able to set `X-HTTP-Method-Override` header to override the request method

## 29 March 2017

* Added updated\_at as a filter for Contacts endpoint
* Added updated\_at as a filter for Tasks endpoint

## 28 March 2017

* Added contact related filters to tasks endpoint
* User creation now works. Now when you try to authenticate with a valid theKey ticket, and the User doesn't exist - it will create them
  * One thing to note - the User will be returned *without* any `Account List` information, unless they are part of the Cru-USA organization
* TNT imports user fields as tags
* TNT imports Campaigns, renamed from Appeals in v3.2

## 27 March 2017

* Updating TntImport::GroupTagsLoader to import from TNT v3.2
* Added TntImport::Xml service class to assist TNT imports

## 24 March 2017

* Added endpoint to update people without specifying a contact\_id at PUT api/v2/contacts/people

## 23 March 2017

* Add sources to Constants endpoint
* "source" and "valid\_values" attributes are now updatable on phone\_numbers, email\_addresses, and addresses

## 22 March 2017

* When adding a referral under a Contact, ie: `contacts_referred_by_me`, you are now **required** to provide a related `account_list` for each referral
* When Merging Account Lists, the Target Account List (ie: the account that remains after the merge) is now returned in the response body of a successful merge

## 21 March 2017

* The API will now return better 404 detail messages when unable to find a resource

## 20 March 2017

* Added a pledge endpoint to access pledges associated to an account\_list ( /account\_lists/pledges )
* Filters ending with `_id` now allow for comma-delimited ids to be sent
* Add CSV Import get, list, and update endpoints
* Added alert frequencies to the constants endpoint
* Add CSV Import constants to the constants endpoint

## 17 March 2017

* Sparse fieldsets enabled for contacts and people duplicates endpoints

## 15 March 2017

* Adjust attributes returned / required for Linkedin Accounts

## 14 March 2017

* Add `website` attribute to `Contact` objects
* Adjust Bulk Delete Tags endpoints (`api/v2/contacts/tags/bulk` and `api/v2/tasks/tags/bulk`)
* Allow for resource filtering, ie: `filter[contact_ids]`
* Adjust object format of Tag to be removed to better mirror `json:api`

## 10 March 2017

* Added a mailing csv export endpoint
* FacebookAccount on person endpoint is now accepting username and remote\_id as opposed to url
* Person object will now have only one primary address at a time
* Removed donor\_account presence validation on organization\_id as requested by Mike
* Now displaying parent\_contact for people objects under birthdays\_this\_week field of contacts analytics
* Added Google OAuth endpoint
* Added Prayer Letters OAuth endpoint

## 8 March 2017

* all filters accept comma separated items

## 7 March 2017

* constant\_list now returning a complete currency object instead of a string
* person duplicates endpoint is now eliminating doubles
* conflict error returns the value of update\_at in db to client

## 6 March 2017

* Added bulk create tasks endpoint

## 3 March 2017

* removed validation on start\_at and dropped no\_date field
* added fr-CA to language constants

## 1 March 2017

* Added ability to sort by start\_at field in donations endpoint
* Added a delete donation endpoint
* Added the ability to include people, email\_addresses and phone\_number in tasks endpoint
* Removed the 'links' object from list endpoints

## 28 February 2017

* Added tasks to contacts endpoint

## 27 February 2017

* Added locale\_display to User model preferences
* Added completed\_at sorting param to tasks endpoint

## 25 February 2017

* Added a contacts bulk create endpoint
* Bulk endpoints now *require* an `id` to be provided for *every object within the sent data array for create and update requests*
  * Without such, a 409 will be returned
* Fixed some of the documentation for the bulk update endpoints for tasks and contacts

## 24 February 2017

* Added notification fields to activity\_serializer

## 23 February 2017

* Added `updated_at` as a filterable attribute on the LIST endpoint for all database backed Resources
* Added sorting by `donation_date` to Account Lists > Donations > LIST
* Added filtering by `donation_date` with a date range, on Account Lists > Donations > LIST

## 22 February 2017

* changed the account\_lists method in V2 controller to only filter when account\_list\_id is in list of permitted\_filters
* reordered the list of contact options returned by the /contacts/filter
* changed contact\_id filter to donor\_account\_id filter for donations endpoint
* fixed contact status and activity type filters to allow them to accept several params separated by comma
* account\_list analytics endpoint now accepts datetime range in proper iso8601 format
* account\_list endpoint now accepts notification\_preferences relationships
* Fixed bug with person endpoint that took place when a linkedin account relationship was provided

## 21 February 2017

* Accepts datetime range filters that match `YYYY-MM-DDThh:mm:ssZ..YYYY-MM-DDThh:mm:ssZ`
  * Use two periods `..` to denote an inclusive range
  * Use three periods `...` to denote an exclusive range
* Accepts date range filters that match `YYYY-MM-DD..YYYY-MM-DD`
  * Use two periods `..` to denote an inclusive range
  * Use three periods `...` to denote an exclusive range

## 20 February 2017

* Fixed sorting for cases when chained with filters
* Added account\_list\_id filter to contacts and people duplicates endpoints
* Added attributes to person\_serializer
* Removed html error pages from public folder
* Contact\_ids filter config is now returning contacts ordered by name and account\_list\_id is included with each.
* Added an endpoint for deleting a named tag from all tasks (`DELETE /tasks/tags/bulk`) @ardation
* Added an endpoint for deleting a named tag from all contacts (`DELETE /contacts/tags/bulk`) @ardation

## 17 February 2017

* Added a serializer for Organization
* Added a contact\_id filter to Donations endpoint
* Fixed assigning a person to a Task comment

## 15 February 2017

* Changed mail\_chimp\_accounts controller to mail\_chimp\_account
* Added documentation for create action of account\_lists#mail\_chimp\_account endpoint
* Attempted to fix the seeder\_application\_spec intermittent error

## 13 February 2017

* Nested Attributes with Included data can now be sent in POST/PATCH
* Activity Comments are now officially Comments

## 9 February 2017

* added an API changelog
* updated contributing.md to suggest contribution to changelog
