- Created by Judy Ho, last modified by Mariya Nomanbhoy (Unlicensed) on May 04, 2017
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 21 Next »
As a financial marketplace and tool, Sighten offers what we call the Data Access Layer (DAL) to our API partners. Extensive data is collected and and calculated throughout the lifecyle of a deal in Sighten. The DAL allows our partners to always retrieve the most relevant and pertinent data effectively and quickly.
Authentication and Credentials
Authentication and access for the data access layer are the same as those used for other Sighten API endpoints. If your Sighten subscription does not include access to Sighten's APIs, please contact your Sighten account representative or support@sighten.io to see how your needs may be met with the Data Access Layer.
What data is accessible
The base URL for the DAL is : https://engine.sighten.io/api/data/
Retrieving from the base endpoint reveals what options and information are available through the DAL. Each of the options represent a different starting point for how associated information, "metrics," are derived.
Credit Qualification
The credit qualification part of the DAL derives information related to credit pulls. Depending on the set up of the financier and integration, this may include product information and approval amounts among other data.
Product
The product option on the DAL returns information around the specific financing products for which your account has access.
Quote
The quote option returns information related to the quotes that have been created in your account. Pricing information, status, and dates of creation can be accessed for each individual quote.
Site
The site (sometimes referred to as solarsite) is the data object around which the entire Sighten platform is centered. It encompasses the homeowner contact, address, and utility information. This option on the DAL will return higher level information related to each site.
System
The system data structure includes all array information that is part of a system design.
GET https://engine.sighten.io/api/data/
Success Response { "data": { "options": [ "credit_qualification", "product", "quote", "site", "system" ] }, "messages": { "warning": [], "error": [], "info": [], "critical": [] }, "status_code": 200 }
Metrics
Each of these data structures then each return a set of data (or "metrics") related to that data structure. Appending the data object option to the api/data/
endpoint reveals the full list of possible metrics (pieces of data) that are related to the data object and retrievable.
GET https://engine.sighten.io/api/data/credit_qualification/
{ "data": { "options": [ "ach_elected", "address_line_1", "address_override_line_1", "address_validated_line_1", "amount_financed", "array_capacity", "array_capacity_kw", "array_gen_ac_total", "array_id", "array_inverter_external_id", "array_module_external_id", "array_n_inverters", "array_n_modules_series", "array_n_series_parallel", "array_number_of_modules", "array_productivity", "city_name", "complete_milestone_count", "contact_applicant_type", "contact_date_created", "contact_email", "contact_email_[index]", "contact_email_list", "contact_first_name", "contact_id", "contact_is_legal", "contact_last_name", "contact_name", "contact_name_[index]", "contact_names", "contact_phone_number", "contact_phone_number_list", "contract_address_line_1", "contract_city_name", "contract_county_name", "contract_rate", "contract_signed", "contract_start_date", "contract_state_abbreviation", "contract_term", "contract_type", "contract_zipcode", "county_name", "credit_last_updated", "credit_qualification_amount_approved", "credit_qualification_amount_approved_override", "credit_qualification_date_updated", "credit_qualification_external_id", "credit_qualification_id", "credit_qualification_is_active", "credit_qualification_modified_by", "credit_qualification_status", "credit_status", "credit_status_for_job", "current_milestone_name", "date_signed", "external_ids", "financier", "grandparent_product_organization", "incomplete_milestone_count", "initial_payment", "install_cost", "install_cost_per_watt", "inverter_manufacturer_name", "inverter_model", "inverter_model_abbreviated", "inverter_model_list", "legal_contact_applicant_type", "legal_contact_date_updated", "legal_contact_email", "legal_contact_email_[index]", "legal_contact_first_name", "legal_contact_id", "legal_contact_id_[index]", "legal_contact_last_name", "legal_contact_name", "legal_contact_name_[index]", "legal_site_address_line_1", "legal_site_city_name", "legal_site_county_name", "legal_site_state_abbreviation", "legal_site_zipcode", "milestone_count", "milestone_date_completed", "milestone_date_completed_[index]", "milestone_date_rejected", "milestone_date_rejected_[index]", "milestone_date_submitted", "milestone_date_submitted_[index]", "milestone_id", "milestone_name", "milestone_name_[index]", "milestone_one_status", "milestone_order", "milestone_status", "milestone_status_[index]", "milestone_status_abbreviated", "module_manufacturer_name", "module_model", "module_model_abbreviated", "module_model_list", "module_rating_nominal", "operational_year", "organization_name", "organization_uuid", "owned_by_organization", "parent_product_organization", "product_count", "product_id", "product_name", "product_names", "product_organization", "proposal_count", "proposal_date_created", "proposal_downloaded", "proposal_has_signed_quote", "proposal_id", "qualification_credit_qualification_external_id", "qualification_status", "quote_contract_apr", "quote_count", "quote_date_created", "quote_id", "quote_monthly_payment", "quote_monthly_payment_no_prepay", "quote_owned_by_user", "quote_secondary_amount_financed", "quote_secondary_contract_term_months", "quote_status", "quote_status_for_job", "quote_stub_payment", "quote_stub_payment_no_prepay", "quotetask_date_updated", "quotetask_name", "quotetask_status", "rate_contract", "rate_escalator", "scorecard_amount_approved_usd", "scorecard_amount_approved_usd_[index]", "scorecard_decision", "scorecard_decision_[index]", "scorecard_decision_date", "scorecard_decision_date_[index]", "scorecard_id", "scorecard_name", "scorecard_name_[index]", "scorecard_name_without_term", "scorecard_term", "signed_quote_count", "site_date_created", "site_id", "site_last_updated", "site_owned_by_user", "site_status", "siteowner_covers_oandm", "solar_bill", "solar_spend", "solar_spend_cum", "state_abbreviation", "system_capacity", "system_capacity_kw", "system_count", "system_id", "system_number_of_modules", "system_production_in_first_year", "system_productivity", "user_email", "utility_bill_post", "utility_bill_pre", "utility_id", "utility_name", "utility_rate_schedule_name", "workflow_last_updated", "zipcode" ] }, "messages": { "error": [], "critical": [], "info": [], "warning": [] }, "status_code": 200 }
A specific metric can be retrieved by appending it to the api/data/<data_object_option>/
endpoint as a query argument. Only the metrics specified will be returned in the response for each data object.
Field | Type | Description |
---|---|---|
count |
| The number of entries of data objects. |
| bool | Is there more data beyond the current page. |
pages | int | The number of pages of data. |
data | array | Array of data metric objects. Each object contains the values for the metrics specified in the URL retrieval. |
GET https://engine.sighten.io/api/data/credit_qualification/?metrics=site_id
{ "count": 90658, "has_next_page": true, "messages": { "info": [], "critical": [], "warning": [], "error": [] }, "status_code": 200, "pages": 4533, "data": [ { "site_id": "f9f9df3b-132d-4d6f-b53a-4279e8f67ebf" }, { "site_id": "c74f1784-f7b8-4b4b-19a7-c3ce2d2e14a5" }, { "site_id": "c0a26dd5-7a1e-a4f5-aff8-bcca5b9ea46f" }, { "site_id": "36a863d2-da0c-4b37-9901-5f6e61e5aaa0" }, { "site_id": "5ba89921-946e-4b69-b25f-76764ae332dc" }, { "site_id": "80beb076-be0c-4cc9-8369-d066cd76afa4" }, { "site_id": "cb5bcf33-63b9-4268-a1c6-2b5511284faf" }, { "site_id": "07501fb0-82c9-42bc-a6b3-cee538e85cdf" }, { "site_id": "ab158a4f-a6f7-45d3-b53b-ad3da42fe165" }, { "site_id": "82406937-ffd2-4d30-b7a9-d2eb0728398b" }, { "site_id": "fe1a9e9e-c717-4213-90a3-918a5e8846c1" }, { "site_id": "6495c911-b543-490b-a8fc-b4286cc5b0ba" }, { "site_id": "c8b48b6e-d599-45a7-901c-487f19a20bc5" }, { "site_id": "4e925c52-bf19-4042-beb6-ad9cb5b2a302" }, { "site_id": "52324cd3-26e1-441b-b483-5d922398cfb4" }, { "site_id": "601ecafb-08bb-458d-87a3-4bc8ec9daedc" }, { "site_id": "834323d5-c88b-4dd2-b505-4e71b125f682" }, { "site_id": "e4d5f57e-77a9-4c49-8449-d492887e1c63" }, { "site_id": "9d9cbfda-da86-4157-b619-792fda47aec3" }, { "site_id": "4fe662aa-936e-4713-905c-cb1f7bd141ce" } ] }
Pagination
Limit
Page
Data Filtering
?date_updated_after=2017-01-20&date_updated_before=2017-01-22
Finding sites and when they were last updated:
In order to find when a site was last updated, we can call the api/data/quote/ endpoint to return the last updated dates along with the quote ids and site ids.
GET https://engine.sighten.io/api/data/site/?metrics=site_last_updated,site_id
GET https://engine.sighten.io/api/data/site/?metrics=site_last_updated,site_id&limit=3000
limit => how many entries to display in the response
GET https://engine.sighten.io/api/data/site/?metrics=site_last_updated,site_id&limit=3000&page=3
Response:
Fields of interest:
pages => number of pages of entries
count => number of total entries
has_next_page => there are more entries on the next page
{ messages: { info: [ ], warning: [ ], error: [ ], critical: [ ] }, pages: 1095, data: [ { site_last_updated: "2016-01-21T22:53:50.889244+00:00", site_id: "353da0c0-67ab-44a2-913b-2ca1ffc8137a" }, { site_last_updated: "2016-01-21T22:53:50.889244+00:00", site_id: "353da0c0-67ab-44a2-913b-2ca1ffc8137a" }, { site_last_updated: "2016-01-21T22:53:50.889244+00:00", site_id: "353da0c0-67ab-44a2-913b-2ca1ffc8137a" }, { site_last_updated: "2016-01-21T22:53:50.889244+00:00", site_id: "353da0c0-67ab-44a2-913b-2ca1ffc8137a" }, { site_last_updated: "2016-01-21T22:53:50.889244+00:00", site_id: "353da0c0-67ab-44a2-913b-2ca1ffc8137a" }, { site_last_updated: "2016-02-03T15:45:54.782968+00:00", site_id: "ec9d7a8a-4f24-4c15-92dc-294c67fde3e1" }, { site_last_updated: "2016-02-05T17:18:15.580026+00:00", site_id: "610d3705-a808-4f1e-ae53-6009ea4bf8c6" }, { site_last_updated: "2016-02-05T17:18:15.580026+00:00", site_id: "610d3705-a808-4f1e-ae53-6009ea4bf8c6" }, { site_last_updated: "2016-02-05T17:18:15.580026+00:00", site_id: "610d3705-a808-4f1e-ae53-6009ea4bf8c6" }, { site_last_updated: "2016-02-05T19:03:15.641856+00:00", site_id: "f463f568-7129-4504-8c31-6352a5ccd23f" }, { site_last_updated: "2016-02-05T19:03:15.641856+00:00", site_id: "f463f568-7129-4504-8c31-6352a5ccd23f" }, { site_last_updated: "2016-02-05T19:03:15.641856+00:00", site_id: "f463f568-7129-4504-8c31-6352a5ccd23f" }, { site_last_updated: "2016-02-05T19:03:15.641856+00:00", site_id: "f463f568-7129-4504-8c31-6352a5ccd23f" }, { site_last_updated: "2016-02-05T19:03:15.872990+00:00", site_id: "671df10c-3330-474d-ad00-4d5ad4b98668" }, { site_last_updated: "2016-02-05T19:03:15.872990+00:00", site_id: "671df10c-3330-474d-ad00-4d5ad4b98668" }, { site_last_updated: "2016-02-05T19:03:15.872990+00:00", site_id: "671df10c-3330-474d-ad00-4d5ad4b98668" }, { site_last_updated: "2016-02-05T19:03:16.534995+00:00", site_id: "5bc86965-582a-48fe-9062-58914d1f8fda" }, { site_last_updated: "2016-02-05T19:03:16.534995+00:00", site_id: "5bc86965-582a-48fe-9062-58914d1f8fda" }, { site_last_updated: "2016-02-05T19:03:16.534995+00:00", site_id: "5bc86965-582a-48fe-9062-58914d1f8fda" }, { site_last_updated: "2016-02-05T19:03:16.534995+00:00", site_id: "5bc86965-582a-48fe-9062-58914d1f8fda" } ], count: 21897, has_next_page: true, status_code: 200 }
- No labels