The Evergiving API¶
Introduction¶
Welcome to the official Evergiving API documentation. Our API facilitates robust fundraising and donor management capabilities, enabling seamless integration into your applications.
Authentication Schemes¶
Bearer Token Authentication¶
This is the only supported authentication scheme.
To ensure secure access to the Evergiving API, we employ Bearer Token Authentication. This method requires you to include a JSON Web Token (JWT) in the header of your HTTP requests. The JWT is a secure way to encode authorization information that you must obtain from Evergiving.
Usage:¶
When making API requests, you must include the JWT in the HTTP Authorization
header as follows:
Authorization: Bearer <Your_JWT>
Replace <Your_JWT>
with the token provided to you. This token uniquely identifies and authenticates your application's requests.
Test Server¶
For development and testing purposes, Evergiving provides access to a staging environment. This allows you to test your integration without affecting live data.
Accessing the Staging Environment:¶
If you have been supplied with a JSON Web Token for the Waysact staging environment, you can use it to test your code outside of production.
In this case, replace the production hostname waysact.me
by the staging hostname, api.waysactstaging.com
Note
All API requests, whether directed to the production or staging environments, must use the https
protocol. Requests sent over http
will not be processed directly but will instead receive a 301 Moved Permanently
response, indicating that the request should be resent using https
.
Reference¶
Create Lead¶
This endpoint allows you to create new lead records to be used in the call center.
The endpoint supports the creation of one lead record per request.
This action returns a 201 status code along with a JSON body when successful; a 401 status code when authentication failed; 422 when you supplied an invalid attribute such as date or amount, check the errors key in the response for more details.
POST https://<URL>/api/v4/leads
Attribute | Type | Example | Description |
---|---|---|---|
duplicate_action |
string | Doe | Either error (default) or insert |
data |
object | ||
country |
string* | AU | ISO 3166-1-formatted country code |
supporter_firstname |
string* | John | Supporter first name |
supporter_lastname |
string* | Doe | Supporter last name |
lead_import_label |
string* | Example Lead Import | Lead Import label. The lead will be assigned to any active lead import with a matching label else a new record will be created. |
external_reference_number |
string | 100000000 | |
supporter_title |
string | Ms | |
supporter_email |
string | john@doe.com | |
phone |
string | 02 5551 5678 | Will be formatted based on the provided country |
mob_phone |
string | 0411111111 | Will be formatted based on the provided country |
work_phone |
string | 02 5551 5678 | Will be formatted based on the provided country |
supporter_gender |
string | female | Either male, female or other. |
supporter_dob |
string | 2020-01-01 |
YYYY-MM-DD |
private_notes |
string | Example Note | |
validation_detail_comment |
string | Example Wrap Note | |
address1 |
string | 4 Roses Road | |
city |
string | Sydney | |
state |
string | NSW | |
postcode |
string | 2000 | |
campaign_name |
string | Example Campaign | Will only associate the lead to the campaign if there is an existing campaign with a matching name |
last_recurring_payment_amount |
number | 20.0 | Expressed as a decimal |
last_recurring_payment_currency |
string | AUD | ISO 4217 currency code |
last_recurring_payment_date |
string | 2020-01-01 |
YYYY-MM-DD |
last_recurring_payment_frequency |
string | weekly | Available options: weekly, twoweekly, fortnightly, fourweekly, monthly, quarterly, halfyearly, yearly, annual, annually |
last_recurring_payment_payment_method |
string | card | Available options: card, direct debit, bank, wallet, paypal, other |
last_recurring_payment_payment_method_other_type |
string | anything | |
last_recurring_payment_failed |
string | true | Available options: true, yes, false, no |
last_recurring_payment_status |
string | Cancelled | |
last_recurring_payment_failed_reason |
string | CANCELLED | |
total_number_of_recurring_payments_made |
number | 5 | Positive integer |
sum_of_recurring_payments_made |
number | 2000.0 | Expressed as a decimal |
sum_of_recurring_payments_made_currency |
string | AUD | ISO 4217 currency code |
highest_recurring_payment_made |
number | 50.0 | Expressed as a decimal |
highest_recurring_payment_made_currency |
string | AUD | ISO 4217 currency code |
last_single_payment_amount |
number | 20.0 | Expressed as a decimal |
last_single_payment_currency |
string | AUD | ISO 4217 currency code |
last_single_payment_date |
string | 2020-01-01 |
YYYY-MM-DD |
last_single_payment_payment_method |
string | card | Available options: card, direct debit, bank, wallet, paypal, other |
last_single_payment_payment_method_other_type |
string | anything | |
last_single_payment_failed |
string | false | Available options: true, yes, false, no |
last_single_payment_status |
string | anything | |
last_single_payment_failed_reason |
string | Incorrect card details | |
total_number_of_single_payments_made |
number | 10 | |
sum_of_single_payments_made |
number | 50.0 | Expressed as a decimal |
sum_of_single_payments_made_currency |
string | AUD | ISO 4217 currency code |
highest_single_payment_made |
number | 20.0 | Expressed as a decimal |
highest_single_payment_made_currency |
string | AUD | ISO 4217 currency code |
previous_upgrade_date |
string | 2020-01-01 |
YYYY-MM-DD |
previous_upgrade_amount |
number | 2.5 | |
previous_upgrade_amount_currency |
string | AUD | ISO 4217 currency code |
last_contact_date |
string | 2020-12-23 |
YYYY-MM-DD |
last_contact_method |
string | telephone | |
product |
string | Example Product Name | |
child_sponsored |
string | true | Available options: true, yes, false, no |
source |
string | Example Source | |
source_campaign_name |
string | Example Campaign Name | |
source_date |
string | 2020-01-01 |
YYYY-MM-DD |
source_time |
string | 3:30pm | |
preference |
string | Example String | |
interest |
string | Example String | |
conversation_topic |
string | Example String | |
activity |
string | Example String | |
volunteered |
string | true | Available options: true, yes, false, no |
volunteered_type |
string | Festival steward | |
petition_signed |
string | true | Available options: true, yes, false, no |
petition_type |
string | ||
appeal |
string | true | Available options: true, yes, false, no |
appeal_type |
string | Example String | |
event_participant |
string | true | Available options: true, yes, false, no |
event_participant_type |
string | Example String | |
campaigner |
string | true | Available options: true, yes, false, no |
supporter_timezone |
string | Australia/Sydney | |
start_date |
string | 2020-12-23 |
YYYY-MM-DD |
validation_outcome_name |
string | Approved | Must match existing records by name |
validation_detail_by |
string | agent@example.app | Must match a user's username |
validation_detail_date |
string | 2020-12-23 |
YYYY-MM-DD |
call_datetime |
datetime | 2021-07-21T02:24:12+00:00 |
|
call_outcome |
string | Validated |
Must match an existing final call outcome label |
call_username |
string | agent@example.app | Must match a user's username |
final_call_outcome |
string | Incorrect Number |
Must match an existing final call outcome label |
An asterisk (*) next to the type indicates that the attribute is required.
Request
Headers | |
---|---|
1 2 3 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
JSON Schema | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
Response 201
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
JSON Schema | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
Response 401
Headers | |
---|---|
1 |
|
Response 422
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 |
|
Update Lead¶
This endpoint allows you to update an existing lead record to be used in the call center.
The endpoint supports the updating of one lead record per request.
This action returns a 200 status code along with a JSON body when successful; a 401 status code when authentication failed; 422 when you supplied an invalid attribute such as date or amount, check the errors key in the response for more details.
PATCH https://<URL>/api/v4/leads/<id>
Attribute | Type | Example | Description |
---|---|---|---|
data |
object | ||
country |
string* | AU | ISO 3166-1-formatted country code |
supporter_firstname |
string* | John | Supporter first name |
supporter_lastname |
string* | Doe | Supporter last name |
lead_import_label |
string* | Example Lead Import | Lead Import label. The lead will be assigned to any active lead import with a matching label else a new record will be created. |
external_reference_number |
string | 100000000 | |
supporter_title |
string | Ms | |
supporter_email |
string | john@doe.com | |
phone |
string | 02 5551 5678 | Will be formatted based on the provided country |
mob_phone |
string | 0411111111 | Will be formatted based on the provided country |
work_phone |
string | 02 5551 5678 | Will be formatted based on the provided country |
supporter_gender |
string | female | Either male, female or other. |
supporter_dob |
string | 2020-01-01 |
YYYY-MM-DD |
private_notes |
string | Example Note | |
validation_detail_comment |
string | Example Wrap Note | |
address1 |
string | 4 Roses Road | |
city |
string | Sydney | |
state |
string | NSW | |
postcode |
string | 2000 | |
campaign_name |
string | Example Campaign | Will only associate the lead to the campaign if there is an existing campaign with a matching name |
last_recurring_payment_amount |
number | 20.0 |
Expressed as a decimal |
last_recurring_payment_currency |
string | AUD | ISO 4217 currency code |
last_recurring_payment_date |
string | 2020-01-01 |
YYYY-MM-DD |
last_recurring_payment_frequency |
string | weekly | Available options: weekly, twoweekly, fortnightly, fourweekly, monthly, quarterly, halfyearly, yearly, annual, annually |
last_recurring_payment_payment_method |
string | card | Available options: card, direct debit, bank, wallet, paypal, other |
last_recurring_payment_payment_method_other_type |
string | anything | |
last_recurring_payment_failed |
string | true | Available options: true, yes, false, no |
last_recurring_payment_status |
string | Cancelled | |
last_recurring_payment_failed_reason |
string | CANCELLED | |
total_number_of_recurring_payments_made |
number | 5 | Positive integer |
sum_of_recurring_payments_made |
number | 2000.0 | Expressed as a decimal |
sum_of_recurring_payments_made_currency |
string | AUD | ISO 4217 currency code |
highest_recurring_payment_made |
number | 50.0 | Expressed as a decimal |
highest_recurring_payment_made_currency |
string | AUD | ISO 4217 currency code |
last_single_payment_amount |
number | 20.0 | Expressed as a decimal |
last_single_payment_currency |
string | AUD | ISO 4217 currency code |
last_single_payment_date |
string | 2020-01-01 |
YYYY-MM-DD |
last_single_payment_payment_method |
string | card | Available options: card, direct debit, bank, wallet, paypal, other |
last_single_payment_payment_method_other_type |
string | anything | |
last_single_payment_failed |
string | false | Available options: true, yes, false, no |
last_single_payment_status |
string | anything | |
last_single_payment_failed_reason |
string | Incorrect card details | |
total_number_of_single_payments_made |
number | 10 | |
sum_of_single_payments_made |
number | 50.0 | Expressed as a decimal |
sum_of_single_payments_made_currency |
string | AUD | ISO 4217 currency code |
highest_single_payment_made |
number | 20.0 | Expressed as a decimal |
highest_single_payment_made_currency |
string | AUD | ISO 4217 currency code |
previous_upgrade_date |
string | 2020-01-01 |
YYYY-MM-DD |
previous_upgrade_amount |
number | 2.5 | |
previous_upgrade_amount_currency |
string | AUD | ISO 4217 currency code |
last_contact_date |
string | 2020-12-23 |
YYYY-MM-DD |
last_contact_method |
string | telephone | |
product |
string | Example Product Name | |
child_sponsored |
string | true | Available options: true, yes, false, no |
source |
string | Example Source | |
source_campaign_name |
string | Example Campaign Name | |
source_date |
string | 2020-01-01 |
YYYY-MM-DD |
source_time |
string | 3:30pm | |
preference |
string | Example String | |
interest |
string | Example String | |
conversation_topic |
string | Example String | |
activity |
string | Example String | |
volunteered |
string | true | Available options: true, yes, false, no |
volunteered_type |
string | Festival steward | |
petition_signed |
string | true | Available options: true, yes, false, no |
petition_type |
string | ||
appeal |
string | true | Available options: true, yes, false, no |
appeal_type |
string | Example String | |
event_participant |
string | true | Available options: true, yes, false, no |
event_participant_type |
string | Example String | |
campaigner |
string | true | Available options: true, yes, false, no |
supporter_timezone |
string | Australia/Sydney | |
start_date |
string | 2020-12-23 |
YYYY-MM-DD |
validation_outcome_name |
string | Approved | Must match existing records by name |
validation_detail_by |
string | agent@example.app | Must match a user's username |
validation_detail_date |
string | 2020-12-23 |
YYYY-MM-DD |
call_datetime |
datetime | 2021-07-21T02:24:12+00:00 |
|
call_outcome |
string | Validated |
Must match an existing final call outcome label |
call_username |
string | agent@example.app | Must match a user's username |
final_call_outcome |
string | Incorrect Number |
Must match an existing final call outcome label |
An asterisk (*) next to the type indicates that the attribute is required.
Request
Headers | |
---|---|
1 2 3 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
JSON Schema | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
- Response 200
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
JSON Schema | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
Response 401
Headers | |
---|---|
1 |
|
Response 422
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 |
|
Add a Payment to a Pledge¶
You can create a new payment record in a given pledge, for example because the payment was processed on your side and you wish to include the record on the Waysact side.
Currently there can be only one payment per calendar day per pledge.
This action returns a 201 status code along with a JSON body when successful;
a 401 status code when authentication failed; 404 when there is no pledge with the given ID associated with your account; and 422 when you supplied an invalid date or amount, or when there already is a payment for the given pledge on the given date.
POST https://<URL>/api/v4/pledges/<pledge_id>/payments
Parameters | Type | Example | Description |
---|---|---|---|
pledge_id |
number | 1039142 | ID of the pledge for which to create the payment |
Attribute | Type | Example | Description |
---|---|---|---|
payment_date |
string* | "2016-08-05" |
ISO-8601-formatted calendar date on which the payment was made |
payment_amount |
number* | 29.50 | Payment amount in the campaign currency, a non-zero number with the fractional part denoting currency subdivision such as cents. Negative denotes refunds. |
An asterisk (*) next to the type indicates that the attribute is required.
Request¶
Headers | |
---|---|
1 2 |
|
Body | |
---|---|
1 2 3 4 |
|
JSON Schema | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
Response 201
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 4 5 6 7 |
|
JSON Schema | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
|
Response 401
Headers | |
---|---|
1 |
|
Response 404
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 |
|
Response 422
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 4 |
|
Pledge Export¶
This endpoint lets you fetch a batch of pledges (i.e. supporter data) belonging to a campaign. The pledge contents are determined by the specified schema.
This action returns a 200 status code along with a JSON body when successful (even when there are no pledges found); a 401 status code when authentication failed; 403 when you are not permitted to access the given schema or campaign; and 429 when your request was rejected due to rate-limiting.
Retrieving Pledges One Batch at a Time¶
Each response only provides a limited number of pledges. If there are more pledges ready for retrieval, the response will have the next_batch_available_now
attribute set to a truthy value in the top-level JSON object. To retrieve the next batch, take the next_batch_after_version
attribute from the top-level JSON object and pass it as the after_version
query parameter in the next request.
To retrieve the next batch of new pledges only, using their immutable identifier, use the after_pledge_id
query parameter instead. The response will contain a next_batch_after_pledge_id
attribute in the top-level JSON object, which you can pass in the after_pledge_id
in the next request.
Handling Updated Pledges¶
A batch of pledges may contain pledges that you have fetched before, if these pledges have been updated on the Waysact side since you've last fetched them. In other words, your system should not assume that a given pledge is only retrieved once. Instead, your system should perform an "upsert" operation by checking whether an object for the pledge already exists in your system and if so, update that object instead of creating a new one.
The JSON response data contains an id
attribute for every pledge which you can use to uniquely identify a pledge. This attribute is present regardless of which schema is in use.
Identifying Pledge Updates¶
Please note that if a pledge that you've seen before reappears in a batch, this is no guarantee that any of the pledge fields as seen through the lens of your schema will have changed. If you want to be sure that pledge fields have changed before taking further action, such as notifying users of the update, make sure to deep compare the pledge contents to your existing pledge object.
Retrieving Pledges Using ID¶
If your application logic does not require you to be informed of updates to pledges, you can use the after_pledge_id
parameter to retrieve pledges based on their immutable identifier (also known as pledge_id
).
Note
The use of after_pledge_id
is mutually exclusive to after_version
, you can only call the API with one or the other (or none, as they are optional parameters). The response will contain an element next_batch_after_pledge_id
in the top-level JSON object, which you can use in a similar manner as the version discussed above to retrieve additional pledges.
Picking up Where You Left off¶
You are advised to store the next_batch_after_version
or next_batch_after_pledge_id
value in between requests even if you're not going to make the next request immediately, for example by storing it in a database. This lets you avoid re-retrieving pledges that you have already fetched before.
Handling Rate Limiting Gracefully¶
This endpoint may be subject to rate limiting. When the rate limit is exceeded, the endpoint will return the HTTP status code 429 Too Many Requests with the Retry-After header set. Your system must handle this response correctly by waiting for the given amount of time before retrying the request.
`GET https://
Parameter | Type | Example | Description |
---|---|---|---|
campaign_id |
number* | 513 | ID of the campaign for which to retrieve pledges. Waysact staff will provide you with this value. |
schema_id |
number* | 1451 | ID of the schema to use for formatting pledge data. Waysact staff will provide you with this value. |
after_version |
number | 5911924 | Only retrieve pledges with a version number higher than this. If absent, retrieve the very first batch of pledges. |
after_pledge_id |
number | 440411 | Only retrieve pledges with an id higher than this. If absent, retrieve the very first batch of pledges. Mutually exclusive to after_version . |
An asterisk (*) next to the type indicates that the attribute is required.
Request
Headers | |
---|---|
1 2 |
|
Response 401
Headers | |
---|---|
1 |
|
Response 403
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 |
|
Response 429
Headers | |
---|---|
1 2 |
|
Body | |
---|---|
1 |
|
Response 200
Headers | |
---|---|
1 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Create Team¶
This endpoint allows you to set up a team of fundraisers (Field) or Agents (Call Center), on a specific day.
This action returns a 201 status code along with a JSON body when successful; a 401 status code when authentication failed; 422 when you supplied an invalid attribute such as date or amount, check the errors key in the response for more details.
POST https://<URL>/api/v1/teams
Attribute | Type | Example | Description |
---|---|---|---|
data.team_type |
string* | CALL_CENTER/FIELD |
|
data.time_zone |
string* | Australia/Sydney |
|
data.active_on |
string* | 2022-11-01 |
|
data.auto_dial |
boolean | true | Defaults to false (call center teams) |
data.default_twilio_phone_number |
string | 425 555 0123 | The default Twilio phone number to use, a null value will result in the least used phone number being selected (call center teams) |
data.allow_inbound_calls |
boolean | true | Defaults to true (call center teams) |
data.campaign_id |
number* | 45 | The id of the campaign to use for unassigned lead records |
data.allow_calling_across_all_campaigns |
boolean | true | Defaults to false |
data.lead_id |
number* | 32 | The id of the agent who is considered the team leader |
data.campaign_manager_id |
number* | 22 | The id of the fundraiser who is considered the campaign manager |
data.call_lists |
array* | [{ id: 116, "weight": 1, "tier": 1 }] | |
data.members |
array* | [{ "user_id": 20, "hours_to_work": 6 }, { "user_id": 25, "hours_to_work": 6 }] | |
data.event_ids |
array | [10, 12] | Ids of the method of fundraising records to associate with the team |
data.location_ids |
array | [40, 41] | Ids of the locations to associate with the team |
data.territory_ids |
array | [1] | Ids of the territories to associate with the team |
An asterisk (*) next to the type indicates that the attribute is required.
Request
Headers | |
---|---|
1 2 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|
Response 201
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
Create Agent or Fundraiser¶
This endpoint allows you to create new user record.
This action returns a 201 status code along with a JSON body when successful; a 401 status code when authentication failed; 422 when you supplied an invalid attribute such as date or amount, check the errors key in the response for more details.
POST https://<URL>/api/v1/users
Attribute | Type | Example | Description |
---|---|---|---|
first_name |
string* | John | |
last_name |
string* | Doe | |
username |
string* | username | The account domain will be appended unless one is provided |
email |
string* | jon.doe@example.com | |
password |
string* | nnGmZ*x505$Y | Must be at least six characters |
phone |
string* | 04111111 | |
office_id |
string | 50 | The id of the office to associate the user with |
role |
string* | "agent" | Either "agent" or "fundraiser" |
user_code |
string | 9101112 | The external user code for the user has optional, custom regex validation, and if the code does not match it will return 422: Code is invalid, please check with your Manager and enter a code in the correct format |
An asterisk (*) next to the type indicates that the attribute is required.
Request
Headers | |
---|---|
1 2 |
|
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
Response 201
Body | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Retire Agent or Fundraiser¶
This endpoint allows you to retire an Agent or Fundraiser user.
This action returns a 204 status code when successful; a 401 status code when authentication failed; 422 when you supplied an invalid attribute such as date or amount, check the errors key in the response for more details.
DELETE https://<URL>/api/v1/users/id
Request
Headers | |
---|---|
1 2 3 |
|
Response 204
Headers | |
---|---|
1 |
|