Anglican Church in North America
Parishes API Guide
Revised November 30, 2009
===
The Parishes API allows users to retrieve parish information from the ACNA database by calling a PHP script and passing it a number of URL parameters.
The location of the Parishes API is:
http://anglicanchurch.net/api/parishes.php
A typical call to the Parishes API would look like this:
http://anglicanchurch.net/api/parishes.php?states=pa,tx,ca&address=1&phone=1&web=1&map=1&order=state&output=html
The Parishes API returns results in HTML or XML format. This is specified by the "output" paramater (see below for usage).
===============================
== OUTPUT FORMATS ==
===============================
-------------------------------
-- HTML --
-------------------------------
The following is a sample parish listing in HTML format. The entire list is enclosed in the
tag, and each parish is enclosed in a
tag.
All Saints Anglican Church
11122 Link Dr.
San Antonio, TX 78213
...
-------------------------------
-- XML --
-------------------------------
The following is a sample parish listing XML Format. The root element is
, and all parishes are enclosed in the tag.
All Saints Anglican Church
11122 Link Dr.
San Antonio
TX
78213
210-344-1920
http://www.allsaintsanglican.net/
...
Note: Parish names are always included by default. Other items are included only when requested. See below for options and usage.
===============================
== PARAMETERS ==
===============================
The Parishes API supports the following parameters and values:
-------------------------------
-- Parameter name: output --
-------------------------------
Explanation: Specifies output in either HTML or XML format.
Valid values: html | xml
Case-sensitive: No
Delimiter: N/A
Default: html
Example:
output=html
output=xml
-------------------------------
-- Parameter name: states --
-------------------------------
Explanation: Restricts results to one or more U.S. states or Canadian provinces.
Valid values: 2-letter U.S. state and Canadian province abbreviation(s). Multiple abbreviations must be separated by a comma.
Case-sensitive: No
Delimiter: Comma
Default: All U.S. states and Canadian provinces
Example:
states=PA
states=PA,TX
states=pa,tx,fl
Notes:
- All non two-character values are ignored.
- Any parameters not in the format of xx,yy,zz may result in undesired results being returned.
- Before processing the request, trailing comma(s) are trimmed from the states parameter, but it is preferred that you not include a trailing comma after the last item.
-------------------------------
-- Parameter name: order --
-------------------------------
Explanation: Specifies the order in which results are returned.
Valid values: name | state
Case-sensitive: No
Delimiter: N/A
Default: name
Example:
order=name
order=states
Notes:
- If "states" order is specified, parishes are sorted by name within states.
-------------------------------
-- Parameter name: address --
-------------------------------
Explanation: Specifies whether to include the parish street address.
Valid values: 1 | 0
Case-sensitive: N/A
Delimiter: N/A
Default: 0
Example:
phone=0
phone=1
Notes:
- Address includes street address, city, state, and postal code as present in the database. Address is formatted in 2 lines separated by a br tag in this format:
[Street address][br /]
[City, ST ZIP]
- If address components are missing from results it is because they are not present in the database.
- Address lines are enclosed in h2 tags (see output example above).
-------------------------------
-- Parameter name: phone --
-------------------------------
Explanation: Specifies whether to include the parish phone number.
Valid values: 1 | 0
Case-sensitive: N/A
Delimiter: N/A
Default: 0
Example:
phone=0
phone=1
Notes:
- In HTML output, phone number is returned with accompanying PNG icon, with icon and text hyperlinked using the href="tel:" anchor attribute.
- If phone number is missing from results it is because it is not present in the database.
-------------------------------
-- Parameter name: web --
-------------------------------
Explanation: Specifies whether to include the parish web address.
Valid values: 1 | 0
Case-sensitive: N/A
Delimiter: N/A
Default: 0
Example:
web=0
web=1
Notes:
- In HTML output, web address is returned with accompanying PNG icon, with icon and text hyperlinked.
- If web address is missing from results it is because it is not present in the database.
-------------------------------
-- Parameter name: map --
-------------------------------
Explanation: Specifies whether to include a URL to Google maps pinpointing the parish location.
Valid values: 1 | 0
Case-sensitive: N/A
Delimiter: N/A
Default: 0
Example:
map=0
map=1
Notes:
- In HTML output, map is returned with accompanying PNG icon, with icon and text hyperlinked.
- If map link is missing from results it is because insufficient location information is present in the database.
- Given the large amount of information in the database and the variety of sources from which it is acquired, we cannot guarantee the accuracy or completeness of map information.
[end]