Save Collector
Systems can create or update collectors in the Donary system using the Save Collector API.
Endpoint
/V1/External/SaveCollector
Http Request Method
PUT
Request Header
APIKey - The API key for authorization.
Request Body
note
* Indicates required field.
* Provide if updating a collector.
* Either firstName
and lastName
or firstNameHebrew
and lastNameHebrew
are required.
Name | Type | Description | Child Attributes |
---|---|---|---|
orgGuid * | string | Organization's unique identifier. | |
collectorID * | string | Account number - if provided, the existing collector record will be updated. Click here for more information on this field. | |
title | string | English title. | |
firstName * | string | English first name. | |
lastName * | string | English last name. | |
titleHebrew | string | Hebrew title. | |
firstNameHebrew * | string | Hebrew first name. | |
lastNameHebrew * | string | Hebrew last name. | |
suffixHebrew | string | Hebrew last title. | |
collectorPhones | array of objects | Array of phone details. | |
collectorEmails | array of objects | Array of email details. | |
collectorAddresses | array of objects | Array of address details. |
Response
See list of possible errors.
Create Collector Example:
This example will create a new collector and return the collectorId
, DNR1011
.
note
Please note - A new collector will be creates as the collectorId
is empty in the payload.
cURL:
curl --location --request PUT 'https://webapi.donary.com/V1/External/SaveCollector' \
--header 'APIKey: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"orgGuid":"115e9d3d-baf2-4089-b896-9b2621ffcf1b","collectorID":"","title":"Mr","firstName":"Mark","lastName":"Collect","titleHebrew":"הרב","firstNameHebrew":"מרק","lastNameHebrew":"צדקה","suffixHebrew":"שליטא","collectorPhones":[{"phoneLabel":"Home","phoneNumber":"9998887777","countryCode":"USA"}],"collectorEmails":[{"emailLabel":"Personal","emailAddress":"mark@collect.com"}],"collectorAddresses":[{"addressLabel":"Home","careOf":"","houseNum":"2","streetName":"Collecting Street","unit":"","city":"Anywhere","state":"US","zip":"11111","country":"United States"}]}'
Payload:
{
"orgGuid": "115e9d3d-baf2-4089-b896-9b2621ffcf1b",
"collectorId": "",
"title": "Mr",
"firstName": "Mark",
"lastName": "Collect",
"titleHebrew": "הרב",
"firstNameHebrew": "מרק",
"lastNameHebrew": "צדקה",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "9998887777",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "mark@collect.com"
}
],
"collectorAddresses": [
{
"addressLabel": "Home",
"careOf": "",
"houseNum": "2",
"streetName": "Collecting Street",
"unit": "",
"city": "Anywhere",
"state": "US",
"zip": "11111",
"country": "United States"
}
]
}
Response:
{
"orgGuid": "115e9d3d-baf2-4089-b896-9b2621ffcf1b",
"collectorId": "DNR1011",
"title": "Mr",
"firstName": "Mark",
"lastName": "Collect",
"titleHebrew": "הרב",
"firstNameHebrew": "מרק",
"lastNameHebrew": "צדקה",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "9998887777",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "mark@collect.com"
}
],
"collectorAddresses": [
{
"addressLabel": "Home",
"careOf": "",
"houseNum": "2",
"streetName": "Collecting Street",
"unit": "",
"city": "Anywhere",
"state": "US",
"zip": "11111",
"country": "United States"
}
]
}
Update Collector Example:
This example will update Collector DNR1011's firstName
, phoneNumber
, and emailAddress
.
note
Please note: The collectorId
must be included in the payload to update the specified collector. Learn more about how to update a record here.
cURL:
curl --location --request PUT 'https://webapi.donary.com/V1/External/SaveCollector' \
--header 'APIKey: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"orgGuid":"115e9d3d-baf2-4089-b896-9b2621ffcf1b","collectorId":"DNR1011","title":"Mr","firstName":"Sam","lastName":"Collect","titleHebrew":"הרב","firstNameHebrew":"סם","lastNameHebrew":"צדקה","suffixHebrew":"שליטא","collectorPhones":[{"phoneLabel":"Home","phoneNumber":"1012023033","countryCode":"USA"}],"collectorEmails":[{"emailLabel":"Personal","emailAddress":"sam@collect.com"}],"collectorAddresses":[{"addressLabel":"Home","careOf":"","houseNum":"2","streetName":"Collecting Street","unit":"","city":"Anywhere","state":"US","zip":"11111","country":"United States"}]}'
Payload:
{
"orgGuid": "115e9d3d-baf2-4089-b896-9b2621ffcf1b",
"collectorId": "DNR1011",
"title": "Mr",
"firstName": "Sam",
"lastName": "Collect",
"titleHebrew": "הרב",
"firstNameHebrew": "סם",
"lastNameHebrew": "צדקה",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "1012023033",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "sam@collect.com"
}
],
"collectorAddresses": [
{
"addressLabel": "Home",
"careOf": "",
"houseNum": "2",
"streetName": "Collecting Street",
"unit": "",
"city": "Anywhere",
"state": "US",
"zip": "11111",
"country": "United States"
}
]
}
Response:
{
"orgGuid": "115e9d3d-baf2-4089-b896-9b2621ffcf1b",
"collectorId": "DNR1011",
"title": "Mr",
"firstName": "Sam",
"lastName": "Collect",
"titleHebrew": "הרב",
"firstNameHebrew": "סם",
"lastNameHebrew": "צדקה",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "1012023033",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "sam@collect.com"
}
],
"collectorAddresses": [
{
"addressLabel": "Home",
"careOf": "",
"houseNum": "2",
"streetName": "Collecting Street",
"unit": "",
"city": "Anywhere",
"state": "US",
"zip": "11111",
"country": "United States"
}
]
}