C# Classes for API Responses

Document created by JackCowardin Administrator on Apr 4, 2017Last modified by JackCowardin Administrator on Apr 4, 2017
Version 4Show Document
  • View in full screen mode

GuideStar API Classes

When results are received from an API call, text response data can be "serialized" into classes that can then be accessed in programming code and displayed to a user of the calling application, or otherwise processed by the caller. For example, the data may be saved to a database for later reference or used to update another internal table.

 

The classes below can be reworked to support deserialization of JSON or XML return data in a number of programming languages.

 

GuideStar Search API Data Class

public class SearchData
  {
    public int total_hits { get; set; }
    public int search_time { get; set; }
    public int document_retrieval_time { get; set; }
    public int total_time { get; set; }
    public int auth_time { get; set; }
    public string showing { get; set; }
    public List<Hit> hits { get; set; }
    public string retrieval_time_in_milliseconds { get; set; }
    public string total_pipeline_time_in_milliseconds { get; set; }

  }

public class Hit
  {
    public int organization_id { get; set; }
    public string ein { get; set; }
    public string organization_name { get; set; }
    public string mission { get; set; }
    public string city { get; set; }
    public string state { get; set; }
    public string zip { get; set; }
    public string nteecode { get; set; }
    public string participation { get; set; }
    public string public_report { get; set; }
    public string irs_subsection { get; set; }
    public string irs_foundation_code { get; set; }
    public string msa { get; set; }
    public string logo_url { get; set; }
    public string national_hq { get; set; }
    public string website { get; set; }
    public string parents { get; set; }
    public string bmf { get; set; }
    public string pub78 { get; set; }
    public string revocation { get; set; }
    public string organization_name_aka { get; set; }
    public int online_giving_flag { get; set; }
    public int gs_donation_optin { get; set; }
  }

 

 

GuideStar CharityCheck API Data Class

  public class CharityCheckData
  {
    public string organization_id { get; set; }
    public string organization_info_last_modified { get; set; }
    public string ein { get; set; }
    public string organization_name { get; set; }
    public string organization_name_aka { get; set; }
    public string addressline_1 { get; set; }
    public string addressline_2 { get; set; }
    public string city { get; set; }
    public string state { get; set; }
    public string state_name { get; set; }
    public string zip { get; set; }
    public string charity_check_last_modified { get; set; }
    public string pub78_organization_name { get; set; }
    public string pub78_ein { get; set; }
    public string pub78_verified { get; set; }
    public string pub78_city { get; set; }
    public string pub78_state { get; set; }
    public string pub78_indicator { get; set; }
    public string deductibility_status_description_code_1 { get; set; }
    public string organization_type_1 { get; set; }
    public string deductibility_limitation_1 { get; set; }
    public string deductibility_status_description_code_2 { get; set; }
    public string organization_type_2 { get; set; }
    public string deductibility_limitation_2 { get; set; }
    public string deductibility_status_description_code_3 { get; set; }
    public string organization_type_3 { get; set; }
    public string deductibility_limitation_3 { get; set; }
    public string deductibility_status_description_code_4 { get; set; }
    public string organization_type_4 { get; set; }
    public string deductibility_limitation_4 { get; set; }
    public string deductibility_status_description_code_5 { get; set; }
    public string organization_type_5 { get; set; }
    public string deductibility_limitation_5 { get; set; }
    public string deductibility_status_description_code_6 { get; set; }
    public string organization_type_6 { get; set; }
    public string deductibility_limitation_6 { get; set; }
    public string deductibility_status_description_code_7 { get; set; }
    public string organization_type_7 { get; set; }
    public string deductibility_limitation_7 { get; set; }
    public string most_recent_pub78 { get; set; }
    public string most_recent_irb { get; set; }
    public string bmf_organization_name { get; set; }
    public string bmf_ein { get; set; }
    public string bmf_status { get; set; }
    public string most_recent_bmf { get; set; }
    public string bmf_subsection { get; set; }
    public string subsection_description { get; set; }
    public string foundation_code { get; set; }
    public string foundation_code_description { get; set; }
    public string ruling_month { get; set; }
    public string ruling_year { get; set; }
    public string adv_ruling_month { get; set; }
    public string adv_ruling_year { get; set; }
    public string group_exemption { get; set; }
    public string exemp_status_code { get; set; }
    public string ofac_status { get; set; }
    public string revocation_code { get; set; }
    public string revocation_date { get; set; }
    public string reinstatement_date { get; set; }
    public string irs_bmf_pub78_conflict { get; set; }
    public string foundation_509a_status { get; set; }
    public string irb_organization_id { get; set; }
    public string bulletin_number { get; set; }
    public string bulletin_url { get; set; }
    public string effective_date { get; set; }
    public string irb_last_modified { get; set; }
    public string report_date { get; set; }
    public string retrieval_time_in_milliseconds { get; set; }
    public string total_pipeline_time_in_milliseconds { get; set; }

 

GuideStar Exchange API Data Class

public class ExchangeData
  {
    public int organization_id { get; set; }
    public string government_issued_id { get; set; }
    public string irs_subsection_code { get; set; }
    public string irs_509a_status { get; set; }
    public string bridge_id { get; set; }
    public string primary_organization_name { get; set; }
    public string also_known_as { get; set; }
    public string doing_business_as { get; set; }
    public List<OrganizationFka> organization_fkas { get; set; }
    public string government_registered_name { get; set; }
    public string logo_path { get; set; }
    public string logo_name { get; set; }
    public int government_issued_ruling_year { get; set; }
    public object year_founded { get; set; }
    public int incorporation_year { get; set; }
    public string keywords { get; set; }
    public string mission_statement { get; set; }
    public List<string> geographic_areas_served { get; set; }
    public string geographic_areas_served_narrative { get; set; }
    public string impact_statement { get; set; }
    public string ceo_comments { get; set; }
    public string participation_level { get; set; }
    public string primary_telephone { get; set; }
    public string fax { get; set; }
    public string international_phone { get; set; }
    public PrimaryAddress primary_address { get; set; }
    public PhysicalAddress physical_address { get; set; }
    public InternationalAddress international_address { get; set; }
    public string organization_website { get; set; }
    public string organization_blog { get; set; }
    public Social social { get; set; }
    public string organization_email { get; set; }
    public List<NteeCode> ntee_codes { get; set; }
    public List<Financial> financials { get; set; }
    public PrimaryContact primary_contact { get; set; }
    public ExecutiveDirector executive_director { get; set; }
    public CoExecutiveDirector co_executive_director { get; set; }
    public BoardChair board_chair { get; set; }
    public BoardCoChair board_co_chair { get; set; }
    public List<BoardMember> board_members { get; set; }
    public List<SeniorStaff> senior_staff { get; set; }
    public List<OtherStaff> other_staff { get; set; }
    public List<Program> programs { get; set; }
    public LetterOfDetermination letter_of_determination { get; set; }
    public LetterOfDissolution letter_of_dissolution { get; set; }
    public List<FinancialStatement> financial_statements { get; set; }
    public List<AnnualReport> annual_reports { get; set; }
    public List<Form990s> form_990s { get; set; }
    public List<Form990Ts> form_990Ts { get; set; }
    public List<Form10231024s> form_1023_1024s { get; set; }
    public List<OtherDocument> other_documents { get; set; }
    public List<object> funding_sources { get; set; }
    public List<object> funding_needs { get; set; }
    public List<object> accreditations { get; set; }
    public List<object> awards { get; set; }
    public List<object> affiliations { get; set; }
    public Impact impact { get; set; }
    public List<Video> videos { get; set; }
    public List<Photo> photos { get; set; }
    public string notes { get; set; }
    public BoardSource board_source { get; set; }
    public Demographics demographics { get; set; }
    public bool bod_not_required { get; set; }
    public DateTime approval_date { get; set; }
    public string retrieval_time_in_milliseconds { get; set; }
    public string total_pipeline_time_in_milliseconds { get; set; }
  }

  public class OrganizationFka
  {
    public string formerly_known_as { get; set; }
    public DateTime start_date { get; set; }
    public object end_date { get; set; }
  }

  public class PrimaryAddress
  {
    public string address_line_1 { get; set; }
    public string address_line_2 { get; set; }
    public string city { get; set; }
    public string country_subdivision_abbrev_ { get; set; }
    public string country_abbrev { get; set; }
    public string postal_code { get; set; }
    public string postal_code_plus { get; set; }
  }

  public class PhysicalAddress
  {
    public string address_line_1 { get; set; }
    public string address_line_2 { get; set; }
    public string city { get; set; }
    public string country_subdivision_abbrev_ { get; set; }
    public string country_abbrev { get; set; }
    public string postal_code { get; set; }
    public string postal_code_plus { get; set; }
  }

  public class InternationalAddress
  {
    public string address_line_1 { get; set; }
    public string address_line_2 { get; set; }
    public string city { get; set; }
    public string country_subdivision_abbrev_ { get; set; }
    public string country_abbrev { get; set; }
    public string postal_code { get; set; }
    public string postal_code_plus { get; set; }
  }

  public class Social
  {
    public string facebook { get; set; }
    public string twitter { get; set; }
    public string flickr { get; set; }
    public string google { get; set; }
    public string linkedin { get; set; }
    public string youtube { get; set; }
    public string pinterest { get; set; }
    public string tumblr { get; set; }
    public string vimeo { get; set; }
    public string instagram { get; set; }
    public string foursquare { get; set; }
  }

  public class NteeCode
  {
    public string ntee_code { get; set; }
    public string ntee_code_description { get; set; }
  }

  public class Financial
  {
    public object xml_document_id { get; set; }
    public object fin_id { get; set; }
    public object ftapprovedform_id { get; set; }
    public DateTime fiscal_year_start { get; set; }
    public DateTime fiscal_year_end { get; set; }
    public double contrib_gifts_grants { get; set; }
    public double program_service_revenue { get; set; }
    public double membership_dues { get; set; }
    public double special_events_net_income { get; set; }
    public string other_revenue_description { get; set; }
    public double other_revenue { get; set; }
    public double total_revenue { get; set; }
    public double program_expenses { get; set; }
    public double administration_expenses { get; set; }
    public double fundraising_expenses { get; set; }
    public double payments_to_affiliates { get; set; }
    public string other_expense_description { get; set; }
    public double other_expense { get; set; }
    public double total_expenses { get; set; }
    public double total_assets { get; set; }
    public double total_liabilities { get; set; }
    public double net_assets_fund_balance_eoy { get; set; }
  }

  public class PrimaryContact
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class ExecutiveDirector
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class CoExecutiveDirector
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class BoardChair
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class BoardCoChair
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class BoardMember
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class SeniorStaff
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class OtherStaff
  {
    public string prefix { get; set; }
    public string first_name { get; set; }
    public string middle_name { get; set; }
    public string last_name { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string affiliation { get; set; }
    public string status { get; set; }
    public string start_month { get; set; }
    public object start_year { get; set; }
    public string end_month { get; set; }
    public object end_year { get; set; }
    public string email { get; set; }
    public object compensation { get; set; }
    public string bio { get; set; }
    public string picture { get; set; }
  }

  public class Program
  {
    public string program_name { get; set; }
    public string program_description { get; set; }
    public object program_budget { get; set; }
    public string npc_code { get; set; }
    public string npc_code_description { get; set; }
    public string long_term_success { get; set; }
    public string short_term_success { get; set; }
    public string success_monitored_by { get; set; }
    public string examples_of_success { get; set; }
    public string keyword { get; set; }
    public List<string> program_target_population_description { get; set; }
  }

  public class LetterOfDetermination
  {
    public string document_name { get; set; }
    public int document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public object start_date { get; set; }
    public object end_date { get; set; }
    public object description { get; set; }
  }

  public class LetterOfDissolution
  {
    public string document_name { get; set; }
    public object document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public object start_date { get; set; }
    public object end_date { get; set; }
    public object description { get; set; }
  }

  public class FinancialStatement
  {
    public string document_name { get; set; }
    public int document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public DateTime? start_date { get; set; }
    public DateTime? end_date { get; set; }
    public string description { get; set; }
  }

  public class AnnualReport
  {
    public string document_name { get; set; }
    public int document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public object start_date { get; set; }
    public object end_date { get; set; }
    public object description { get; set; }
  }

  public class Form990s
  {
    public string document_name { get; set; }
    public int document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public object start_date { get; set; }
    public object end_date { get; set; }
    public object description { get; set; }
  }

  public class Form990Ts
  {
    public string document_name { get; set; }
    public int document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public object start_date { get; set; }
    public object end_date { get; set; }
    public object description { get; set; }
  }

  public class Form10231024s
  {
    public string document_name { get; set; }
    public int document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public object start_date { get; set; }
    public object end_date { get; set; }
    public object description { get; set; }
  }

  public class OtherDocument
  {
    public string document_name { get; set; }
    public object document_year { get; set; }
    public object document_size { get; set; }
    public string document_path { get; set; }
    public object start_date { get; set; }
    public object end_date { get; set; }
    public object description { get; set; }
  }

  public class Impact
  {
    public string goals { get; set; }
    public string strategies { get; set; }
    public string capabilities { get; set; }
    public string indicators { get; set; }
    public string progress { get; set; }
    public string charting_impact_pdf_url { get; set; }
  }

  public class Video
  {
    public string caption { get; set; }
    public string url { get; set; }
  }

  public class Photo
  {
    public string caption { get; set; }
    public string url { get; set; }
  }

  public class BoardSource
  {
    public bool board_orientation_and_education { get; set; }
    public bool ceo_oversight { get; set; }
    public bool ethnics_and_transparency { get; set; }
    public bool board_composition { get; set; }
    public bool board_performance { get; set; }
  }

  public class DemographicsByGender
  {
    public string category { get; set; }
    public double? board_members { get; set; }
    public double? senior_staff { get; set; }
    public double? staff_members_full_time { get; set; }
    public int? staff_members_part_time { get; set; }
    public object volunteers { get; set; }
  }

  public class DemographicsBySexualOrientation
  {
    public string category { get; set; }
    public object board_members { get; set; }
    public object senior_staff { get; set; }
    public object staff_members_full_time { get; set; }
    public object staff_members_part_time { get; set; }
    public object volunteers { get; set; }
  }

  public class DemographicsByDisability
  {
    public string category { get; set; }
    public object board_members { get; set; }
    public object senior_staff { get; set; }
    public object staff_members_full_time { get; set; }
    public object staff_members_part_time { get; set; }
    public object volunteers { get; set; }
  }

  public class DemographicsByEthnicity
  {
    public string category { get; set; }
    public double? board_members { get; set; }
    public double? senior_staff { get; set; }
    public double? staff_members_full_time { get; set; }
    public int? staff_members_part_time { get; set; }
    public object volunteers { get; set; }
  }

  public class Demographics
  {
    public string track_retention { get; set; }
    public string track_income_levels { get; set; }
    public string track_age_of_staff { get; set; }
    public string track_diversity_of_vendors { get; set; }
    public string diversity_committee { get; set; }
    public string diversity_manager { get; set; }
    public string diversity_manager_full_time { get; set; }
    public string diversity_plan { get; set; }
    public string support_diversity_other_methods { get; set; }
    public List<DemographicsByGender> demographics_by_gender { get; set; }
    public List<DemographicsBySexualOrientation> demographics_by_sexual_orientation { get; set; }
    public List<DemographicsByDisability> demographics_by_disability { get; set; }
    public List<DemographicsByEthnicity> demographics_by_ethnicity { get; set; }
  }
}

GuideStar Detail API Data Class

 public class DetailData
  {
    public int organization_id { get; set; }
    public string ein { get; set; }
    public string organization_name { get; set; }
    public string address_line1 { get; set; }
    public string address_line2 { get; set; }
    public string city { get; set; }
    public string state { get; set; }
    public string zip { get; set; }
    public string zip4 { get; set; }
    public string affiliation_code { get; set; }
    public string affiliation_code_description { get; set; }
    public string aka_organization_name { get; set; }
    public double assets { get; set; }
    public string contact_fax { get; set; }
    public string contact_phone { get; set; }
    public string deductibility_code { get; set; }
    public string deductibility_code_description { get; set; }
    public double expenses_total { get; set; }
    public string foundation_code { get; set; }
    public string foundation_code_description { get; set; }
    public string group_exemption { get; set; }
    public double income_total { get; set; }
    public string subsection_code { get; set; }
    public object subsection_name { get; set; }
    public string subsection_code_description { get; set; }
    public int is_national_hq { get; set; }
    public double liability_total_eoy { get; set; }
    public string mission { get; set; }
    public string telephone { get; set; }
    public string report_page { get; set; }
    public string ruling_year { get; set; }
    public int tax_year { get; set; }
    public string website { get; set; }
    public string year_founded { get; set; }
    public double revenue_total { get; set; }
    public List<GeographicAreasServed> geographic_areas_served { get; set; }
    public List<OrganizationNteeCode> organization_ntee_codes { get; set; }
    public List<Person> people { get; set; }
    public List<Program> programs { get; set; }
    public string retrieval_time_in_milliseconds { get; set; }
    public string total_pipeline_time_in_milliseconds { get; set; }
  }

  public class GeographicAreasServed
  {
    public int geographic_area_served_id { get; set; }
    public int organization_id { get; set; }
    public string area_served { get; set; }
  }

  public class NteeCodeDetails
  {
    public int nteecodeid { get; set; }
    public string nteecode { get; set; }
    public string nteecodedescription { get; set; }
    public DateTime lastmodified { get; set; }
  }

  public class OrganizationNteeCode
  {
    public int organizationnteeid { get; set; }
    public int organizationid { get; set; }
    public string nteecode { get; set; }
    public NteeCodeDetails ntee_code_details { get; set; }
  }

  public class PersonType
  {
    public int person_type_id { get; set; }
    public string person_type_description { get; set; }
    public DateTime last_modified { get; set; }
  }

  public class Person
  {
    public int personid { get; set; }
    public int organizationid { get; set; }
    public string prefix { get; set; }
    public string firstname { get; set; }
    public string middlename { get; set; }
    public string lastname { get; set; }
    public string suffix { get; set; }
    public string title { get; set; }
    public string email { get; set; }
    public string telephone { get; set; }
    public object fax { get; set; }
    public List<PersonType> person_types { get; set; }
  }

  public class Program
  {
    public int programid { get; set; }
    public int organizationid { get; set; }
    public string programdescription { get; set; }
  }

Attachments

    Outcomes