Addresses
An address or collection of addresses can belong to households
or people
and are context aware.
Authentication
This method requires Authentication
Resource Structure
This resource conforms to the following XSD
Methods
Address ::
- show [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}
- new [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/New
- edit [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}/Edit
- create [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses
- update [PUT] [POST(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}
- delete [DELETE] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}
- delete [GET(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}/Delete
Household Addresses ::
- list [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses
- show [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
- new [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/New
- edit [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}/Edit
- create [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses
- update [PUT] [POST(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
- delete [DELETE] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
- delete [GET(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}/Delete
People Addresses ::
- list [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses
- show [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- new [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/New
- edit [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}/Edit
- create [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses
- update [PUT] [POST(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- delete [DELETE] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- delete [GET(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}/Delete
Method: list [GET]
The list
method will return a list of addresses based on context (households
or people
).
Notes ::
list
is only available via context (where the url has ahouseholdID
orpersonID
)- When calling
list
foraddresses
for ahousehold
the method will return alladdresses
for thehousehold
and all of theaddresses
of thepeople
in thathousehold
- When calling
list
foraddresses
for aperson
the method will return alladdresses
for thehousehold
and alladdresses
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://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses
- {householdID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789/Addresses
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789/Addresses
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 05:03:22 GMT
Content-Length: 4587
<?xml version="1.0" encoding="utf-8"?>
<addresses>
<address id="1652748" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652748">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="" uri="" />
<addressType id="1" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/1">
<name>Primary</name>
</addressType>
<address1>8657 Elm St.</address1>
<address2></address2>
<address3></address3>
<city>Flower Mound</city>
<postalCode>77695</postalCode>
<county></county>
<country>US</country>
<stProvince>TX</stProvince>
<carrierRoute></carrierRoute>
<deliveryPoint></deliveryPoint>
<addressDate></addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate></createdDate>
<lastUpdatedDate>2009-03-25T00:41:43</lastUpdatedDate>
</address>
<address id="1652747" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="1635398" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398" />
...
</address>
</addresses>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789/Addresses.json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789/Addresses.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:02:03 GMT
Content-Length: 3742
{
"addresses": {
"address": [
{
"@array": "true",
"@id": "1652748",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652748",
"household": {
"@id": "1551789",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789"
},
"person": {
"@id": "",
"@uri": ""
},
"addressType": {
"@id": "1",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/1",
"name": "Primary"
},
"address1": "8657 Elm St.",
"address2": null,
"address3": null,
"city": "Flower Mound",
"postalCode": "77695",
"county": null,
"country": "US",
"stProvince": "TX",
"carrierRoute": null,
"deliveryPoint": null,
"addressDate": null,
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": null,
"lastUpdatedDate": "2009-03-25T00:41:43"
},
{
"@array": "true",
"@id": "13707814",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707814",
"household": {
"@id": "1551789",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789"
},
"person": {
"@id": "",
"@uri": ""
},
...
}
]
}
}
Method: show [GET]
The show
method will return a single address 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://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- {householdID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
- {id}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747
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 05:21:23 GMT
Content-Length: 1150
<?xml version="1.0" encoding="utf-8"?>
<address id="1652747" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="1635398" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398" />
<addressType id="7" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7">
<name>Previous</name>
</addressType>
<address1>5976 Montana Dr.</address1>
<address2></address2>
<address3></address3>
<city>Grapevine</city>
<postalCode>78787</postalCode>
<county></county>
<country>US</country>
<stProvince>TX</stProvince>
<carrierRoute>C042</carrierRoute>
<deliveryPoint>12</deliveryPoint>
<addressDate>2001-04-11T00:00:00</addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate></createdDate>
<lastUpdatedDate>2009-03-04T00:29:44</lastUpdatedDate>
</address>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747.json
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747.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:03:53 GMT
Content-Length: 773
{
"address": {
"@id": "1652747",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747",
"household": {
"@id": "1551789",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789"
},
"person": {
"@id": "1635398",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398"
},
"addressType": {
"@id": "7",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7",
"name": "Previous"
},
"address1": "5976 Montana Dr.",
"address2": null,
"address3": null,
"city": "Grapevine",
"postalCode": "78787",
"county": null,
"country": "US",
"stProvince": "TX",
"carrierRoute": "C042",
"deliveryPoint": "12",
"addressDate": "2001-04-11T00:00:00",
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": null,
"lastUpdatedDate": "2009-03-04T00:29:44"
}
}
Method: edit [GET]
The edit
method will return a single address 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://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}/edit.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}/edit?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}/edit
- {householdID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}/edit
- {id}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}/edit
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}/edit
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}/edit
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747/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 05:36:09 GMT
Content-Length: 1150
<?xml version="1.0" encoding="utf-8"?>
<address id="1652747" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="1635398" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398" />
<addressType id="7" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7">
<name>Previous</name>
</addressType>
<address1>5976 Montana Dr.</address1>
<address2></address2>
<address3></address3>
<city>Grapevine</city>
<postalCode>78787</postalCode>
<county></county>
<country>US</country>
<stProvince>TX</stProvince>
<carrierRoute>C042</carrierRoute>
<deliveryPoint>12</deliveryPoint>
<addressDate>2001-04-11T00:00:00</addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate></createdDate>
<lastUpdatedDate>2009-03-04T00:29:44</lastUpdatedDate>
</address>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747/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:04:50 GMT
Content-Length: 773
{
"address": {
"@id": "1652747",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/1652747",
"household": {
"@id": "1551789",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789"
},
"person": {
"@id": "1635398",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398"
},
"addressType": {
"@id": "7",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7",
"name": "Previous"
},
"address1": "5976 Montana Dr.",
"address2": null,
"address3": null,
"city": "Grapevine",
"postalCode": "78787",
"county": null,
"country": "US",
"stProvince": "TX",
"carrierRoute": "C042",
"deliveryPoint": "12",
"addressDate": "2001-04-11T00:00:00",
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": null,
"lastUpdatedDate": "2009-03-04T00:29:44"
}
}
Method: new [GET]
The new
method will return a single address 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://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/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://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/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://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/new.{format}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/new?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/new
- {householdID}
- [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/new
Sample Response ::
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/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 05:42:23 GMT
Content-Length: 836
<?xml version="1.0" encoding="utf-8"?>
<address id="" uri="">
<household id="" uri="" />
<person id="" uri="" />
<addressType id="" uri="">
<name/>
</addressType>
<address1></address1>
<address2></address2>
<address3></address3>
<city></city>
<postalCode></postalCode>
<county></county>
<country></country>
<stProvince></stProvince>
<carrierRoute></carrierRoute>
<deliveryPoint></deliveryPoint>
<addressDate></addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate></createdDate>
<lastUpdatedDate></lastUpdatedDate>
</address>
Given: [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/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:05:52 GMT
Content-Length: 476
{
"address": {
"@id": "",
"@uri": "",
"household": {
"@id": "",
"@uri": ""
},
"person": {
"@id": "",
"@uri": ""
},
"addressType": {
"@id": "",
"@uri": "",
"name": null
},
"address1": null,
"address2": null,
"address3": null,
"city": null,
"postalCode": null,
"county": null,
"country": null,
"stProvince": null,
"carrierRoute": null,
"deliveryPoint": null,
"addressDate": null,
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": null,
"lastUpdatedDate": null
}
}
Method: create [POST]
The create
method will create a single address with or without on context (households
or people
).
Notes ::
- If
create
is called within the context of aperson
(ex. [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses) 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://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses) the household node will be hydrated with the household from the URI - 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/v1/People/{personID}/Addresses.{format}
- [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses
- {householdID}
- [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses
Required Fields ::
- person id and/or household id
- addressType id
- address1
Sample Response ::
Given: [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398/Addresses
Request body:
<?xml version="1.0" encoding="utf-8"?>
<address id="" uri="">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="1635398" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398" />
<addressType id="7" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7">
<name>Previous</name>
</addressType>
<address1>555 Newport Dr.</address1>
<address2></address2>
<address3></address3>
<city>Keller</city>
<postalCode>76248</postalCode>
<county></county>
<country>US</country>
<stProvince>TX</stProvince>
<carrierRoute>C042</carrierRoute>
<deliveryPoint>12</deliveryPoint>
<addressDate>2001-04-11T00:00:00</addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate></createdDate>
<lastUpdatedDate></lastUpdatedDate>
</address>
Response:
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Location: https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810
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 05:56:00 GMT
Content-Length: 1148
<?xml version="1.0" encoding="utf-8"?>
<address id="13707810" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="1635398" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398" />
<addressType id="7" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7">
<name>Previous</name>
</addressType>
<address1>555 Newport Dr.</address1>
<address2></address2>
<address3></address3>
<city>Keller</city>
<postalCode>76248</postalCode>
<county></county>
<country>US</country>
<stProvince>TX</stProvince>
<carrierRoute>C042</carrierRoute>
<deliveryPoint>12</deliveryPoint>
<addressDate>2001-04-11T00:00:00</addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate>2009-04-07T00:55:58</createdDate>
<lastUpdatedDate></lastUpdatedDate>
</address>
Given: [POST] https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398/Addresses.json
Request body:
{
"address": {
"@id": "",
"@uri": "",
"household": {
"@id": "1551789",
"@uri": ""
},
"person": {
"@id": "1635398",
"@uri": ""
},
"addressType": {
"@id": "7",
"@uri": "",
"name": null
},
"address1": "10245 Pinyon Pine",
"address2": null,
"address3": null,
"city": "Keller",
"postalCode": "76248",
"county": null,
"country": null,
"stProvince": "TX",
"carrierRoute": null,
"deliveryPoint": null,
"addressDate": null,
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": null,
"lastUpdatedDate": null
}
}
Response
HTTP/1.1 201 Created
Cache-Control: private
Content-Type: application/json; charset=utf-8
Location: https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398/Addresses.json/13707831
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:10:43 GMT
Content-Length: 754
{
"address": {
"@id": "13707831",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707831",
"household": {
"@id": "1551789",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789"
},
"person": {
"@id": "1635398",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398"
},
"addressType": {
"@id": "7",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7",
"name": "Previous"
},
"address1": "10245 Pinyon Pine",
"address2": null,
"address3": null,
"city": "Keller",
"postalCode": "76248",
"county": null,
"country": null,
"stProvince": "TX",
"carrierRoute": null,
"deliveryPoint": null,
"addressDate": null,
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": "2009-05-01T01:10:43",
"lastUpdatedDate": null
}
}
Method: update [PUT] [POST (Low REST)]
The update
method will update a single address with or without on context (households
or people
).
Notes ::
- If
update
is called within the context of aperson
(ex. [GET] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses) 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://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses) the household node will be hydrated with the household from the URI
Content-types ::
- application/json
- application/xml
Format ::
- json
- xml
Parameters ::
- {format}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}.{format}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}?format={format}
- [Header] Accept : {Content-type}
- {personID}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- {householdID}
- [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
Required Fields ::
- address id
- person id and/or household id
- addressType id
- address1
Sample Response ::
Given: [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810
Request body:
<?xml version="1.0" encoding="utf-8"?>
<address id="13707810" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="1635398" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398" />
<addressType id="7" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7">
<name>Previous</name>
</addressType>
<address1>555 Newport Dr.</address1>
<address2></address2>
<address3></address3>
<city>Keller</city>
<postalCode>76248</postalCode>
<county></county>
<country>US</country>
<stProvince>TX</stProvince>
<carrierRoute>C042</carrierRoute>
<deliveryPoint>12</deliveryPoint>
<addressDate>2001-04-11T00:00:00</addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate>2009-04-07T00:55:58</createdDate>
<lastUpdatedDate></lastUpdatedDate>
</address>
Response:
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/xml; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810
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 05:59:58 GMT
Content-Length: 1167
<?xml version="1.0" encoding="utf-8"?>
<address id="13707810" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810">
<household id="1551789" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789" />
<person id="1635398" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398" />
<addressType id="7" uri="https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7">
<name>Previous</name>
</addressType>
<address1>555 Newport Dr.</address1>
<address2></address2>
<address3></address3>
<city>Keller</city>
<postalCode>76248</postalCode>
<county></county>
<country>US</country>
<stProvince>TX</stProvince>
<carrierRoute>C042</carrierRoute>
<deliveryPoint>12</deliveryPoint>
<addressDate>2001-04-11T00:00:00</addressDate>
<addressComment></addressComment>
<uspsVerified>false</uspsVerified>
<addressVerifiedDate></addressVerifiedDate>
<lastVerificationAttemptDate></lastVerificationAttemptDate>
<createdDate>2009-04-07T00:55:58</createdDate>
<lastUpdatedDate>2009-04-07T00:59:56</lastUpdatedDate>
</address>
Given: [PUT] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707831.json
Request body:
{
"address": {
"@id": "13707831",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707831",
"household": {
"@id": "1551789",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789"
},
"person": {
"@id": "1635398",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398"
},
"addressType": {
"@id": "7",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7",
"name": "Previous"
},
"address1": "10245 Pinyon Pine",
"address2": null,
"address3": null,
"city": "Keller",
"postalCode": "76248",
"county": null,
"country": null,
"stProvince": "TX",
"carrierRoute": null,
"deliveryPoint": null,
"addressDate": null,
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": "2009-05-01T01:10:43",
"lastUpdatedDate": null
}
}
Response
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Content-Location: https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707831.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:14:00 GMT
Content-Length: 771
{
"address": {
"@id": "13707831",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707831",
"household": {
"@id": "1551789",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Households/1551789"
},
"person": {
"@id": "1635398",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/People/1635398"
},
"addressType": {
"@id": "7",
"@uri": "https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/AddressTypes/7",
"name": "Previous"
},
"address1": "10245 Pinyon Pine",
"address2": null,
"address3": null,
"city": "Keller",
"postalCode": "76248",
"county": null,
"country": null,
"stProvince": "TX",
"carrierRoute": null,
"deliveryPoint": null,
"addressDate": null,
"addressComment": null,
"uspsVerified": "false",
"addressVerifiedDate": null,
"lastVerificationAttemptDate": null,
"createdDate": "2009-05-01T01:10:43",
"lastUpdatedDate": "2009-05-01T01:14:01"
}
}
Method: delete [DELETE]
The delete
method will delete a single address 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://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- {householdID}
- [DELETE] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
- {id}
- [GET(Low REST)] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/{id}/Delete
- [DELETE] https://CHURCHCODE.fellowshiponeapi.com/v1/People/{personID}/Addresses/{id}
- [DELETE] https://CHURCHCODE.fellowshiponeapi.com/v1/Households/{householdID}/Addresses/{id}
Sample Response ::
Given: [DELETE] https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810
Response:
HTTP/1.1 204 The resource https://CHURCHCODE.fellowshiponeapi.com/v1/Addresses/13707810 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 06:05:46 GMT