Pledges
This document lays out the specification of interacting with the Qgiv Pledges system, allowing for reading, writing, and updating pledges.
Dedication Fields Properties
- id (int)
- title (string)
- restrictionContent (string)
- value (double)
- (int)
- dateBegin (date)
- iterations (int)
- (int)
- sort (int)
GET : https://secure.qgiv.com/admin/api/pledges/list
Returns all pledges associated with the current form or organization
<pledges>
<pledge id="1338">
<frequencyUnit>month</frequencyUnit>
<restrictionContent>Where the need is the greatest</restrictionContent>
<title>Monthly pledge</title>
<value>34.00</value>
<frequencyCount>3</frequencyCount>
<dateBegin>2012-03-28</dateBegin>
<iterations>8</iterations>
<sort>0</sort>
<state>0</state>
</pledge>
</pledges>{
"pledges":[
{
"id":"1338",
"frequencyUnit":"month",
"restrictionContent":"Where the need is the greatest",
"title":"Monthly pledge",
"value":"34.00",
"frequencyCount":"3",
"dateBegin":"2012-03-28",
"iterations":"8",
"sort":"0",
"state":"1"
}
...
]
}GET : https://secure.qgiv.com/admin/api/pledges/[id]
Returns the pledge requested, individually specified by ID
<pledges>
<pledge id="195">
<restrictionContent>Where the need is greatest</restrictionContent>
<title>Gold membership</title>
<value>500.00</value>
<frequencyCount>3</frequencyCount>
<frequencyUnit>month</frequencyUnit>
<dateBegin>1984-07-01</dateBegin>
<iterations>6</iterations>
<sort>3</sort>
<state>
1
</state>
</pledge>
</pledges>{
"pledge":{
"id":"1338",
"frequencyUnit":"month",
"restrictionContent":"Where the need is the greatest",
"title":"Monthly pledge",
"value":"34.00",
"frequencyCount":"3",
"dateBegin":"2012-03-28",
"iterations":"8",
"sort":"0",
"state":"1"
}
}POST : https://secure.qgiv.com/admin/api/pledges/create
Creates one or more pledges with the values passed in, returning the complete pledges with the new ID
<pledges>
<pledge>
<frequencyUnit>month</frequencyUnit>
<restrictionContent>Where the need is the greatest</restrictionContent>
<title>Monthly pledge</title>
<value>34.00</value>
<frequencyCount>3</frequencyCount>
<dateBegin>2012-03-28</dateBegin>
<iterations>8</iterations>
<sort>0</sort>
<state>0</state>
</pledge>
</pledges>{
"pledges":[
{
"frequencyUnit":"month",
"restrictionContent":"Where the need is the greatest",
"title":"Monthly pledge",
"value":"34.00",
"frequencyCount":"3",
"dateBegin":"2012-03-28",
"iterations":"8",
"sort":"0",
"state":"1"
}
...
]
}Output
<pledges>
<pledge id="1338">
<frequencyUnit>month</frequencyUnit>
<restrictionContent>Where the need is the greatest</restrictionContent>
<title>Monthly pledge</title>
<value>34.00</value>
<frequencyCount>3</frequencyCount>
<dateBegin>2012-03-28</dateBegin>
<iterations>8</iterations>
<sort>0</sort>
<state>0</state>
</pledge>
</pledges>{
"pledges":[
{
"id":"1338",
"frequencyUnit":"month",
"restrictionContent":"Where the need is the greatest",
"title":"Monthly pledge",
"value":"34.00",
"frequencyCount":"3",
"dateBegin":"2012-03-28",
"iterations":"8",
"sort":"0",
"state":"1"
}
...
]
}POST : https://secure.qgiv.com/admin/api/pledges/[ID]
Updates one or more pledges with the values passed in, returning the complete pledges.
<pledges>
<pledge id=1338>
<frequencyUnit>year</frequencyUnit>
<value>14.00</value>
</pledge>
</pledges>{
"pledge":{
"id":"1338",
"frequencyUnit":"year",
"value":"14.00",
}
}Output
<pledges>
<pledge id="1338">
<frequencyUnit>year</frequencyUnit>
<restrictionContent>Where the need is the greatest</restrictionContent>
<title>Monthly pledge</title>
<value>14.00</value>
<frequencyCount>3</frequencyCount>
<dateBegin>2012-03-28</dateBegin>
<iterations>8</iterations>
<sort>0</sort>
<state>0</state>
</pledge>
</pledges>{
"pledges":[
{
"id":"1338",
"frequencyUnit":"year",
"restrictionContent":"Where the need is the greatest",
"title":"Monthly pledge",
"value":"14.00",
"frequencyCount":"3",
"dateBegin":"2012-03-28",
"iterations":"8",
"sort":"0",
"state":"1"
}
...
]
}* denotes a required field
** denotes a required field based on Event settings
*** denotes a field that is only required when submitting Form level API credentials