MPDX Developers
HomeHelp
Production
Production
  • Changelog
  • README
  • org_data_transfer
  • README
    • README
      • Account Lists
        • :Account List
        • Analytics
        • Chalkline Mail
        • Coaches
        • Designation Accounts
        • Donations
        • Donor Accounts
        • Entries
        • Financial Accounts
        • Imports
          • Csv
          • Google
          • Tnt
          • Tnt Data Sync
        • Invites
        • Mail Chimp Account
        • Merge
        • Notification Preferences
          • Bulk
        • Notifications
        • Pledges
        • Prayer Letters Account
        • Users
        • :account_list_id
          • Donations
        • :account_list_id
          • donations
            • Bulk
      • README
        • Impersonation
        • Organizations
        • Resets
      • Announcements
      • Appeals
        • Appeal Contacts
          • Bulk
        • Excluded Appeal Contacts
          • Bulk
      • Background Batches
      • Batch
      • Coaching
        • Answer Sets
        • Answers
        • Questions
      • Constants
      • Contacts
        • Addresses
        • Alma Mater Names
        • Analytics
        • Bulk
        • Church Names
        • Duplicates
        • README
        • Exports
          • Mailing
        • Filters
        • Merges
        • Partner Giving Analysis Filters
        • People
          • Bulk
          • Email Addresses
          • Facebook Accounts
          • Linkedin Accounts
          • Merges
          • Phones
          • Relationships
          • Twitter Accounts
          • Websites
        • Referrals
        • Referrers
        • Tags
          • Bulk
      • Deleted Records
      • Organizations
        • Account Lists
          • Account List Coaches
          • Account List Users
          • Invites
        • Admins
        • Contacts
        • Impersonation
        • Invites
      • Public
        • Designation Accounts
          • Subscriptions
      • README
        • Activity Results
        • Appointment Results
        • Donation Histories
        • Donation Monthly Totals
        • Donor Currency Donations
        • Entry Histories
        • Expected Monthly Totals
        • Goal Progress
        • Monthly Giving Graph
        • Monthly Losses Graphs
        • Partner Giving Analysis
        • People With Anniversaries
        • People With Birthdays
        • Pledge Histories
        • Salary Currency Donations
        • Tag Histories
        • Year Donations
      • Tasks
        • Analytics
        • Comments
        • Filters
        • Tags
      • README
        • Analytics
      • User
        • Account List Coaches
        • Announcements
        • Authenticate
        • Devices
        • Google Accounts
          • Google Integrations
        • Key Accounts
        • Notifications
        • Options
        • Organization Accounts
Powered by GitBook
On this page
  • People [BULK DELETE]
  • Request
  • Response
  • Fields
  • People [BULK POST]
  • Request
  • Response
  • Fields
  • People [BULK PUT]
  • Request
  • Response
  • Fields
  1. README
  2. README
  3. Contacts
  4. People

Bulk

Bulk Documentation

People [BULK DELETE]

People [BULK DELETE]

Request

Endpoint

DELETE /api/v2/contacts/people/bulk
Content-Type: application/vnd.api+json

Body

{
  "data": [
    {
      "data": {
        "type": "people",
        "id": "9de08d12-f053-4f07-8c06-c8701d1bdaa8"
      }
    },
    {
      "data": {
        "type": "people",
        "id": "07923bb1-a488-46f6-ab42-68073857acde"
      }
    }
  ]
}

Response

Headers

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

Body

[
  {
    "data": {
      "id": "9de08d12-f053-4f07-8c06-c8701d1bdaa8",
      "type": "people",
      "attributes": {
        "alma_mater": null,
        "anniversary_day": null,
        "anniversary_month": null,
        "anniversary_year": null,
        "avatar": "https://mpdx.org/images/avatar.png",
        "birthday_day": null,
        "birthday_month": null,
        "birthday_year": null,
        "created_at": "2022-01-12T17:18:13Z",
        "deceased": false,
        "employer": null,
        "first_name": "Frank",
        "gender": null,
        "last_name": "Schowalter",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "f9342a6a-f55c-42c5-8ce6-d12e5f8afdb2"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2022-01-12T17:18:13Z",
        "updated_in_db_at": "2022-01-12T17:18:13Z"
      },
      "relationships": {
        "email_addresses": {
          "data": [

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

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

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

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

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

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

          ]
        }
      }
    }
  },
  {
    "data": {
      "id": "07923bb1-a488-46f6-ab42-68073857acde",
      "type": "people",
      "attributes": {
        "alma_mater": null,
        "anniversary_day": null,
        "anniversary_month": null,
        "anniversary_year": null,
        "avatar": "https://mpdx.org/images/avatar.png",
        "birthday_day": null,
        "birthday_month": null,
        "birthday_year": null,
        "created_at": "2022-01-12T17:18:13Z",
        "deceased": false,
        "employer": null,
        "first_name": "Moriah",
        "gender": null,
        "last_name": "Fay",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "f9342a6a-f55c-42c5-8ce6-d12e5f8afdb2"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2022-01-12T17:18:13Z",
        "updated_in_db_at": "2022-01-12T17:18:13Z"
      },
      "relationships": {
        "email_addresses": {
          "data": [

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

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

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

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

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

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

          ]
        }
      }
    }
  }
]

Fields

data

Type [Person]

Description An array of People that have just been deleted

People [BULK POST]

an individual element of the data array

{
  "data": {
    "type": "people",
    "id": "1d6393dd-f3f4-49d3-9fd8-7e758b056b1f",
    "attributes": {
      "first_name": "Steve",
      "last_name": "Rogers",
      "more_attributes": "...etc"
    }
  }
}

For this bulk create endpoint, you are required to send an array of items within the data object. You are also required to send in a related Person. A Person cannot be created without a Contact.

  • Each member of the array must contain a client generated id to be used for the Person being created.

  • Each member of the array must contain a type that has the value of 'people'.

  • Each member of the array must have an attributes hash of values to be used for the Person being created.

Request

Endpoint

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

Body

{
  "data": [
    {
      "data": {
        "type": "people",
        "id": "93ea940a-f9c1-4a9e-bc15-b7563942213e",
        "attributes": {
          "first_name": "Hans",
          "last_name": "Jerde",
          "updated_in_db_at": "2022-01-12 17:18:13 UTC"
        },
        "relationships": {
          "contacts": {
            "data": [
              {
                "type": "contacts",
                "id": "fa94fcca-099d-4b1d-9540-96469f34213d"
              }
            ]
          }
        }
      }
    }
  ]
}

Response

Headers

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

Body

[
  {
    "data": {
      "id": "93ea940a-f9c1-4a9e-bc15-b7563942213e",
      "type": "people",
      "attributes": {
        "alma_mater": null,
        "anniversary_day": null,
        "anniversary_month": null,
        "anniversary_year": null,
        "avatar": "https://mpdx.org/images/avatar.png",
        "birthday_day": null,
        "birthday_month": null,
        "birthday_year": null,
        "created_at": "2022-01-12T17:18:13Z",
        "deceased": false,
        "employer": null,
        "first_name": "Hans",
        "gender": null,
        "last_name": "Jerde",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "fa94fcca-099d-4b1d-9540-96469f34213d"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2022-01-12T17:18:13Z",
        "updated_in_db_at": "2022-01-12T17:18:13Z"
      },
      "relationships": {
        "email_addresses": {
          "data": [

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

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

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

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

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

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

          ]
        }
      }
    }
  }
]

Fields

data

Type [Person / error]

Description Array of People objects that have been successfully created and of errors related to People objects that were not created successfully

People [BULK PUT]

People [BULK PUT]

Request

Endpoint

PUT /api/v2/contacts/people/bulk
Content-Type: application/vnd.api+json

Body

{
  "data": [
    {
      "data": {
        "type": "people",
        "id": "8f4ef842-e45d-42e7-80c7-a8af6cf24cb6",
        "attributes": {
          "first_name": "Maryanna",
          "last_name": "Bergnaum",
          "updated_in_db_at": "2022-01-12 17:18:13 UTC"
        }
      }
    }
  ]
}

Response

Headers

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

Body

[
  {
    "data": {
      "id": "8f4ef842-e45d-42e7-80c7-a8af6cf24cb6",
      "type": "people",
      "attributes": {
        "alma_mater": null,
        "anniversary_day": null,
        "anniversary_month": null,
        "anniversary_year": null,
        "avatar": "https://mpdx.org/images/avatar.png",
        "birthday_day": null,
        "birthday_month": null,
        "birthday_year": null,
        "created_at": "2022-01-12T17:18:13Z",
        "deceased": false,
        "employer": null,
        "first_name": "Maryanna",
        "gender": null,
        "last_name": "Bergnaum",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "77d64952-0cd6-4cdf-89a8-990e549cc0fc"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2022-01-12T17:18:13Z",
        "updated_in_db_at": "2022-01-12T17:18:13Z"
      },
      "relationships": {
        "email_addresses": {
          "data": [

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

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

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

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

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

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

          ]
        }
      }
    }
  }
]

Fields

data

Type [Person / error]

Description Array of People objects that have been successfully created and of errors related to People objects that were not created successfully

PreviousPeopleNextEmail Addresses

Last updated 3 years ago