Learn about our newest features and enhancements!
Prod Public Web Api Samples

Public Web APIs

Opt a contact into a specific list

POST v/1/Rest/Public/{Domain}/Campaigns/ListOptIn

See the output for List Signup sample code

        var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/Campaigns/ListOptIn";

                                    var data = {
                                    "ClientId": 1,
                                    "OptInListIds": [28270],
                                    "Contact": {
                                    "PersonInfo": { "FirstName": "Joe", "LastName": "Smith" },
                                    "EmailAddress": "joe.smith@charityengine.net"
                                    }};

                                    $.ajax({
                                    type: "POST",
                                    url: url,
                                    data: JSON.stringify(data),
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Perform a payment

POST v/1/Rest/Public/{Domain}/Donations/WebPayment

See the output for Perform a payment sample code

                                    var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/Donations/WebPayment";

                                    var data = {
                                      "Form_Id": 8973,
                                      "Amount": 19.00,
                                      "TaxDeductibleAmount": 19.00,
                                      "Contact": {
                                        "PersonInfo": {
                                          "FirstName": "Joe",
                                          "LastName": "Smith",
                                        },
                                        "AddressStreet1": "8200 Greensboro drive",
                                        "AddressCity": "McLean",
                                        "AddressState": "VA",
                                        "AddressPostalCode": "22102",
                                        "AddressCountry": "US",
                                        "EmailAddress": "joe.smith@charityengine.net",
                                        "MailOptIn": true,
                                        "EmailOptIn": true,
                                        "PhoneOptIn": false,
                                        "FaxOptIn": false,
                                        "SmsOptIn": false,
                                      },
                                      "CreditCardInfo": {
                                        "CardNumber": "4111111111111111",
                                        "ExpirationMonth": "12",
                                        "ExpirationYear": "2025",
                                        "NameOnCard": "Joe Smith",
                                      },
                                      "PaymentBillingInfo": {
                                        "AddressStreet1": "8200 Greensboro drive",
                                        "AddressCity": "McLean",
                                        "AddressStateProvince": "VA",
                                        "AddressPostalCode": "22102",
                                        "AddressCountry": "US",
                                      },
                                      "Attribution": {
                                        "PeerToPeerMicrosite_Id": 2138,
                                        "PeerToPeerTeam_Id": 88275,
                                        "PeerToPeerPage_Id": 260749,
                                        "CustomCodes": {
                                        },
                                      },
                                      "MakeAnonymous": false,
                                      "HideAmountOnline": true,
                                    }

                                    $.ajax({
                                    type: "POST",
                                    url: url,
                                    data: JSON.stringify(data),
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Get information for the specified event

GET v/1/Rest/Public/{Domain}/Events/{id}

See the output for Get information for the specified event sample code

                                    var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/Events/5352";

                                    $.ajax({
                                    type: "GET",
                                    url: url,
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Search for events based on the supplied parameters

POST v/1/Rest/Public/{Domain}/Events

See the output for Search for events based on the supplied parameters sample code

        var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/Events/";

                                    var todate = new Date("01/01/2017");
                                    var fromdate = new Date("12/31/2020");

                                    var data = {
                                      "Type_Id": 2,
                                      "Active": true,
                                      "DateCreatedFrom" : '\/Date(' + todate.getTime() + '-0000)\/',
                                      "DateCreatedTo" :'\/Date(' + fromdate.getTime() + '-0000)\/',
                                      "PageStartFrom": 1,
                                      "PageSize": 0,
                                      "OrderByField": "startDate",
                                      "OrderByDirection": 1
                                    }

                                    $.ajax({
                                    type: "POST",
                                    url: url,
                                    data: JSON.stringify(data),
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Get a list of donations for the specified microsite

GET v/1/Rest/Public/{Domain}/PeerToPeer/Donations/{microsite_id}

See the output for Get a list of donations for the specified microsite sample code

                                    var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/PeerToPeer/Donations/2138/";

                                    $.ajax({
                                    type: "GET",
                                    url: url,
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Search for P2P microsite donations based on the supplied set of parameters

POST v/1/Rest/Public/{Domain}/PeerToPeer/Donations

See the output for Search for P2P microsite donations based on the supplied set of parameters sample code

     var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/PeerToPeer/Donations";

                                    var todate = new Date("01/01/2018");
                                    var fromdate = new Date("12/31/2018");

                                    var data = {
                                      "Microsite_Id": 2138,
                                      "DateCreatedFrom" : '\/Date(' + todate.getTime() + '-0000)\/',
                                      "DateCreatedTo" :'\/Date(' + fromdate.getTime() + '-0000)\/',
                                      "PageStartFrom": 1,
                                      "PageSize": 0,
                                      "OrderByField": "lastName",
                                      "OrderByDirection": 1

                                    };

                                    $.ajax({
                                    type: "POST",
                                    url: url,
                                    data: JSON.stringify(data),
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Search for pages within a P2P Microsite based on the supplied set of parameters

POST v/1/Rest/Public/{Domain}/PeerToPeer/Pages

See the output for Get a list of pages for the specified P2P microsite sample code

      var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/PeerToPeer/Pages/2138/";

                                    $.ajax({
                                    type: "GET",
                                    url: url,
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Get a list of pages for the specified P2P microsite

GET v/1/Rest/Public/{Domain}/PeerToPeer/Pages/{microsite_id}

See the output for search for pages within a P2P Microsite based on the supplied set of parameters sample code

     var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/PeerToPeer/Pages";

                                    var todate = new Date("01/01/2018");
                                    var fromdate = new Date("12/31/2018");

                                    var data = {
                                      "Microsite_Id": 2138,
                                      "DateCreatedFrom" : '\/Date(' + todate.getTime() + '-0000)\/',
                                      "DateCreatedTo" :'\/Date(' + fromdate.getTime() + '-0000)\/',
                                      "PageStartFrom": 1,
                                      "PageSize": 0,
                                      "OrderByField":"invFundraisingPortal_id",
                                      "OrderByDirection": 1
                                    };

                                    $.ajax({
                                    type: "POST",
                                    url: url,
                                    data: JSON.stringify(data),
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Search for team members within a P2P microsite based on the supplied set of parameters

POST v/1/Rest/Public/{Domain}/PeerToPeer/Team/Members

See the output for Search for team members within a P2P microsite based on the supplied set of parameters sample code

   var url = "https://webapi.charityengine.net/v/1/Rest/Public/CE/PeerToPeer/Team/Members";

                                    var data = {
                                      "Team_Id": 88275,
                                      "PageStartFrom": 1,
                                      "PageSize": 0,
                                      "OrderByField": "lastName",
                                      "OrderByDirection": 1
                                    };

                                    $.ajax({
                                    type: "POST",
                                    url: url,
                                    data: JSON.stringify(data),
                                    success: function(response){console.log(JSON.stringify(response));},
                                    error: function(err) {console.log(JSON.stringify(err));},
                                    contentType: "application/json",
                                    dataType: "json"
                                    });
                                

Powered by Powered By CharityEngine