Required role: | REGISUserRole |
POST | /DynamicsCRM/Donations | ||
---|---|---|---|
POST | /DynamicsCRM/Donations/{regent_id} |
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using regis.DynamicsCRM.Requests;
using regis.DynamicsCRM.Responses;
namespace regis.DynamicsCRM.Requests
{
public partial class CRMDonationsRequest
{
public virtual int? regent_id { get; set; }
public virtual DateTime? from_date { get; set; }
public virtual DateTime? to_date { get; set; }
public virtual int? start_version_number { get; set; }
public virtual int? end_version_number { get; set; }
public virtual bool is_missing_acknowledgement { get; set; }
public virtual bool has_acknowledgement_letter { get; set; }
}
}
namespace regis.DynamicsCRM.Responses
{
public partial class CRMDonationResponse
{
public virtual int regent_id { get; set; }
public virtual string contact_addressee { get; set; }
public virtual string donor_first_name { get; set; }
public virtual string donor_last_name { get; set; }
public virtual string donor_addressee { get; set; }
public virtual string donor_city { get; set; }
public virtual string donor_country { get; set; }
public virtual string donor_owner_full_name { get; set; }
public virtual bool is_contact { get; set; }
public virtual bool is_account { get; set; }
public virtual int? soft_credit_regent_id { get; set; }
public virtual string soft_credit_contact_addressee { get; set; }
public virtual string soft_credit_contact_first_name { get; set; }
public virtual string soft_credit_contact_last_name { get; set; }
public virtual bool soft_credit_contact_spouse_is_main_contact { get; set; }
public virtual string soft_credit_contact_city { get; set; }
public virtual string soft_credit_contact_country { get; set; }
public virtual string soft_credit_contact_owner_full_name { get; set; }
public virtual string soft_credit_second_regent_id { get; set; }
public virtual string soft_credit_second_contact_addressee { get; set; }
public virtual string soft_credit_second_contact_first_name { get; set; }
public virtual string soft_credit_second_contact_last_name { get; set; }
public virtual bool soft_credit_second_contact_spouse_is_main_contact { get; set; }
public virtual string soft_credit_second_contact_city { get; set; }
public virtual string soft_credit_second_contact_country { get; set; }
public virtual string soft_credit_second_contact_owner_full_name { get; set; }
public virtual bool spouse_is_main_contact { get; set; }
public virtual int? import_id { get; set; }
public virtual string donation_id { get; set; }
public virtual string guid { get; set; }
public virtual string name { get; set; }
public virtual string description { get; set; }
public virtual string appeal_code { get; set; }
public virtual string designation { get; set; }
public virtual string designation_description { get; set; }
public virtual string general_ledger_account_number { get; set; }
public virtual string campaign { get; set; }
public virtual decimal total_pledge_amount { get; set; }
public virtual decimal total_paid_amount { get; set; }
public virtual decimal receipt_amount { get; set; }
public virtual decimal? exchange_rate { get; set; }
public virtual decimal? total_paid_canadian_amount { get; set; }
public virtual bool is_recurring { get; set; }
public virtual bool is_parent_donation { get; set; }
public virtual string currency { get; set; }
public virtual string source { get; set; }
public virtual string channel { get; set; }
public virtual string receipting_organization { get; set; }
public virtual string type { get; set; }
public virtual bool acknowledgment_sent { get; set; }
public virtual bool send_acknowledgment { get; set; }
public virtual string acknowledgment_template_guid { get; set; }
public virtual string parent_guid { get; set; }
public virtual bool anonymous { get; set; }
public virtual DateTime? gift_date { get; set; }
public virtual DateTime? recurring_gift_start_date { get; set; }
public virtual DateTime? recurring_gift_end_date { get; set; }
public virtual string cheque_number { get; set; }
public virtual int version_number { get; set; }
public virtual DateTime? added_date { get; set; }
}
public partial class CRMDonationsResponse
{
public CRMDonationsResponse()
{
donations = new List<CRMDonationResponse>{};
}
public virtual ResponseStatus ResponseStatus { get; set; }
public virtual List<CRMDonationResponse> donations { get; set; }
public virtual DateTime? from_date { get; set; }
public virtual DateTime? to_date { get; set; }
public virtual int? start_version_number { get; set; }
public virtual int? end_version_number { get; set; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DynamicsCRM/Donations HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
regent_id: 0,
from_date: 0001-01-01,
to_date: 0001-01-01,
start_version_number: 0,
end_version_number: 0,
is_missing_acknowledgement: False,
has_acknowledgement_letter: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { responseStatus: { errorCode: String, message: String, stackTrace: String, errors: [ { errorCode: String, fieldName: String, message: String, meta: { String: String } } ], meta: { String: String } }, donations: [ { regent_id: 0, contact_addressee: String, donor_first_name: String, donor_last_name: String, donor_addressee: String, donor_city: String, donor_country: String, donor_owner_full_name: String, is_contact: False, is_account: False, soft_credit_regent_id: 0, soft_credit_contact_addressee: String, soft_credit_contact_first_name: String, soft_credit_contact_last_name: String, soft_credit_contact_spouse_is_main_contact: False, soft_credit_contact_city: String, soft_credit_contact_country: String, soft_credit_contact_owner_full_name: String, soft_credit_second_regent_id: String, soft_credit_second_contact_addressee: String, soft_credit_second_contact_first_name: String, soft_credit_second_contact_last_name: String, soft_credit_second_contact_spouse_is_main_contact: False, soft_credit_second_contact_city: String, soft_credit_second_contact_country: String, soft_credit_second_contact_owner_full_name: String, spouse_is_main_contact: False, import_id: 0, donation_id: String, guid: String, name: String, description: String, appeal_code: String, designation: String, designation_description: String, general_ledger_account_number: String, campaign: String, total_pledge_amount: 0, total_paid_amount: 0, receipt_amount: 0, exchange_rate: 0, total_paid_canadian_amount: 0, is_recurring: False, is_parent_donation: False, currency: String, source: String, channel: String, receipting_organization: String, type: String, acknowledgment_sent: False, send_acknowledgment: False, acknowledgment_template_guid: String, parent_guid: String, anonymous: False, gift_date: 0001-01-01, recurring_gift_start_date: 0001-01-01, recurring_gift_end_date: 0001-01-01, cheque_number: String, version_number: 0, added_date: 0001-01-01 } ], from_date: 0001-01-01, to_date: 0001-01-01, start_version_number: 0, end_version_number: 0 }