Skip to main content

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.

NameTypeDescriptionChild Attributes
orgGuid *stringOrganization's unique identifier.Placeholder
collectorID *stringAccount number. If a valid ID is provided, the existing collector record will be updated. Learn more about the behavior of identifiers.Placeholder
title stringEnglish title.Placeholder
firstName *stringEnglish first name.Placeholder
lastName *stringEnglish last name.Placeholder
titleHebrew stringHebrew title.Placeholder
firstNameHebrew *stringHebrew first name.Placeholder
lastNameHebrew *stringHebrew last name.Placeholder
suffixHebrew stringHebrew last title.Placeholder

Response

See list of possible errors.


Create Collector Example:

This example will create a new collector and return the collectorId, DNR1011.

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":"Sam","lastName":"Stein","titleHebrew":"הרב","firstNameHebrew":"יוסף","lastNameHebrew":"סטין","suffixHebrew":"שליטא","collectorPhones":[{"phoneLabel":"Home","phoneNumber":"9998887777","countryCode":"USA"}],"collectorEmails":[{"emailLabel":"Personal","emailAddress":"yosef@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": "Sam",
"lastName": "Stein",
"titleHebrew": "הרב",
"firstNameHebrew": "יוסף",
"lastNameHebrew": "סטין",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "9998887777",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "yosef@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": "Stein",
"titleHebrew": "הרב",
"firstNameHebrew": "יוסף",
"lastNameHebrew": "סטין",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "9998887777",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "yosef@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

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":"Yosef","lastName":"Stein","titleHebrew":"הרב","firstNameHebrew":"יוסף","lastNameHebrew":"סטין ","suffixHebrew":"שליטא","collectorPhones":[{"phoneLabel":"Home","phoneNumber":"1012023033","countryCode":"USA"}],"collectorEmails":[{"emailLabel":"Personal","emailAddress":"massir@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": "Yosef",
"lastName": "Stein",
"titleHebrew": "הרב",
"firstNameHebrew": "יוסף",
"lastNameHebrew": "סטין ",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "1012023033",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "massir@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": "Yosef",
"lastName": "Stein",
"titleHebrew": "הרב",
"firstNameHebrew": "יוסף",
"lastNameHebrew": "סטין",
"suffixHebrew": "שליטא",
"collectorPhones": [
{
"phoneLabel": "Home",
"phoneNumber": "1012023033",
"countryCode": "USA"
}
],
"collectorEmails": [
{
"emailLabel": "Personal",
"emailAddress": "massir@collect.com"
}
],
"collectorAddresses": [
{
"addressLabel": "Home",
"careOf": "",
"houseNum": "2",
"streetName": "Collecting Street",
"unit": "",
"city": "Anywhere",
"state": "US",
"zip": "11111",
"country": "United States"
}
]
}