Prospects
A prospect is an individual who has expressed interest in joining a group.
Authentication
This method requires Authentication
Resource Structure
This resource conforms to the following XSD
Methods
Prospects ::
- new [POST] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/prospects/new
- new [POST] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/groups/{id}/prospects/new
- create [POST] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/groups/{id}/prospects
Method: new [GET]
The new
keyword will return a single prospect
. The purpose of the new
method is to retrieve an empty resource with the proper structure.
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/groups/v1/prospects/new.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/prospects/new?format={format}
- [Header] Accept : {Content-type}
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/prospects/new
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
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 15:07:03 GMT
Content-Length: 211
<?xml version="1.0" encoding="utf-8"?>
<prospect id="" uri="">
<individualid></individualid>
<firstname></firstname>
<lastname></lastname>
<email></email>
<phone></phone>
<message></message>
</prospect>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/prospects/new.json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
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:40 GMT
Content-Length: 132
{
"prospect":
{
"@id":"",
"@uri":"",
"individualid":null,
"firstname":null,
"lastname":null,
"email":null,
"phone":null,
"message":null
}
}
Method: create [POST]
The create
method will create a single 'prospect'.
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/groups/v1/groups/{id}/prospects.{format}
- [POST] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/groups/{id}/prospects?format={format}
- [Header] Accept : {Content-type}
Required Fields ::
- firstname
- lastname
Sample Response ::
Given: [POST] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/groups/38/prospects
Request body:
<prospect>
<individualid></individualid>
<firstname>Frank</firstname>
<lastname>Droid</lastname>
<email>kleinke49@gmail.com</email>
<phone>123-456-7896</phone>
<message>Testing 123</message>
</prospect>
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: https://CHURCHCODE.fellowshiponeapi.com/groups/v1/groups/38/prospects
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 22:17:08 GMT
Content-Length: 296
<prospect id="12295" uri="https://CHURCHCODE.fellowshiponeapi.com/groups/v1/prospects/12295">
<individualid></individualid>
<firstname>Frank</firstname>
<lastname>Droid</lastname>
<email>kleinke49@gmail.com</email>
<phone>123-456-7896</phone>
<message>Testing 123</message>
</prospect>
Given: [POST] https://CHURCHCODE.fellowshiponeapi.com/groups/v1/groups/38/prospects.json
Request body:
{
"prospect":
{
"individualid":"",
"firstname":"Frank",
"lastname":"Droid",
"email":"kleinke49@gmail.com",
"phone":"123-456-7896",
"message":"Testgin 123"
}
}
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/json; charset=utf-8
Location: https://CHURCHCODE.fellowshiponeapi.com/groups/v1/groups/38/prospects.json/12295
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 22:18:58 GMT
Content-Length: 213
{
"prospect":
{
"@id":"12295",
"@uri":"https://CHURCHCODE.fellowshiponeapi.com/groups/v1/prospects/12295",
"individualid":"",
"firstname":"Frank",
"lastname":"Droid",
"email":"kleinke49@gmail.com",
"phone":"123-456-7896",
"message":"Testgin 123"
}
}