Path parameters
-
Which item to be processed
Minimum value is
0
.
Body Required
Specify one or more fields and their new values to change it
-
user_id integer
CORE user id
-
status string
Current state of the pledge
Values are
active
orclosed
. -
form_entry_id integer
It this is related to a form entry, then this is the form entry ID
-
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
, oryear
. -
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
, or6
. -
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
-
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
curl \
-X PATCH https://YOURSITE.infoodle.com/apiv2/pledge/99 \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_id":569,"status":"active","form_entry_id":76,"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}'
{
"user_id": 569,
"status": "active",
"form_entry_id": 76,
"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
}
{
"id": 4325342
}
{
"error": "Unauthorised"
}
{
"error": "Invalid Permission"
}
{
"error": "Not Found"
}