Funds
A fund or collection of funds are used for contributions
.
Notes ::
- By passing in the
content-type
ofapplication/help
in theaccept
header or using the {format} parameterhelp
from https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds, the API will return an html representation of the help documents for this resource (*authentication not required*)
Authentication
This method requires Authentication
Resource Structure
This resource conforms to the following XSD
Methods
Funds ::
- search [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/search?lastupdateddate=2015-06-05
- list [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds
- show [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}
- new [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/new
- edit [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}/edit
- create [POST] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds
- update [PUT] [POST(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}
Method: search [GET]
The search
keyword will return a collection of funds
for the parameters
provided.
Notes ::
- Search by lastupdatedDate: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/search?lastupdateddate=2015-06-01&include=subfunds,pledgedrives
- lastupdatedDate = will return all records where the last update date is greater than or equal to the parameter passed to the API. The results will also be sorted by the lastUpdatedDate in ascending order.
- By passing in the
content-type
ofapplication/xsd
in theaccept
header or using the {format} parameterxsd
the API will return anxsd
for a single version of this resource (authentication not required) - If the
recordsPerPage
parameter is not used or its value is less than 1, the API will default the parameter to 20 - If the
recordsPerPage
parameter's value is less than 10, the API will default the parameter to 10 - If the
page
parameter is not used or its value is less than 1, the API will default the parameter to 1
Content-types ::
- application/json
- application/xml
- application/xsd
- application/help
Format ::
- json
- xml
- xsd
- help
Parameters ::
- {format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/search.{format}?{parameters}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/search?format={format}&{parameters}
- [Header] Accept : {Content-type}
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/search?lastupdateddate=2015-06-01
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 16:32:44 GMT
Content-Length: 19465
<?xml version="1.0" encoding="utf-8"?>
<funds count="20" pageNumber="1" totalRecords="5307" additionalPages="265">
<fund json:Array="true" id="28929" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929" oldID="">
<name>asdfasdf</name>
<subFunds>
<subFundId id="3696" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929/subfunds/3696" />
</subFunds>
<pledgeDrives>
<pledgeDriveId id="114" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/pledgedrives/114" />
</pledgeDrives>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate>2015-06-27T11:41:23</lastUpdatedDate>
<lastUpdatedByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
</fund>
<fund json:Array="true" id="4787" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/4787" oldID="">
<name>Bible Study Classes</name>
<subFunds>
<subFundId id="2794" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/4787/subfunds/2794" />
</subFunds>
<pledgeDrives>
<pledgeDriveId id="112" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/pledgedrives/112" />
</pledgeDrives>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>true</isWebEnabled>
<accountReference id="131" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/accountReference/131" />
<isActive>True</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate>2015-06-27T11:41:23</lastUpdatedDate>
<lastUpdatedByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
</fund>
...
</funds>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/search?lastupdateddate=2015-06-01.json
Response:
{
"funds":{
"@count":"20",
"@pageNumber":"1",
"@totalRecords":"5307",
"@additionalPages":"265",
"fund":[
{
"@array":"true",
"@id":"12462",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/12462",
"@oldID":"",
"name":"Brotherhood",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"true",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"true",
"createdDate": "2010-05-03T11:13:50",
"createdByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"2015-06-27T11:41:23",
"lastUpdatedByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
}
},
{
"@array":"true",
"@id":"4895",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/4895",
"@oldID":"",
"name":"Building Campaign",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate": "2010-05-03T11:13:50",
"createdByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"2015-06-27T11:41:23",
"lastUpdatedByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
}
},
...
]}}
Method: list [GET]
The list
method will return a list of funds.
Notes ::
- By passing the con
Content-types ::
- application/json
- application/xml
- application/xsd
- application/help
Format ::
- json
- xml
- xsd
- help
Parameters ::
- {format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds?format={format}
- [Header] Accept : {Content-type}
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 16:32:44 GMT
Content-Length: 19465
<?xml version="1.0" encoding="utf-8"?>
<funds>
<fund json:Array="true" id="28929" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929" oldID="">
<name>asdfasdf</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate>2010-05-27T11:41:23</lastUpdatedDate>
<lastUpdatedByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
</fund>
<fund json:Array="true" id="4787" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/4787" oldID="">
<name>Bible Study Classes</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>true</isWebEnabled>
<accountReference id="131" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/accountReference/131" />
<isActive>True</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate>2010-05-27T11:41:23</lastUpdatedDate>
<lastUpdatedByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
</fund>
...
</funds>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds.json
Response:
{
"funds":{
"fund":[
{
"@array":"true",
"@id":"12462",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/12462",
"@oldID":"",
"name":"Brotherhood",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"true",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"true",
"createdDate": "2010-05-03T11:13:50",
"createdByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"2010-05-27T11:41:23",
"lastUpdatedByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
}
},
{
"@array":"true",
"@id":"4895",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/4895",
"@oldID":"",
"name":"Building Campaign",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate": "2010-05-03T11:13:50",
"createdByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"2010-05-27T11:41:23",
"lastUpdatedByPerson": {
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
}
},
...
]}}
Method: show [GET]
The show
method will return a single fund
for a given id
.
Notes ::
- By passing in the
content-type
ofapplication/xsd
in theaccept
header or using the {format} parameterxsd
the API will return anxsd
for a single version of this resource (authentication not required)
Content-types ::
- application/json
- application/xml
- application/xsd
- application/help
Format ::
- json
- xml
- xsd
- help
Parameters ::
- {format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}?format={format}
- [Header] Accept : {Content-type}
- {id}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 18:35:04 GMT
Content-Length: 537
<?xml version="1.0" encoding="utf-8"?>
<fund id="28929" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929" oldID="">
<name>asdfasdf</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate>2010-05-27T11:41:23</lastUpdatedDate>
<lastUpdatedByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
</fund>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929.json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 18:37:05 GMT
Content-Length: 411
{
"fund":{
"@id":"28929",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929",
"@oldID":"",
"name":"Test Fund",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate":"2010-05-03T11:13:50",
"createdByPerson":{
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"2010-05-27T11:41:23",
"lastUpdatedByPerson":{
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
}
}
}
Method: edit [GET]
The edit
method will return a single fund for a given id
. The purpose of the edit
method is to retrieve a resource in its most recent condition with its latest values.
Content-types ::
- application/json
- application/xml
- application/help
Format ::
- json
- xml
- help
Parameters ::
- {format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}/edit.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}/edit?format={format}
- [Header] Accept : {Content-type}
- {id}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}/edit
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1funds/28929/edit
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 18:40:41 GMT
Content-Length: 537
<?xml version="1.0" encoding="utf-8"?>
<fund id="28929" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929" oldID="">
<name>asdfasdf</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate>2010-05-27T11:41:23</lastUpdatedDate>
<lastUpdatedByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
</fund>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1funds/28929/edit?json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 18:44:59 GMT
Content-Length: 411
{
"fund":{
"@id":"28929",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929",
"@oldID":"",
"name":"Test Fund",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate":"2010-05-03T11:13:50",
"createdByPerson":{
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"2010-05-27T11:41:23",
"lastUpdatedByPerson":{
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
}
}
}
Method: new [GET]
The new
method will return a single fund. The purpose of the new
method is to retrieve an empty resource with the proper structure.
Content-types ::
- application/json
- application/xml
- application/help
Format ::
- json
- xml
- help
Parameters ::
- {format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/new.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/new?format={format}
- [Header] Accept : {Content-type}
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/new
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/new
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 18:47:37 GMT
Content-Length: 354
<?xml version="1.0" encoding="utf-8"?>
<fund id="" uri="" oldID="">
<name></name>
<fundType id="" uri="">
<name></name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>Null</isActive>
<createdDate></createdDate>
<createdByPerson id="" uri="" />
<lastUpdatedDate></lastUpdatedDate>
<lastUpdatedByPerson id="" uri="" />
</fund>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/new.json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/new.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 18:48:28 GMT
Content-Length: 236
{
"fund":{
"@id":"",
"@uri":"",
"@oldID":"",
"name":"",
"fundType":{
"@id":"",
"@uri":"",
"name":""
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate":"",
"createdByPerson":{
"@id":"",
"@uri":""
},
"lastUpdatedDate":"",
"lastUpdatedByPerson":{
"@id":"",
"@uri":""
}
}
}
Method: create [POST]
The create
method will create a single Fund.
Notes ::
- This method will return a 201 - Created if successfully created
Content-types ::
- application/json
- application/xml
Format ::
- json
- xml
Parameters ::
- {format}
- [POST] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds.{format}
- [POST] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds?format={format}
- [Header] Accept : {Content-type}
Required Fields ::
- fundName
Sample Response ::
Given: [POST] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds
Request body:
<?xml version="1.0" encoding="utf-8"?>
<fund id="" uri="" oldID="">
<name>asdfasdf</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate></createdDate>
<createdByPerson id="" uri="" />
<lastUpdatedDate></lastUpdatedDate>
<lastUpdatedByPerson id="" uri="" />
</fund>
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 19:00:52 GMT
Content-Length: 543
<?xml version="1.0" encoding="utf-8"?>
<fund id="28929" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929" oldID="">
<name>asdfasdf</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate></lastUpdatedDate>
<lastUpdatedByPerson id="" uri="" />
</fund>
Given: [POST] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds.json
Request body:
{
"fund":{
"@id":"",
"@uri":"",
"@oldID":"",
"name":"Test Fund",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate":"",
"createdByPerson":{
"@id":"",
"@uri":""
},
"lastUpdatedDate":"",
"lastUpdatedByPerson":{
"@id":"",
"@uri":""
}
}
}
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/json; charset=utf-8
Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds.json/91491
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 19:07:04 GMT
Content-Length: 417
{
"fund":{
"@id":"28929",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929",
"@oldID":"",
"name":"Test Fund",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate":"2010-05-03T11:13:50",
"createdByPerson":{
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"",
"lastUpdatedByPerson":{
"@id":"",
"@uri":""
}
}
}
Method: update [PUT] [POST (Low REST)]
The update
method will update a single fund.
Content-types ::
- application/json
- application/xml
Format ::
- json
- xml
Parameters ::
- {format}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}.{format}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}?format={format}
- [Header] Accept : {Content-type}
- {id}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/{id}
Required Fields ::
- fund id
- fundName
Sample Response ::
Given: [PUT] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929
Request body:
<?xml version="1.0" encoding="utf-8"?>
<fund id="28929" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929" oldID="">
<name>asdfasdf</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate></createdDate>
<createdByPerson id="" uri="" />
<lastUpdatedDate></lastUpdatedDate>
<lastUpdatedByPerson id="" uri="" />
</fund>
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 19:26:32 GMT
Content-Length: 544
<?xml version="1.0" encoding="utf-8"?>
<fund id="28929" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929" oldID="">
<name>asdfasdf</name>
<fundType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1">
<name>Contribution</name>
</fundType>
<fundCode></fundCode>
<isWebEnabled>false</isWebEnabled>
<accountReference id="" uri="" />
<isActive>False</isActive>
<createdDate>2010-05-03T11:14:10</createdDate>
<createdByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
<lastUpdatedDate>2010-05-27T11:41:23</lastUpdatedDate>
<lastUpdatedByPerson id="2229409" uri="{{CONSUMER_ROOT_DOMAIN}}/people/2229409" />
</fund>
Given: [PUT] https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929.json
Request body:
{
"fund":{
"@id":"28929",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929",
"@oldID":"",
"name":"Test Fund",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate":"",
"createdByPerson":{
"@id":"",
"@uri":""
},
"lastUpdatedDate":"",
"lastUpdatedByPerson":{
"@id":"",
"@uri":""
}
}
}
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 13 Apr 2010 19:18:09 GMT
Content-Length: 416
{
"fund":{
"@id":"28929",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/28929",
"@oldID":"",
"name":"Test Fund",
"fundType":{
"@id":"1",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/giving/v1/funds/fundtypes/1",
"name":"Contribution"
},
"fundCode":null,
"isWebEnabled":"false",
"accountReference":{
"@id":"",
"@uri":""
},
"isActive":"false",
"createdDate":"2010-05-03T11:13:50",
"createdByPerson":{
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
},
"lastUpdatedDate":"2010-05-27T11:41:23",
"lastUpdatedByPerson":{
"@id":"2229409",
"@uri":"{{CONSUMER_ROOT_DOMAIN}}/people/2229409"
}
}
}