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": "88b99495-3c24-4899-a99e-5b361ade3be4"
      }
    },
    {
      "data": {
        "type": "people",
        "id": "f21cdbcd-8d79-4e11-b415-b74dafe63fca"
      }
    }
  ]
}

Response

Headers

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

Body

[
  {
    "data": {
      "id": "88b99495-3c24-4899-a99e-5b361ade3be4",
      "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": "2021-11-23T14:38:07Z",
        "deceased": false,
        "employer": null,
        "first_name": "Marsha",
        "gender": null,
        "last_name": "Padberg",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "937dc50c-3680-48c2-9184-6bef17461a1f"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2021-11-23T14:38:07Z",
        "updated_in_db_at": "2021-11-23T14:38:07Z"
      },
      "relationships": {
        "email_addresses": {
          "data": [

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

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

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

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

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

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

          ]
        }
      }
    }
  },
  {
    "data": {
      "id": "f21cdbcd-8d79-4e11-b415-b74dafe63fca",
      "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": "2021-11-23T14:38:07Z",
        "deceased": false,
        "employer": null,
        "first_name": "Jaimie",
        "gender": null,
        "last_name": "Leannon",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "937dc50c-3680-48c2-9184-6bef17461a1f"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2021-11-23T14:38:07Z",
        "updated_in_db_at": "2021-11-23T14:38:07Z"
      },
      "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": "5fb12377-85f4-4bbb-a286-8ae3f0b3c4f9",
        "attributes": {
          "first_name": "Lucius",
          "last_name": "D'Amore",
          "updated_in_db_at": "2021-11-23 14:38:07 UTC"
        },
        "relationships": {
          "contacts": {
            "data": [
              {
                "type": "contacts",
                "id": "06a919d8-5cc4-40c4-9e8b-cac1c835d7c9"
              }
            ]
          }
        }
      }
    }
  ]
}

Response

Headers

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

Body

[
  {
    "data": {
      "id": "5fb12377-85f4-4bbb-a286-8ae3f0b3c4f9",
      "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": "2021-11-23T14:38:07Z",
        "deceased": false,
        "employer": null,
        "first_name": "Lucius",
        "gender": null,
        "last_name": "D'Amore",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "06a919d8-5cc4-40c4-9e8b-cac1c835d7c9"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2021-11-23T14:38:07Z",
        "updated_in_db_at": "2021-11-23T14:38:07Z"
      },
      "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": "6a3d093d-e0a6-488c-a986-4c937075e1f9",
        "attributes": {
          "first_name": "Felisa",
          "last_name": "Ritchie",
          "updated_in_db_at": "2021-11-23 14:38:07 UTC"
        }
      }
    }
  ]
}

Response

Headers

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

Body

[
  {
    "data": {
      "id": "6a3d093d-e0a6-488c-a986-4c937075e1f9",
      "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": "2021-11-23T14:38:07Z",
        "deceased": false,
        "employer": null,
        "first_name": "Felisa",
        "gender": null,
        "last_name": "Ritchie",
        "legal_first_name": null,
        "marital_status": null,
        "middle_name": null,
        "occupation": null,
        "optout_enewsletter": false,
        "parent_contacts": [
          "800b0d49-10b7-4c60-9f94-0dc97a2836d7"
        ],
        "suffix": null,
        "title": null,
        "updated_at": "2021-11-23T14:38:07Z",
        "updated_in_db_at": "2021-11-23T14:38:07Z"
      },
      "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

Last updated