Push Post API¶
These calls allow you to add records to a TouchPoint database using the API.
Authentication to the API requires a user with both the Developer and APIWrite roles (APIWrite might not exist and will need to be created). Adding the APIOnly role as well is recommended, so the account can only be used for API calls and cannot sign in to TouchPoint.
Important
The examples below show using curl, a command line tool for transferring data using various URL protocols. This tool comes on a Mac and can be downloaded for Windows.
Note
The examples below explicitly set the authorization header, but you can also set it like so:
curl --user "atester:MyApiPasswordToRuleThemAll" \
"https://sandbox.tpsdb.com/api/People?\$top=5"
- AddContribution()¶
- Returns:
information including the PeopleId and the ContributionId
- Return type:
json object
- Parameters:
First (string) – first name (required to create a new person)
Last (string) – last name (required to create a new person)
Email (string) – a valid email address (required)
Phone (string) – phone number (optional, used for matching)
Amount (decimal) – amount of the gift, greater than zero (required)
Address (string) – street address (optional)
Zip (string) – zip code (optional)
Date (datetime) – date and time of the contribution (optional)
Notes (string) – notes about this contribution (optional)
Source (string) – service name like txt2give (optional)
FundId (int) – id of the fund (optional)
PeopleId (int) – attach this contribution to specific record by Id (optional)
IgnoreUnknownPerson (bool) – When true, if no people match is found, do not record this contribution (optional)
BundleTypeId (int) – id of the bundle header type (optional)
ContributionTypeId (int) – e.g. 1=Regular, 9=NonTaxDed (optional)
This call allows you to add a contribution to the database.
Curl Example:
curl -X POST -H "Authorization: Basic YXRlc3RlcjpNeUFwaVBhc3N3b3JkVG9SdWxlVGhlbUFsbA==" \ -H "Content-Type: application/json" -d '{ "First": "John", "Last": "Appleseed", "Email": "david@tpsdb.com", "Phone": "901-489-0611", "Amount": "10" }' "https://sandbox.tpsdb.com/Api/AddContribution"
returns:
{ "PeopleId":152, "ContributionId":1, "NewPerson":true, "MultipleMatches":false, "Source":null }
In the return object, NewPerson indicates whether a new person record was created or not. MultipleMatches is true if it matched multiple existing records (it chose the first one). If no match is found and First and Last are not provided, or IgnoreUnknownPerson is true, no contribution is recorded and an error is returned.
- ReverseContribution()¶
- Returns:
information including the PeopleId and the ContributionId
- Return type:
json object
- Parameters:
id (int) – id of the contribution to be reversed
source (string) – identifies the party / company making the reversal
This call allows you to reverse a contribution in the database.
The arguments are passed in the URL as /Api/ReverseContribution/1234/company where 1234 is the contributionid of the contribution to be reversed and company is an indicator of the party doing the reversal. The body of the POST is empty.
Curl Example:
curl -X POST -H "Authorization: Basic YXRlc3RlcjpNeUFwaVBhc3N3b3JkVG9SdWxlVGhlbUFsbA==" \ "https://sandbox.tpsdb.com/Api/ReverseContribution/1234/text2give"
returns:
{ "operation": "Reversal", "peopleId": 4444, "contributionId": 1235, "source": "API Reverse (source=text2give)" }
The returned
contributionIdis the Id of the new reversal record. The operation emails the staff on the notify list of the church’s online giving Involvement.
Latest Update |
10/22/2026 |
Corrected the required roles and parameters.
