Get a specific pledge

GET /pledge/{id}

Return a specific pledge that the user is able to see.

Path parameters

  • id integer Required

    Which item to be processed

    Minimum value is 0.

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.

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

    • The date/time in UTC that this pledge was created

    • Links to the Payment Method

    • If a token is available then the word hidden is returned

    • 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

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

      Values are one, week, month, or year.

    • 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.

    • The first date of the pledge in local time

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

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

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

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

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

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

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

    • note string

      If supplied, is the note for this pledge

    • If supplied must link to a valid PledgeDrive

    • 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
  • 403 application/json

    Invalid permission

    Hide response attribute Show response attribute object
  • 404 application/json

    Not Found

    Hide response attribute Show response attribute object
GET /pledge/{id}
curl \
 -X GET https://YOURSITE.infoodle.com/apiv2/pledge/99 \
 -H "Authorization: Bearer $ACCESS_TOKEN"
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"
}
Response examples (404)
{
  "error": "Not Found"
}