Communications
A communication or collection of communications can belong to households
or people
and are context aware.
Authentication
This method requires Authentication
Communications
This resource conforms to the following XSD
Methods
Communications ::
- show [GET] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}
- new [GET] https://demo.staging.fellowshiponeapi.com/v1/Communications/New
- edit [GET] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}/Edit
- create [POST] https://demo.staging.fellowshiponeapi.com/v1/Communications
- update [PUT] [POST(Low REST)] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}
- delete [DELETE] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}
- delete [GET(Low REST)] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}/Delete
Household Communications ::
- list [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications
- show [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
- new [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/New
- edit [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}/Edit
- create [POST] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications
- update [PUT] [POST(Low REST)] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
- delete [DELETE] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
- delete [GET(Low REST)] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}/Delete
People Communications ::
- list [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications
- show [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- new [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/New
- edit [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}/Edit
- create [POST] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications
- update [PUT] [POST(Low REST)] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- delete [DELETE] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- delete [GET(Low REST)] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}/Delete
Method: list [GET]
The list
method will return a list of communications based on context (households
or people
).
Notes ::
- List is only available via context (where the url has a
householdID
orpersonID
) - When calling list for
communications
for ahousehold
the method will return allcommunications
for thehousehold
and all of thecommunications
of thepeople
in thathousehold
- When calling list for
communications
for aperson
the method will return allcommunications
for thehousehold
and allcommunications
for thatperson
- By passing in the
content-type
ofapplication/help
in theaccept
header or using the {format} parameterhelp
the API will return an html representation of the help documents for this resource (authentication not required)
Content-types ::
- application/json
- application/xml
- application/help
Format ::
- json
- xml
- help
Parameters ::
- {format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications.{format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications
- {householdID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications
Sample Response ::
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 07 Apr 2009 15:43:47 GMT
Content-Length: 1765
<?xml version="1.0" encoding="utf-8"?>
<communications>
<communication id="4056402" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/4056402">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="" uri="" />
<communicationType id="1" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1">
<name>Home Phone</name>
</communicationType>
<communicationGeneralType>Telephone</communicationGeneralType>
<communicationValue>896-759-8756</communicationValue>
<searchCommunicationValue>8967598756</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate>2005-01-20T01:04:55</lastUpdatedDate>
</communication>
<communication id="4053311" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/4053311">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="1632412" uri="https://demo.staging.fellowshiponeapi.com/v1/People/1632412" />
<communicationType id="4" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/4">
<name>Email</name>
</communicationType>
<communicationGeneralType>Email</communicationGeneralType>
<communicationValue>GregandKri.Bedunah@fellowshiponemail.com</communicationValue>
<searchCommunicationValue>GregandKri.Bedunah@fellowshiponemail.com</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate>2004-03-14T16:40:40</lastUpdatedDate>
</communication>
</communications>
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications.json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 01 May 2009 06:40:47 GMT
Content-Length: 1212
{
"communications": {
"communication": [
{
"@array": "true",
"@id": "4056402",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/4056402",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "1",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1",
"name": "Home Phone"
},
"communicationGeneralType": "Telephone",
"communicationValue": "896-759-8756",
"searchCommunicationValue": "8967598756",
"preferred": "false",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": "2005-01-20T01:04:55"
},
{
"@array": "true",
"@id": "4053311",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/4053311",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "1632412",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/People/1632412"
},
"communicationType": {
"@id": "4",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/4",
"name": "Email"
},
"communicationGeneralType": "Email",
"communicationValue": "GregandKri.Bedunah@fellowshiponemail.com",
"searchCommunicationValue": "GregandKri.Bedunah@fellowshiponemail.com",
"preferred": "false",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": "2004-03-14T16:40:40"
}
]
}
}
Method: show [GET]
The show
method will return a single communication with or without on context (households
or people
) 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
Format ::
- json
- xml
- xsd
Parameters ::
- {format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}.{format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- {householdID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
- {id}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
Sample Response ::
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/4056402
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://demo.staging.fellowshiponeapi.com/v1/Communications/4056402
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 07 Apr 2009 15:55:33 GMT
Content-Length: 689
<?xml version="1.0" encoding="utf-8"?>
<communication id="4056402" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/4056402">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="" uri="" />
<communicationType id="1" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1">
<name>Home Phone</name>
</communicationType>
<communicationGeneralType>Telephone</communicationGeneralType>
<communicationValue>896-759-8756</communicationValue>
<searchCommunicationValue>8967598756</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate>2005-01-20T01:04:55</lastUpdatedDate>
</communication>
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/4056402.json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/4056402.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 01 May 2009 06:41:56 GMT
Content-Length: 534
{
"communication": {
"@id": "4056402",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/4056402",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "1",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1",
"name": "Home Phone"
},
"communicationGeneralType": "Telephone",
"communicationValue": "896-759-8756",
"searchCommunicationValue": "8967598756",
"preferred": "false",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": "2005-01-20T01:04:55"
}
}
Method: edit [GET]
The edit
method will return a single communication with or without on context (households
or people
) 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
Format ::
- json
- xml
Parameters ::
- {format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}/edit.{format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}/edit?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}/edit
- {householdID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}/edit
- {id}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}/edit
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}/edit
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}/edit
Sample Response ::
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/4056402/edit
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, 07 Apr 2009 15:56:35 GMT
Content-Length: 689
<?xml version="1.0" encoding="utf-8"?>
<communication id="4056402" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/4056402">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="" uri="" />
<communicationType id="1" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1">
<name>Home Phone</name>
</communicationType>
<communicationGeneralType>Telephone</communicationGeneralType>
<communicationValue>896-759-8756</communicationValue>
<searchCommunicationValue>8967598756</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate>2005-01-20T01:04:55</lastUpdatedDate>
</communication>
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/4056402/edit.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: Fri, 01 May 2009 06:42:49 GMT
Content-Length: 534
{
"communication": {
"@id": "4056402",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/4056402",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "1",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1",
"name": "Home Phone"
},
"communicationGeneralType": "Telephone",
"communicationValue": "896-759-8756",
"searchCommunicationValue": "8967598756",
"preferred": "false",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": "2005-01-20T01:04:55"
}
}
Method: new [GET]
The new
method will return a single communication with or without on context (households
or people
). The purpose of the new
method is to retrieve an empty resource with the proper structure.
Notes ::
- If
new
is called within the context of aperson
(ex. [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/new) the person and household nodes will be hydrated with the person from the URI - If
new
is called within the context of ahousehold
(ex. [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/new) the household node will be hydrated with the household from the URI
Content-types ::
- application/json
- application/xml
Format ::
- json
- xml
Parameters ::
- {format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/new.{format}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/new?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/new
- {householdID}
- [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/new
Sample Response ::
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/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, 07 Apr 2009 15:57:18 GMT
Content-Length: 446
<?xml version="1.0" encoding="utf-8"?>
<communication id="" uri="">
<household id="" uri="" />
<person id="" uri="" />
<communicationType id="" uri="">
<name></name>
</communicationType>
<communicationGeneralType></communicationGeneralType>
<communicationValue></communicationValue>
<searchCommunicationValue></searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate></lastUpdatedDate>
</communication>
Given: [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/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: Fri, 01 May 2009 06:43:45 GMT
Content-Length: 358
{
"communication": {
"@id": "",
"@uri": "",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "",
"@uri": "",
"name": null
},
"communicationGeneralType": null,
"communicationValue": null,
"searchCommunicationValue": null,
"preferred": "false",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": null
}
}
Method: create [POST]
The create
method will create a single communication with or without on context (households
or people
).
Notes ::
- If
create
is called within the context of aperson
(ex. [POST] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications) the person and household nodes will be hydrated with the person from the URI - If
create
is called within the context of ahousehold
(ex. [POST] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications) the household node will be hydrated with the household from the URI - The
preferred
field will only be updated in the context of aperson
. You can not update thepreferred
field in the context of ahousehold
. - This method will return a 201 - Created if successfully created
Content-types ::
- application/json
- application/xml
Format ::
- json
- xml
Parameters ::
- {format}
- [POST] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications.{format}
- [POST] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [POST] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications
- {householdID}
- [POST] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications
Required Fields ::
- person id and/or household id
- communicationType id
- communicationValue
Sample Response ::
Given: [POST] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications
Request body:
<?xml version="1.0" encoding="utf-8"?>
<communication id="" uri="">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="" uri="" />
<communicationType id="1" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1">
<name>Home Phone</name>
</communicationType>
<communicationGeneralType>Telephone</communicationGeneralType>
<communicationValue>555-555-5555</communicationValue>
<searchCommunicationValue>5555555555</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate></lastUpdatedDate>
</communication>
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: https://demo.staging.fellowshiponeapi.com/v1/Communications/22918544
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 07 Apr 2009 16:00:22 GMT
Content-Length: 672
<?xml version="1.0" encoding="utf-8"?>
<communication id="22918544" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/22918544">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="" uri="" />
<communicationType id="1" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1">
<name>Home Phone</name>
</communicationType>
<communicationGeneralType>Telephone</communicationGeneralType>
<communicationValue>555-555-5555</communicationValue>
<searchCommunicationValue>5555555555</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate>2009-04-07T16:00:38</createdDate>
<lastUpdatedDate></lastUpdatedDate>
</communication>
Given: [POST] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications.json
Request body:
{
"communication": {
"@id": "",
"@uri": "",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "1",
"@uri": "",
"name": null
},
"communicationGeneralType": "Telephone",
"communicationValue": "555-555-5555",
"searchCommunicationValue": null,
"preferred": "true",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": null
}
}
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/json; charset=utf-8
Location: https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications.json/22918600
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 01 May 2009 06:46:39 GMT
Content-Length: 518
{
"communication": {
"@id": "22918600",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/22918600",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "1",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1",
"name": "Home Phone"
},
"communicationGeneralType": "Telephone",
"communicationValue": "555-555-5555",
"searchCommunicationValue": "5555555555",
"preferred": "true",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": null
}
}
Method: update [PUT] [POST (Low REST)]
The update
method will update a single communication with or without on context (households
or people
).
Notes ::
- If
update
is called within the context of aperson
(ex. [GET] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications) the person and household nodes will be hydrated with the person from the URI - If
update
is called within the context of ahousehold
(ex. [GET] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications) the household node will be hydrated with the household from the URI - The
preferred
field will only be updated in the context of aperson
. You can not update thepreferred
field in the context of ahousehold
.
Content-types ::
- application/json
- application/xml
Format ::
- json
- xml
Parameters ::
- {format}
- [PUT] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}.{format}
- [PUT] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [PUT] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- {householdID}
- [PUT] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
Required Fields ::
- communication id
- person id and/or household id
- communicationType id
- communicationValue
- listed
Sample Response ::
Given: [PUT] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/22918544
Request body:
<?xml version="1.0" encoding="utf-8"?>
<communication id="22918544" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/22918544">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="" uri="" />
<communicationType id="1" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1">
<name>Home Phone</name>
</communicationType>
<communicationGeneralType>Telephone</communicationGeneralType>
<communicationValue>555-555-5557</communicationValue>
<searchCommunicationValue>5555555557</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate></lastUpdatedDate>
</communication>
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://demo.staging.fellowshiponeapi.com/v1/Communications/22918544
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 07 Apr 2009 16:01:55 GMT
Content-Length: 691
<?xml version="1.0" encoding="utf-8"?>
<communication id="22918544" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/22918544">
<household id="1552366" uri="https://demo.staging.fellowshiponeapi.com/v1/Households/1552366" />
<person id="" uri="" />
<communicationType id="1" uri="https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1">
<name>Home Phone</name>
</communicationType>
<communicationGeneralType>Telephone</communicationGeneralType>
<communicationValue>555-555-5557</communicationValue>
<searchCommunicationValue>5555555557</searchCommunicationValue>
<preferred>false</preferred>
<communicationComment></communicationComment>
<createdDate></createdDate>
<lastUpdatedDate>2009-04-07T11:01:54</lastUpdatedDate>
</communication>
Given: [PUT] https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/22918600.json
Request body:
{
"communication": {
"@id": "22918600",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/22918600",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "1",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1",
"name": "Home Phone"
},
"communicationGeneralType": "Telephone",
"communicationValue": "555-555-5555",
"searchCommunicationValue": "5555555555",
"preferred": "true",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": null
}
}
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://demo.staging.fellowshiponeapi.com/v1/Households/1552366/Communications/22918600.json
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Fri, 01 May 2009 06:49:11 GMT
Content-Length: 535
{
"communication": {
"@id": "22918600",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/22918600",
"household": {
"@id": "1552366",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Households/1552366"
},
"person": {
"@id": "",
"@uri": ""
},
"communicationType": {
"@id": "1",
"@uri": "https://demo.staging.fellowshiponeapi.com/v1/Communications/CommunicationTypes/1",
"name": "Home Phone"
},
"communicationGeneralType": "Telephone",
"communicationValue": "555-555-5555",
"searchCommunicationValue": "5555555555",
"preferred": "true",
"communicationComment": null,
"createdDate": null,
"lastUpdatedDate": "2009-05-01T01:49:11"
}
}
Method: delete [DELETE]
The delete
method will delete a single communication with or without on context (households
or people
).
Notes ::
- If
delete
is called the resource will no longer be available from the API and will return a 410 - Entity is GONE if the resource is ever requested again - This method will return a 204 - No Content if a successful deletion occurs
- Content-type and Format are not used by this action
Parameters ::
- {personID}
- [DELETE] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- {householdID}
- [DELETE] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
- {id}
- [GET(Low REST)] https://demo.staging.fellowshiponeapi.com/v1/Communications/{id}/Delete
- [DELETE] https://demo.staging.fellowshiponeapi.com/v1/People/{personID}/Communications/{id}
- [DELETE] https://demo.staging.fellowshiponeapi.com/v1/Households/{householdID}/Communications/{id}
Sample Response ::
Given: [DELETE] https://demo.staging.fellowshiponeapi.com/v1/Communications/22918544
Response:
HTTP/1.1 204 The resource https://demo.staging.fellowshiponeapi.com/v1/Communications/22918544 has been deleted.
Cache-Control: private
Server: Microsoft-IIS/7.0
X-AspNetMvc-Version: 1.0
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Tue, 07 Apr 2009 16:06:52 GMT