Search for pledges

POST /pledge/search/{fromthisid}

Filtered by the posted fields. Returned in ID order

Path parameters

  • fromthisid integer Required

    The ID that is previous to the one to start from e.g. if IDs are 1,2,3 fromthisid as 1 will return 2,3

application/json

Body

1 or more Search parameters

  • search array[object]
    Hide search attributes Show search attributes object
    • by string

      any of the field names that are output from item or list calls

    • value string

      the search value for the term specified by the 'by'

Responses

  • 200 application/json

    List returned OK

    Hide response attributes Show response attributes object
    • id integer

      Minimum value is 1.

    • user_id integer

      CORE user id

    • status string

      Current state of the pledge

      Values are active or closed.

    • form_entry_id integer

      It this is related to a form entry, then this is the form entry ID

    • datetime_created_utc string

      The date/time in UTC that this pledge was created

    • payment_method_id integer

      Links to the Payment Method

    • payment_token string

      If a token is available then the word hidden is returned

    • card_expiry_date string

      The date the card expires

    • amount number

      The amount of each pledge that will be processed. i.e. not the total amount of the pledge

    • frequency_type string

      The type of frequency for this pledge. one is One off. Combine with frequency_count

      Values are one, week, month, or year.

    • frequency_count integer

      The number of times the frequency_type occurs before the next date is identified in the series of pledges e.g. 4 weeks means the pledge is paid every 4 weeks | 1 is available for type one,week,month,year 2 is available for type week 3 is available for type month 4 is available for type week 6 is available for type month

      Values are 1, 2, 4, 3, or 6.

    • start_date_local string

      The first date of the pledge in local time

    • last_payment_date_local string

      Optional. The date pledges after which, they should not be processed. If blank, it will auto extend giving 3 years of dates

    • finance_tags_category_1 integer

      If supplied, must link with a FinanceTagCategory id and have a finance_tags_item_1

    • finance_tags_item_1 integer

      If supplied, must link with a FinanceTagItem id and have a finance_tags_category_1

    • finance_tags_category_2 integer

      If supplied, must link with a FinanceTagCategory id and have a finance_tags_item_2

    • finance_tags_item_2 integer

      If supplied, must link with a FinanceTagItem id and have a finance_tags_category_2

    • accountcode_id integer

      Required. Must link to an Accountcode that the user is able to see.

    • campaign_id integer

      If supplied, must link to a Campaign the user can see

    • note string

      If supplied, is the note for this pledge

    • pledge_drive_id integer

      If supplied must link to a valid PledgeDrive

    • gateway_fees number

      If the payment gateway has a fee structure, this is the amount of fees that are part of this pledge

  • 401 application/json

    Authentication unauthorised

    Hide response attribute Show response attribute object
    • error string
  • 403 application/json

    Invalid permission

    Hide response attribute Show response attribute object
    • error string
POST /pledge/search/{fromthisid}
curl \
 --request POST 'https://YOURSITE.infoodle.com/apiv2/pledge/search/4' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"search":[{"by":"name","value":"Test Item"}]}'
Request examples
{
  "search": [
    {
      "by": "name",
      "value": "Test Item"
    }
  ]
}
Response examples (200)
[
  {
    "id": 123,
    "user_id": 569,
    "status": "active",
    "form_entry_id": 76,
    "datetime_created_utc": "2017-07-18 23:15:10",
    "payment_method_id": 5,
    "payment_token": "\\*\\* hidden \\*\\*",
    "card_expiry_date": "2028-01-31",
    "amount": 30,
    "frequency_type": "month",
    "frequency_count": 6,
    "start_date_local": "2017-07-18",
    "last_payment_date_local": "2019-07-18",
    "finance_tags_category_1": 5,
    "finance_tags_item_1": 91,
    "finance_tags_category_2": 10,
    "finance_tags_item_2": 14,
    "accountcode_id": 43,
    "campaign_id": 43,
    "note": "The donor requested a change of timing for this pledge",
    "pledge_drive_id": 3,
    "gateway_fees": 0.43
  }
]
Response examples (401)
{
  "error": "Unauthorised"
}
Response examples (403)
{
  "error": "Invalid Permission"
}