Import Additional Metadata

posthttps://app.kindful.com/admin/oauth2/api/v1/imports/


The Kindful API allows you to import additional custom metadata for the following import types:

  • Contact
  • Contact with Pledge
  • Contact with Soft Credit
  • Contact with Transaction

* Please note, custom metadata is only visible in the UI for the Contact modal. The data can be viewed at /admin/contacts/{contact_id}/profile > External Info under "Services Import Extra Data".



Contact:


COPY
// Declare "contact_metadata" with an array of custom keys.
// Include key/value pairs in the data array.

{
  "data_format": "contact",
  "action_type":"update",
  "data_type":"json",
  "contact_metadata": ["myKey1", "myKey2"],
  "data":
  [
    {
      "id":"id_022342199",
      "first_name": "Rick",
      "last_name": "Anderson",
      "email": "ricky@email.co",
      "created_at": "2020-07-31 18:56:12 UTC",
      "updated_at": "2020-07-31 18:56:12 UTC",

      "myKey1": "myValue1",
      "myKey2": "myValue2"
    }
  ]
}

Contact with Pledge:


COPY
// Declare "pledge_metadata" with an array of custom keys.
// Include key/value pairs in the data array.

{
  "data_format": "contact_with_pledge",
  "action_type":"update",
  "data_type":"json",
  "contact_metadata": ["myContactKey"],
  "pledge_metadata": ["myPledgeKey"],
  "data":
  [
    {
      "id":"id_022342199",
      "first_name": "Rick",
      "last_name": "Anderson",
      "email": "ricky@email.co",
      "created_at": "2020-07-31 18:56:12 UTC",
      "updated_at": "2020-07-31 18:56:12 UTC",
      "pledge_id": "1",
      "pledge_time": "2020-07-31 18:56:12 UTC",
      "pledge_updated_at": "2020-07-31 18:56:12 UTC",
      "amount_in_cents": "3000",
      "pledge_note": "this is a note",

      "myContactKey": "myContactValue",
      "myPledgeKey": "myPledgeValue"
    }
  ]
}

Contact with Soft Credit:


COPY
// Declare "soft_credit_metadata" with an array of custom keys.
// Include key/value pairs in the data array.

{
  "data_format": "contact_with_soft_credit",
  "action_type":"update",
  "data_type":"json",
  "contact_metadata": ["myContactKey"],
  "soft_credit_metadata": ["mySoftCreditKey"],
  "data":
  [
    {
      "id":"id_022342199",
      "first_name": "Rick",
      "last_name": "Anderson",
      "email": "ricky@email.co",
      "created_at": "2020-07-31 18:56:12 UTC",
      "updated_at": "2020-07-31 18:56:12 UTC",
      "soft_credit_id": "1",
      "amount_in_cents": "500",
      "currency": "USD",
      "soft_credit_time": "2020-07-31 18:56:12 UTC",
      "soft_credit_updated_at": "2020-07-31 18:56:12 UTC",
      "soft_credit_note": "yolo",

      "myContactKey": "myContactValue",
      "mySoftCreditKey": "mySoftCreditValue"
    }
  ]
}

Contact with Transaction:


COPY
// Declare "transaction_metadata" with an array of custom keys.
// Include key/value pairs in the data array.

{
  "data_format": "contact_with_transaction",
  "action_type":"update",
  "data_type":"json",
  "contact_metadata": ["myContactKey"],
  "transaction_metadata": ["myTransactionKey"],
  "data":
  [
    {
      "id":"id_022342199",
      "first_name": "Rick",
      "last_name": "Anderson",
      "email": "ricky@email.co",
      "created_at": "2020-07-31 18:56:12 UTC",
      "updated_at": "2020-07-31 18:56:12 UTC",
      "transaction_id": "987654",
      "amount_in_cents": "5000",
      "currency": "usd",
      "transaction_time": "2020-07-31 18:56:12 UTC",

      "myContactKey": "myContactValue",
      "myTransactionKey": "myTransactionValue"
    }
  ]
}