Merges

Merges Documentation

Merge [POST]

Merge [POST]

Request

Endpoint

POST /api/v2/contacts/merges
Content-Type: application/vnd.api+json

Body

{
  "data": {
    "type": "merges",
    "attributes": {
    },
    "relationships": {
      "loser": {
        "data": {
          "type": "contacts",
          "id": "6b0be24e-4d5d-42d1-ab78-b0ec0bd434c5"
        }
      },
      "winner": {
        "data": {
          "type": "contacts",
          "id": "a4fcb0cb-5d70-4f4c-839c-f18766e6a63d"
        }
      }
    }
  }
}

Parameters

Relationships

loser.data

Type Contact

Description contact to merge

Required No

winner.data

Type Contact

Description contact to keep

Required No

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

{
  "data": {
    "id": "a4fcb0cb-5d70-4f4c-839c-f18766e6a63d",
    "type": "contacts",
    "attributes": {
      "avatar": "https://mpdx.org/images/avatar.png",
      "church_name": null,
      "created_at": "2022-01-12T17:18:46Z",
      "deceased": false,
      "direct_deposit": false,
      "envelope_greeting": "John Doe",
      "greeting": "",
      "last_activity": null,
      "last_appointment": null,
      "last_donation": null,
      "last_letter": null,
      "last_phone_call": null,
      "last_pre_call": null,
      "last_thank": null,
      "late_at": "2022-01-08",
      "likely_to_give": null,
      "locale": "en",
      "magazine": false,
      "missionary_pages_banner": false,
      "name": "Doe, John",
      "next_ask": null,
      "no_appeals": null,
      "no_gift_aid": null,
      "notes": "Test Note.\nTest Note.",
      "notes_saved_at": "2022-01-12T17:18:46Z",
      "pledge_amount": "100.0",
      "pledge_currency": "USD",
      "pledge_currency_symbol": "$",
      "pledge_frequency": "1",
      "pledge_received": false,
      "pledge_start_date": "2021-12-08",
      "preferred_contact_method": null,
      "relationship_code": null,
      "send_newsletter": null,
      "source": "MPDX",
      "square_avatar": "https://mpdx.org/images/avatar.png",
      "starred_at": null,
      "status": "Partner - Financial",
      "status_valid": null,
      "suggested_changes": {
      },
      "tag_list": [

      ],
      "timezone": null,
      "uncompleted_tasks_count": 0,
      "updated_at": "2022-01-12T17:18:46Z",
      "updated_in_db_at": "2022-01-12T17:18:46Z",
      "website": "http://raynor.biz/fred_koepp"
    },
    "relationships": {
      "account_list": {
        "data": {
          "id": "2b592f22-05bc-43c3-b9d5-5dc485d08d49",
          "type": "account_lists"
        }
      },
      "user": {
        "data": null
      },
      "addresses": {
        "data": [

        ]
      },
      "appeal_contacts": {
        "data": [

        ]
      },
      "appeals": {
        "data": [

        ]
      },
      "contact_referrals_by_me": {
        "data": [

        ]
      },
      "contact_referrals_to_me": {
        "data": [

        ]
      },
      "contacts_referred_by_me": {
        "data": [

        ]
      },
      "contacts_that_referred_me": {
        "data": [

        ]
      },
      "donor_accounts": {
        "data": [

        ]
      },
      "excluded_appeal_contacts": {
        "data": [

        ]
      },
      "last_six_donations": {
        "data": [

        ]
      },
      "people": {
        "data": [

        ]
      },
      "pledges": {
        "data": [

        ]
      },
      "tasks": {
        "data": [

        ]
      },
      "primary_person": {
        "data": null
      },
      "primary_or_first_person": {
        "data": {
          "type": "people"
        }
      },
      "spouse": {
        "data": null
      }
    }
  }
}

Fields

Attributes

avatar

Type string

Description The avatar url of the Contact

church_name

Type string

Description The name of the Church for this Contact

created_at

Type date

Description The timestamp of when this resource was created

deceased

Type boolean

Description Whether or not the Contact is deceased

direct_deposit

Type boolean

Description If the contact is setup for direct deposit

envelope_greeting

Type string

Description The greeting for this Contact for use on an envelope

greeting

Type string

Description The greeting for this contact

last_activity

Type string

Description The date of the last activity for the Contact

last_appointment

Type string

Description The date of the last appointment for the Contact

last_donation

Type string

Description The date of the last donation for the Contact

last_letter

Type string

Description The date of the last letter for the Contact

last_phone_call

Type string

Description The date of the last phone call for the Contact

last_pre_call

Type string

Description The date of the last pre-phone call for the Contact

last_thank

Type string

Description The date of the last thank you for the Contact

late_at

Type string

Description The date at which the contact started being late on payments

likely_to_give

Type boolean

Description Whether or not the Contact is likely to give

locale

Type string

Description The locale of the Contact

magazine

Type booelan

Description Whether or not the Contact receives a magazine

missionary_pages_banner

Type boolean

Description if front end should show banner or not

name

Type string

Description The name of the Contact

next_ask

Type string

Description The date of the next ask for the Contact

no_appeals

Type boolean

Description Whether or not the Contact has no appeals

no_gift_aid

Type boolean

Description Whether or not the Contact is eligible for Gift Aid (UK government subsidies)

notes

Type string

Description Notes for this contact

notes_saved_at

Type string

Description the datetime of when the notes for this Contact were last saved

pledge_amount

Type float

Description The amount that the Contact has pledged

pledge_currency

Type string

Description The currency format for the Contact's pledge

pledge_currency_symbol

Type string

Description The symbol that represents the currency format for the Contact's pledge

pledge_frequency

Type float

Description The requency in which the Contact pledges

pledge_received

Type boolean

Description Whether or not a pledge has been received for this Contact

pledge_start_date

Type string

Description Date in which the Contact's pledge starts

preferred_contact_method

Type string

Description Method of contact that a Contact prefers ie 'Phone Call' or 'SMS'

relationship_code

Type string

Description The remote system relationship code to match with

send_newsletter

Type string

Description The type of newsletter to be sent to this Contact. Physical, Email, or Both

source

Type string

Description string that describes where the contact information came from

square_avatar

Type string

Description A url for the Contact's avatar - but in a square format

starred_at

Type datetime

Description Indicates is the user has starred the contact

status

Type string

Description The partner status of the Contact

status_valid

Type boolean

Description Whether or not the Contact's status is valid

suggested_changes

Type string

Description thing

tag_list

Type [string]

Description A list of tags

timezone

Type string

Description The Contact's timezone

uncompleted_tasks_count

Type number

Description The number of uncompleted tasks for this Contact

updated_at

Type date

Description The timestamp of when this resource was last updated

updated_in_db_at

Type date

Description This is to be used as a reference for the last time the resource was updated in the remote database - specifically for when data is updated while the client is offline.

website

Type string

Description The website of the Contact

Relationships

account_list.data

Type Account List

Description The account list that this Contact belongs to

addresses.data

Type [Address]

Description An array of Address references for the Contact

appeal_contacts.data

Type [AppealContact]

Description An array of Contact and Appeal many-to-many join records

appeals.data

Type [Appeal]

Description An array of Appeal references for the Contact

contact_referrals_by_me.data

Type [Contact Referral]

Description An array of Contact Referrals references the Contacts that were referred by the current Contact

contact_referrals_to_me.data

Type [Contact Referral]

Description An array of Contact Referrals references the Contacts that referred the current Contact

contacts_referred_by_me.data

Type [Contact]

Description An array of referred Contact references for the Contact

contacts_that_referred_me.data

Type [Contact]

Description An array of Contact referral references for the Contact

donor_accounts.data

Type [Donor Account]

Description An array of Donor Account references for the Contact

excluded_appeal_contacts.data

Type [AppealContact]

Description An array of Contact and Appeal (excluded) many-to-many join records

last_six_donations.data

Type [Donation]

Description An array of the last six Donation references for the Contact

people.data

Type [Person]

Description An array of People references for the Contact

pledges.data

Type [Pledge]

Description An array of Pledges contact has made to appeals

primary_or_first_person.data

Type Person

Description The primary person, if none set then the first person

primary_person.data

Type Person

Description The primary person

spouse.data

Type Person

Description The spouse of the primary person

tasks.data

Type [Tasks]

Description An array of Tasks references for the Contact

user.data

Type User

Description The user assigned to this contact

Merges [BULK POST]

Bulk merge Contacts with the given IDs

Request

Endpoint

POST /api/v2/contacts/merges/bulk
Content-Type: application/vnd.api+json

Body

{
  "data": [
    {
      "data": {
        "attributes": {
          "winner_id": "a9906f91-b069-4e04-95d7-f06f5ff7aad7",
          "loser_id": "b5c92e13-e8e9-4784-ae36-f03eb9bca469"
        }
      }
    }
  ]
}

Response

Headers

Content-Type: application/vnd.api+json; charset=utf-8
200 OK

Body

[
  {
    "data": {
      "id": "a9906f91-b069-4e04-95d7-f06f5ff7aad7",
      "type": "contacts",
      "attributes": {
        "avatar": "https://mpdx.org/images/avatar.png",
        "church_name": null,
        "created_at": "2022-01-12T17:17:57Z",
        "deceased": false,
        "direct_deposit": false,
        "envelope_greeting": "Royce O'Connell",
        "greeting": "",
        "last_activity": null,
        "last_appointment": null,
        "last_donation": null,
        "last_letter": null,
        "last_phone_call": null,
        "last_pre_call": null,
        "last_thank": null,
        "late_at": "2022-01-08",
        "likely_to_give": null,
        "locale": "en",
        "magazine": false,
        "missionary_pages_banner": false,
        "name": "O'Connell, Royce",
        "next_ask": null,
        "no_appeals": null,
        "no_gift_aid": null,
        "notes": "Test Note.\nTest Note.",
        "notes_saved_at": "2022-01-12T17:17:57Z",
        "pledge_amount": "100.0",
        "pledge_currency": "USD",
        "pledge_currency_symbol": "$",
        "pledge_frequency": "1",
        "pledge_received": false,
        "pledge_start_date": "2021-12-08",
        "preferred_contact_method": null,
        "relationship_code": null,
        "send_newsletter": null,
        "source": "MPDX",
        "square_avatar": "https://mpdx.org/images/avatar.png",
        "starred_at": null,
        "status": "Partner - Financial",
        "status_valid": null,
        "suggested_changes": {
        },
        "tag_list": [

        ],
        "timezone": null,
        "uncompleted_tasks_count": 0,
        "updated_at": "2022-01-12T17:17:57Z",
        "updated_in_db_at": "2022-01-12T17:17:57Z",
        "website": "http://dooley.io/leslie"
      },
      "relationships": {
        "account_list": {
          "data": {
            "id": "8b3bad5b-4f63-4024-b1b4-f98342a7e52e",
            "type": "account_lists"
          }
        },
        "user": {
          "data": null
        },
        "addresses": {
          "data": [

          ]
        },
        "appeal_contacts": {
          "data": [

          ]
        },
        "appeals": {
          "data": [

          ]
        },
        "contact_referrals_by_me": {
          "data": [

          ]
        },
        "contact_referrals_to_me": {
          "data": [

          ]
        },
        "contacts_referred_by_me": {
          "data": [

          ]
        },
        "contacts_that_referred_me": {
          "data": [

          ]
        },
        "donor_accounts": {
          "data": [

          ]
        },
        "excluded_appeal_contacts": {
          "data": [

          ]
        },
        "last_six_donations": {
          "data": [

          ]
        },
        "people": {
          "data": [

          ]
        },
        "pledges": {
          "data": [

          ]
        },
        "tasks": {
          "data": [

          ]
        },
        "primary_person": {
          "data": null
        },
        "primary_or_first_person": {
          "data": {
            "type": "people"
          }
        },
        "spouse": {
          "data": null
        }
      }
    }
  }
]

Last updated