Skip to content

Evergiving API Reference

The Evergiving API facilitates robust fundraising and donor management capabilities, enabling seamless integration into your applications.

Base URL

https://api.evergiving.com/api/

Authentication

The API uses Bearer Token Authentication to ensure secure access. 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.

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.

Note

All API requests, 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.

Endpoints

Leads

Create Lead

Endpoint

POST /v4/leads

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;
  • 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.
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 |
| address2 | string | Toongabbie |

| 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 | facebook | |
| 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

json title="Headers" linenums="1"
Content-Type:application/json
Accept:application/json
Authorization:Bearer <JSON Web Token here>
json title="Body" linenums="1"
{
    "data": {
      "supporter_title": "Mr",
      "supporter_firstname": "John",
      "supporter_lastname": "Doe",
      "supporter_email": "john@doe.com",
      "country": "AU",
      "lead_import_label": "December Import"
    }
}
json title="JSON Schema" linenums="1"
{
    "data": {
        "supporter_title": {
            "type": "string"
        },
        "supporter_firstname": {
            "type": "string"
        },
        "supporter_lastname": {
            "type": "string"
        },
        "supporter_email": {
            "type": "string"
        },
        "country": {
            "type": "string"
        },
        "lead_import_label": {
            "type": "string"
        }
    },
    "required": ["supporter_firstname", "supporter_lastname", "country", "lead_import_label"]
}

Response 201

json title="Headers" linenums="1"
Content-Type: application/json
json title="Body" linenums="1"
            {
                "data": {
                    "supporter_title": "Mr",
                    "supporter_firstname": "John",
                    "supporter_lastname": "Doe",
                    "supporter_email": "john@doe.com",
                    "country": "AU",
                    "lead_import_label": "December Import",
                    "errors": []
                }
            }
json title="JSON Schema" linenums="1"
{
                "data": {
                    "supporter_title": {
                        "type": "string"
                    },
                    "supporter_firstname": {
                        "type": "string"
                    },
                    "supporter_lastname": {
                        "type": "string"
                    },
                    "supporter_email": {
                        "type": "string"
                    },
                    "country": {
                        "type": "string"
                    },
                    "lead_import_label": {
                        "type": "string"
                    },
                    "errors": [
                    ]
                }
            }

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Response 422

json title="Headers" linenums="1"
Content-Type: application/json
json title="Body" linenums="1"
            {
                "data": {
                    "errors": {
                        "supporter_firstname": ["required"],
                        "country": ["required"]
                    }
                },
            }

Update Lead

Endpoint

PATCH /v4/leads/<id>

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;
  • 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.
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 |

| address2 | string | Toongabbie | |
| 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 | facebook | |
| 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

json title="Headers" linenums="1"
Content-Type: application/json
Accept: application/json
Authorization: Bearer <JSON Web Token here>
json title="Body" linenums="1"
{
    "data": {
      "supporter_title": "Mr",
      "supporter_firstname": "John",
      "supporter_lastname": "Doe",
      "supporter_email": "john@doe.com",
      "country": "AU",
      "lead_import_label": "December Import"
    }
}
title="JSON Schema" linenums="1"
{
    "data": {
        "supporter_title": {
            "type": "string"
        },
        "supporter_firstname": {
            "type": "string"
        },
        "supporter_lastname": {
            "type": "string"
        },
        "supporter_email": {
            "type": "string"
        },
        "country": {
            "type": "string"
        },
        "lead_import_label": {
            "type": "string"
        }
    },
    "required": ["supporter_firstname", "supporter_lastname", "country", "lead_import_label"]
}
  • Response 200
json title="Headers" linenums="1"
Authorization: application/json
json title="Body" linenums="1"
{
    "data": {
        "supporter_title": "Mr",
        "supporter_firstname": "John",
        "supporter_lastname": "Doe",
        "supporter_email": "john@doe.com",
        "country": "AU",
        "lead_import_label": "December Import",
        "errors": []
    }
}
title="JSON Schema" linenums="1"
{
    "data": {
        "supporter_title": {
            "type": "string"
        },
        "supporter_firstname": {
            "type": "string"
        },
        "supporter_lastname": {
            "type": "string"
        },
        "supporter_email": {
            "type": "string"
        },
        "country": {
            "type": "string"
        },
        "lead_import_label": {
            "type": "string"
        },
        "errors": [
        ]
    }
}

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Response 422

json title="Headers" linenums="1"
Authorization: application/json
json title="Body" linenums="1"
{
    "data": {
        "errors": {
            "supporter_firstname": ["required"],
            "country": ["required"]
        }
    },
}

Pledges

Add Payment to Pledge

Endpoint

POST /v4/pledges/<pledge_id>/payments

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;
  • 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.
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

json title="Headers" linenums="1"
Content-Type: application/json
Authorization: Bearer <JSON Web Token here>
json title="Body" linenums="1"
{
    "payment_date": "2016-08-05",
    "payment_amount": 29.50
}
title="JSON Schema" linenums="1"
{
    "type": "object",
    "properties": {
        "payment_date": {
            "type": "string",
            "pattern": "\d{4}-\d{2}-\d{2}",
        },
        "payment_amount": {
            "type": "number",
        }
    },
    "required": ["payment_date", "payment_amount"]
}

Response 201

json title="Headers" linenums="1"
Authorization: application/json
json title="Body" linenums="1"
{
    "data": {
        "id": 601492,
        "payment_date": "2018-08-05",
        "payment_amount": 29.50
    }
}
title="JSON Schema" linenums="1"
{
    "type": "object",
    "properties": {
        "data": {
            "type": "object",
            "properties": {
                "id": {
                    "description": "A unique identifier of the created payment record"
                },
                "payment_date": {
                    "type": "string",
                    "pattern": "\d{4}-\d{2}-\d{2}",
                },
                "payment_amount": {
                    "type": "number",
                }
            }
            "required": ["id", "payment_date", "payment_amount"]
        }
    },
    "required": ["data"]
}

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Response 404

json title="Headers" linenums="1"
Authorization: application/json
json title="Body" linenums="1"
{
    "exception": "Record not found."
}

Response 422

json title="Headers" linenums="1"
Authorization: application/json
json title="Body" linenums="1"
{
    "payment_amount": ["Payment amount cannot be zero"],
    "payment_date": ["Payment already exists on this day"]
}

Export Pledge

Endpoint

GET /v4/pledges/

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)
  • 401 status code when authentication failed
  • 403 when you are not permitted to access the given schema or campaign
  • 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.

Example

GET https://api.evergiving.com/api/v4/pledges/next_batch?campaign_id=513&schema_id=1451&after_version=5911924&after_pledge_id=440411

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

json title="Headers" linenums="1"
Accept: application/json
Authorization: Bearer <JSON Web Token here>

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Response 403

json title="Headers" linenums="1"
Content-Type: application/json
json title="Body" linenums="1"
{ errors: [ { message: "" } ] }

Response 429

json title="Headers" linenums="1"
Content-Type: text/plain
Retry-After: 300
json title="Body" linenums="1"
Rate-limiting in effect, please try again later

Response 200

json title="Headers" linenums="1"
Content-Type: application/json
json title="Body" linenums="1"
{
    "next_batch_available_now": false,
    "next_batch_after_version": 5911924,
    "pledges": [
         {
             "id": 441915,
             "firstName": "Andrea",
             "lastName": "Anderson"
         },
         {
             "id": 441958,
             "firstName": "Brian",
             "lastName": "Buckland"
         },
         {
             "id": 440412,
             "firstName": "Claire",
             "lastName": "Chapman"
         }
    ]
}

Teams

Create Team

Endpoint

POST /v1/teams

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
  • 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.
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

json title="Headers" linenums="1"
Accept: application/json
Authorization: Bearer <JSON Web Token here>
json title="Body" linenums="1"
{
    "data": {
      "auto_dial": true,
      "campaign_id": 1899,
      "active_on": "2022-11-02",
      "call_lists": [
          {
              "id": 116,
              "weight": 1,
              "tier": 1
          }
      ],
      "members": [
          {
              "user_id": 102505,
              "hours_to_work": "7.5",
          }
      ],
      "allow_inbound_calls": true,
      "team_type": "CALL_CENTER",
      "lead_id": 102505,
      "time_zone": "Australia/Sydney"
  }
}

Response 201

json title="Body" linenums="1"
 {
      "data": {
        "id": 840303,
        "name": "Agent A",
        "status": "ACTIVE",
        "created_at": "2022-11-02T00:41:01.835Z",
        "updated_at": "2022-11-02T00:41:01.835Z",
        "team_type": "CALL_CENTER",
        "time_zone": "Australia/Sydney",
        "respawn": false,
        "children_active_on": [],
        "interaction_category_id": null,
        "campaign_manager_id": null,
        "campaign_id": 1899,
        "parent_id": null,
        "lead_id": 102505,
        "lead_full_name": "Agent A",
        "campaign_manager_full_name": null,
        "date": "2022-11-02",
        "office": { "id": 1102, "name": "NAN test", "data": [] },
        "auto_dial": true,
        "allow_calling_across_all_campaigns": false,
        "allow_inbound_calls": true,
        "default_twilio_phone_number": "least_used",
        "call_lists": [{ "id": 116, "weight": 1.0, "tier": 1 }],
        "events": [],
        "locations": [],
        "members": [
          {
            "user_id": 102505,
            "user_full_name": "Agent A",
            "hours_to_work": "7.5",
            "status": "ACTIVE",
            "allocator_id": null,
            "large_avatar_url": null
          }
        ],
        "territories": []
      }
    }

Users

Create Agent or Fundraiser

Endpoint

POST /v1/users

This endpoint allows you to create new user record.

This action returns a:

  • 201 status code along with a JSON body when successful
  • 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.
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

json title="Headers" linenums="1"
Accept: application/json
Authorization: Bearer <JSON Web Token here>
json title="Body" linenums="1"
{
    "data": {
      "first_name": "Example",
      "last_name": "Agent",
      "username": "example@agent.com",
      "email": "example@agent.com",
      "phone": "04111111",
      "role": "agent"
  }
}

Response 201

json title="Body" linenums="1"
{
  "data": {
    "account_id": 39610,
    "avatar": {
      "url": null,
      "large": { "url": null },
      "display": { "url": null }
    },
    "created_at": "2023-02-10T03:30:11.386Z",
    "email": "example@agent.com",
    "first_name": "Example",
    "id": 24574,
    "last_name": "Agent",
    "user_code": null,
    "username": "example@agent.com",
    "roles": [{ "name": "agent" }]
  },
  "errors": {}
}

Retire Agent or Fundraiser

Endpoint

DELETE /v1/users/id

This endpoint allows you to retire an Agent or Fundraiser user.

This action returns a:

  • 204 status code when successful
  • 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.

Request

json title="Headers" linenums="1"
Content-Type: application/json
Accept: application/json
Authorization: Bearer <JSON Web Token here>

Response 204

json title="Headers" linenums="1"
Content-Type: application/json

Custom Locations

List Custom Locations

Endpoint

GET /v4/accounts/<account_id>/custom_locations

This endpoint lets you retrieve a paginated list of custom locations belonging to your account.

This action returns a:

  • 200 status code along with a JSON body when successful
  • 401 status code when authentication failed
Parameter Type Example Description
account_id number* 39610 ID of the account
offset number 0 Number of records to skip for pagination
limit number 20 Maximum number of records to return
sort string name Field to sort results by
q string Perth Search query to filter results

An asterisk * next to the type indicates that the attribute is required.

Request

json title="Headers" linenums="1"
Accept: application/json
Authorization: Bearer <JSON Web Token here>

Response 200

json title="Headers" linenums="1"
Content-Type: application/json

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Get Custom Location

Endpoint

GET /v4/accounts/<account_id>/custom_locations/<custom_location_id>

This endpoint lets you retrieve a single custom location by its ID.

This action returns a:

  • 200 status code along with a JSON body when successful
  • 401 status code when authentication failed
  • 404 when there is no custom location with the given ID associated with your account
Parameter Type Example Description
account_id number* 39610 ID of the account
custom_location_id number* 101 ID of the custom location to retrieve

An asterisk * next to the type indicates that the attribute is required.

Request

json title="Headers" linenums="1"
Accept: application/json
Authorization: Bearer <JSON Web Token here>

Response 200

json title="Headers" linenums="1"
Content-Type: application/json

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Create Custom Location

Endpoint

POST /v4/accounts/<account_id>/custom_locations

This endpoint allows you to create a new custom location for your account.

This action returns a:

  • 201 status code along with a JSON body when successful
  • 401 status code when authentication failed
  • 422 when you supplied an invalid attribute, check the errors key in the response for more details
Parameter Type Example Description
account_id number* 39610 ID of the account
Attribute Type Example Description
custom_location.name string* Test Location Name of the custom location
custom_location.active boolean true Whether the location is active
custom_location.lat number -31.9505 Latitude coordinate
custom_location.lng number 115.8605 Longitude coordinate
custom_location.address_attributes.address1 string 123 Main Street Street address line 1
custom_location.address_attributes.address2 string Suite 100 Street address line 2
custom_location.address_attributes.city string Perth City
custom_location.address_attributes.state string WA State or region
custom_location.address_attributes.postcode string 6000 Postal code
custom_location.address_attributes.country string Australia Country

An asterisk * next to the type indicates that the attribute is required.

Request

json title="Headers" linenums="1"
Content-Type: application/json
Accept: application/json
Authorization: Bearer <JSON Web Token here>
json title="Body" linenums="1"
{
  "custom_location": {
    "name": "Test Location",
    "active": true,
    "lat": -31.9505,
    "lng": 115.8605,
    "address_attributes": {
      "address1": "123 Main Street",
      "address2": "Suite 100",
      "city": "Perth",
      "state": "WA",
      "postcode": "6000",
      "country": "Australia"
    }
  }
}

Response 201

json title="Headers" linenums="1"
Content-Type: application/json

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Response 422

json title="Headers" linenums="1"
Content-Type: application/json

Update Custom Location

Endpoint

PATCH /v4/accounts/<account_id>/custom_locations/<custom_location_id>

This endpoint allows you to update an existing custom location. You only need to include the attributes you wish to change.

This action returns a:

  • 200 status code along with a JSON body when successful
  • 401 status code when authentication failed
  • 404 when there is no custom location with the given ID associated with your account
  • 422 when you supplied an invalid attribute, check the errors key in the response for more details
Parameter Type Example Description
account_id number* 39610 ID of the account
custom_location_id number* 101 ID of the custom location to update
Attribute Type Example Description
custom_location.name string Partially Updated Location Name of the custom location
custom_location.active boolean false Whether the location is active
custom_location.lat number -31.9505 Latitude coordinate
custom_location.lng number 115.8605 Longitude coordinate
custom_location.address_attributes.address1 string 123 Main Street Street address line 1
custom_location.address_attributes.address2 string Suite 100 Street address line 2
custom_location.address_attributes.city string Perth City
custom_location.address_attributes.state string WA State or region
custom_location.address_attributes.postcode string 6000 Postal code
custom_location.address_attributes.country string Australia Country

Request

json title="Headers" linenums="1"
Content-Type: application/json
Accept: application/json
Authorization: Bearer <JSON Web Token here>
json title="Body" linenums="1"
{
  "custom_location": {
    "name": "Partially Updated Location",
    "active": false
  }
}

Response 200

json title="Headers" linenums="1"
Content-Type: application/json

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"

Response 422

json title="Headers" linenums="1"
Content-Type: application/json

Delete Custom Location

Endpoint

DELETE /v4/accounts/<account_id>/custom_locations/<custom_location_id>

This endpoint allows you to delete a custom location from your account.

This action returns a:

  • 204 status code when successful
  • 401 status code when authentication failed
  • 404 when there is no custom location with the given ID associated with your account
Parameter Type Example Description
account_id number* 39610 ID of the account
custom_location_id number* 101 ID of the custom location to delete

An asterisk * next to the type indicates that the attribute is required.

Request

json title="Headers" linenums="1"
Accept: application/json
Authorization: Bearer <JSON Web Token here>

Response 204

json title="Headers" linenums="1"
Content-Type: application/json

Response 401

json title="Headers" linenums="1"
WWW-Authenticate: Bearer realm="Doorkeeper", error="invalid_token", error_description="The access token is invalid"