### List Pricing Schemes - JSON Response Example Source: https://developers.opensolar.com/api/pricing-schemes Provides an example of the JSON response when requesting a list of pricing schemes. Each scheme object includes details such as its URL, organization association, pricing formula, title, priority, configuration, and timestamps. ```json [ { "url": "https://api.opensolar.com/api/orgs/1/pricing_schemes/68/", "org": "https://api.opensolar.com/api/orgs/1/", "is_archived": false, "pricing_formula": "Price Per Module/Inverter/Battery", "title": "per equipment", "priority": 1, "configuration_json": "{\"price_per_module\":500,\"price_per_inverter\":1000,\"price_per_battery\":2000,\"tax_percentage_included\":10}", "created_date": "2019-02-12T01:43:54.320315Z", "modified_date": "2019-02-12T01:43:54.320357Z", "auto_apply_enabled": true, "auto_apply_only_specified_states": null, "auto_apply_only_specified_zips": null, "id": 68 }, ... ] ``` -------------------------------- ### Get System Details API Request - cURL Source: https://developers.opensolar.com/api/system-details This snippet demonstrates how to make a GET request to the Systems Details API endpoint using cURL. It includes the necessary authorization header and placeholders for the organization and project IDs. This is useful for retrieving all system-related design data for a given project. ```bash curl "https://api.opensolar.com/api/orgs/:org_id/projects/:project_id/systems/details/" \ -H "Authorization: Bearer " ``` -------------------------------- ### OpenSolar Webhook Payload Structure Example (JSON) Source: https://developers.opensolar.com/api/webhooks-structure This JSON object illustrates the base structure of a webhook payload sent by the OpenSolar API. It includes a timestamp, model information, event details, and a 'fields' object for CREATE/UPDATE events. This structure is consistent across Project, Contact, and Event models. ```json { "timestamp": "1605831713", "model": "Project", "model_id": 1, "identifier": "6ab6a60d-1a4d-4374-88af-92f7c02e3223", "event": "UPDATE", "event_id": 1, "fields": { ... } } ``` -------------------------------- ### Event Payload Example Source: https://developers.opensolar.com/api/webhooks-event This JSON object represents an example of an Event payload. It contains details about a specific event related to a project, including timestamps, event type, and associated data fields. No external dependencies are required to interpret this structure. ```json { "timestamp": "1605832669", "model": "Event", "model_id": 5, "identifier": "6ab6a60d-1a4d-4374-88af-92f7c02e3223", "event": "UPDATE", "event_id": 1, "fields": { "action": "/api/orgs/27/actions/1/", "archive_for": null, "completion_date": "2020-01-01T12:00:00.000000Z", "contact": "/api/orgs/15/contacts/6/", "created_date": "2020-01-02T12:00:00.000000Z", "duration": 0, "end": null, "event_type_id": 29, "id": 5, "is_archived": false, "is_complete": true, "location_override": "", "modified_date": "2020-01-01T12:00:00.000000Z", "notes": null, "org": "/api/orgs/15/", "project": "/api/orgs/15/projects/11/", "project_name": "Vandelay Industries", "repeat": 0, "start": null, "task_status": 0, "team_members": [], "title": "Design Systems", "url": "/api/orgs/15/events/5/", "user": "/auth/users/7/", "who": { "display": "george costanza", "email": "george@vanderlayindustries.com", "portrait_image_public_url": null } } } ``` -------------------------------- ### Get List of Systems using cURL Source: https://developers.opensolar.com/api/system This snippet demonstrates how to retrieve a list of all systems within an organization using a cURL command. It requires an authorization token and specifies the 'fieldset=list' parameter to get all system details. The response is a JSON array containing system objects. ```shell curl "https://api.opensolar.com/api/orgs/:org_id/systems/?fieldset=list" \ -H "Authorization: Bearer " ``` -------------------------------- ### GET /api/orgs/{org_id}/projects/{project_id}/systems/details/ Source: https://developers.opensolar.com/api/system-details Retrieves detailed information about a specific system within an organization and project. This endpoint is currently experimental and may change. ```APIDOC ## GET /api/orgs/{org_id}/projects/{project_id}/systems/details/ ### Description Retrieves detailed information about a specific system, including module, inverter, battery, and other component details. It supports an `include_parts=mcs` query parameter for MCS-specific data. ### Method GET ### Endpoint `/api/orgs/{org_id}/projects/{project_id}/systems/details/` ### Parameters #### Query Parameters - **include_parts** (string) - Optional - Use `mcs` to include MCS-specific data in the response. ### Request Example ```curl https://api.opensolar.com/api/orgs/894/projects/15393/systems/details/?include_parts=mcs ``` ### Headers - **Authorization**: Bearer token ### Response #### Success Response (200) - **notice** (string) - A notice regarding the experimental nature of the endpoint. - **systems** (array) - An array of system objects, each containing detailed information: - **kw_stc** (number) - System capacity in kW STC. - **uuid** (string) - Unique identifier for the system. - **id** (integer) - The system's ID. - **name** (string) - The name of the system. - **modules** (array) - List of modules used in the system. - **manufacturer_name** (string) - Manufacturer of the module. - **code** (string) - Module code. - **quantity** (integer) - Number of modules. - **total_module_quantity** (integer) - Total number of modules in the system. - **inverters** (array) - List of inverters used. - **manufacturer_name** (string) - Manufacturer of the inverter. - **code** (string) - Inverter code. - **quantity** (integer) - Number of inverters. - **batteries** (array) - List of batteries used. - **manufacturer_name** (string) - Manufacturer of the battery. - **code** (string) - Battery code. - **quantity** (integer) - Number of batteries. - **other_components** (array) - List of other components. - **manufacturer_name** (string) - Manufacturer of the component. - **code** (string) - Component code. - **quantity** (integer) - Number of components. - **adders** (array) - List of adders. - **module_groups** (array) - Groups of modules with their configuration. - **module_quantity** (integer) - Number of modules in the group. - **azimuth** (number) - Azimuth angle of the group. - **slope** (number) - Tilt angle of the group. - **layout** (string) - Module layout orientation. - **incentives** (array) - List of incentives. - **data** (object) - Contains additional data, potentially including MCS details if requested. - **mcs** (object) - MCS-specific data (if `include_parts=mcs` is used). - **mcsSystemPanelAzimuth** (string) - MCS panel azimuth information. - **mcsSystemPanelTilt** (string) - MCS panel tilt information. - **mcsPostCodeRegion** (string) - MCS postcode region. - **mcsSpecificYieldBeforeShading** (string) - MCS specific yield before shading. - **shadingFactor** (string) - Shading factor. - **mcsOccupancyArchetype** (string) - MCS occupancy archetype. #### Response Example ```json { "notice": "Please note: this endpoint is experimental and may be changed or decommissioned in future.", "systems": [ { "kw_stc": 4.07, "uuid": "0DEADB0B-96EA-430E-8239-4FC40F51C64D", "id": 10160, "name": "System 1 (4.07 kW)", "modules": [ { "manufacturer_name": "REC Solar", "code": "REC370AA Black", "quantity": 11 } ], "total_module_quantity": 11, "inverters": [ { "manufacturer_name": "Enphase Energy Inc.", "code": "IQ7A-72-2-INT", "quantity": 11 } ], "batteries": [ { "manufacturer_name": "SolarEdge Technologies Ltd.", "code": "BAT-10K1P", "quantity": 1 } ], "other_components": [ { "manufacturer_name": "Solar Analytics", "code": "Annual Subscription (Systems 15kW or Less)", "quantity": 1 }, { "manufacturer_name": "Empowered by Light", "code": "Empowered by Light", "quantity": 1 } ], "adders": [], "module_groups": [ { "module_quantity": 3, "azimuth": 224, "slope": 20.0, "layout": "portrait" }, { "module_quantity": 4, "azimuth": 134.0, "slope": 20.0, "layout": "portrait" }, { "module_quantity": 4, "azimuth": 174, "slope": 20.0, "layout": "portrait" } ], "incentives": [], "data": { "mcs": { "mcsSystemPanelAzimuth": "Group 1: 3 panels with Orientation: 45 ° \nGroup 2: 4 panels with Orientation: 45 ° \nGroup 3: 4 panels with Orientation: 5 ° \n", "mcsSystemPanelTilt": "Group 1: 3 panels with Tilt: 20° \nGroup 2: 4 panels with Tilt: 20° \nGroup 3: 4 panels with Tilt: 20° \n", "mcsPostCodeRegion": "1", "mcsSpecificYieldBeforeShading": "Group 1: 908 \nGroup 2: 908 \nGroup 3: 946 \n", "shadingFactor": "1", "mcsOccupancyArchetype": "In Half Day" } } } ] } ``` ``` -------------------------------- ### GET /api/orgs/:org_id/component_module_activations/ Source: https://developers.opensolar.com/api/modules Retrieves a list of activated component modules for a given organization. Supports pagination. ```APIDOC ## GET /api/orgs/:org_id/component_module_activations/ ### Description Retrieves a list of activated component modules for a given organization. Supports pagination. ### Method GET ### Endpoint /api/orgs/:org_id/component_module_activations/ ### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **limit** (integer) - Optional - The number of items per page. ### Request Example ```curl https://api.opensolar.com/api/orgs/:org_id/component_module_activations/?page=1&limit=20 -H "Authorization: Bearer " ``` ### Response #### Success Response (200) - **org** (string) - URL of the organization. - **module** (string) - URL of the component module. - **module_id** (integer) - The ID of the component module. - **manufacturer_name** (string) - The name of the module manufacturer. - **cost** (number) - The cost of the module. - **price_adjustment** (number) - Any price adjustment for the module. - **quantity** (integer) - The quantity of the module. - **data** (string) - JSON string containing detailed module data. - **code** (string) - The module's product code. - **is_default** (boolean) - Indicates if this is the default module. - **id** (integer) - The ID of the module activation. - **url** (string) - The URL of this module activation resource. - **_sku** (string) - The SKU of the module. - **is_archived** (boolean) - Indicates if the module activation is archived. - **product_warranty** (null) - Product warranty information (currently null). - **performance_warranty** (null) - Performance warranty information (currently null). - **logo** (string) - URL of the manufacturer's logo. #### Response Example ```json [ { "org": "https://api.opensolar.com/api/orgs/1/", "module": "https://api.opensolar.com/api/component_modules/8520/", "module_id": 8520, "manufacturer_name": "LG Energy", "cost": 0.0, "price_adjustment": 0.0, "quantity": 0, "data": "{\"annual_degradation_override\": 0.45, \"max_power_voltage\": 33.7, \"code\": \"LG330N1C-A5\", \"performance_warranty\": 25, \"cells_in_series\": 60, \"voc\": 40.9, \"product_warranty\": 25, \"temp_coefficient_voc\": -0.27, \"temp_coefficient_vpmax\": -0.37, \"kw_stc\": 0.33, \"height\": 1.686, \"width\": 1.016, \"noct\": 45.9, \"imp\": 9.8, \"temp_coefficient_isc\": 0.03, \"isc\": 10.45, \"transmission\": null, \"bifaciality\": 0.0, \"technology\": \"Mono-c-Si\", \"skus\": \"\", \"manufacturer_name\": \"LG Energy\"}", "code": "LG330N1C-A5", "is_default": false, "id": 1, "url": "https://api.opensolar.com/api/orgs/1/component_module_activations/1/", "_sku": "LG330N1C-A5", "is_archived": false, "product_warranty": null, "performance_warranty": null, "logo": "https://api.opensolar.com/static/s3_local/logo" } ] ``` ``` -------------------------------- ### GET /api/orgs/:org_id/component_other_activations/ Source: https://developers.opensolar.com/api/other-components Retrieves a paginated list of activated 'other' components for a given organization. ```APIDOC ## GET /api/orgs/:org_id/component_other_activations/ ### Description Retrieves a paginated list of activated 'other' components for a given organization. ### Method GET ### Endpoint /api/orgs/:org_id/component_other_activations/ ### Query Parameters - **page** (integer) - Optional - The page number to retrieve. - **limit** (integer) - Optional - The number of items to display per page. ### Request Example ``` curl "https://api.opensolar.com/api/orgs/:org_id/component_other_activations/?page=1&limit=20" \ -H "Authorization: Bearer " ``` ### Response #### Success Response (200) - **org** (string) - URL of the organization. - **other** (null) - Placeholder, currently null. - **other_id** (null) - Placeholder, currently null. - **manufacturer_name** (string) - The name of the manufacturer. - **cost** (number) - The cost of the component. - **price_adjustment** (number) - Any price adjustment for the component. - **quantity** (integer) - The quantity of the component. - **data** (string) - JSON string containing additional component data. - **code** (string) - A code identifying the component type. - **id** (integer) - The unique identifier for the component activation. - **url** (string) - The URL to access this specific component activation. - **_sku** (string) - The Stock Keeping Unit for the component. - **is_archived** (boolean) - Indicates if the component activation is archived. - **product_warranty** (null) - Placeholder for product warranty information, currently null. #### Response Example ```json [ { "org": "https://api.opensolar.com/api/orgs/1/", "other": null, "other_id": null, "manufacturer_name": "", "cost": 100.0, "price_adjustment": 0.0, "quantity": 0, "data": "{\"product_warranty\": null, \"show_customer\": true, \"code\": \"component\", \"description\": \"\", \"manufacturer_name\": \""", "code": "component", "id": 2, "url": "https://api.opensolar.com/api/orgs/1/component_other_activations/2/", "_sku": "", "is_archived": false, "product_warranty": null } ] ``` ``` -------------------------------- ### System Details API Response - JSON Source: https://developers.opensolar.com/api/system-details This is a sample JSON response from the Systems Details API endpoint. It illustrates the structure of the data returned, including system-level information such as kw_stc, UUID, name, and detailed breakdowns for modules, inverters, batteries, other components, adders, module groups, and incentives. This helps in understanding the expected output format. ```json { "systems": [ { "kw_stc": 6.21, "uuid": "E583FD88-EB6C-4311-91A9-AC719041EAA8", "id": 8280, "name": "System 1 (6.21 kW)", "modules": [ { "manufacturer_name": "LG Electronics Inc.", "code": "LG345N1C-V5", "quantity": 18 } ], "total_module_quantity": 18, "inverters": [ { "manufacturer_name": "123", "code": "123", "quantity": 1 } ], "batteries": [ { "manufacturer_name": "GoodWe", "code": "2*LX U5.4-L", "quantity": 1 } ], "other_components": [ { "manufacturer_name": "Hardware Co.", "code": "dc_isolator_xyz", "quantity": 1 } ], "adders": [ { "label": "Adder", "total_value": 20.0, "total_cost": 0, "show_customer": false, "quantity": 2 }, { "label": "Discount", "total_value": -30.0, "total_cost": 0, "show_customer": false, "quantity": 3 }, { "label": "Cost", "total_value": 0, "total_cost": 20.0, "show_customer": false, "quantity": 1 } ], "module_groups": [ { "module_quantity": 18, "azimuth": 7, "slope": 20.0, "layout": "portrait" } ], "incentives": [ { "paid_to_customer": true, "value": 884, "title": "6% Base Federal Investment Tax Credit (ITC)" } ], "data":{} }, ... ] } ``` -------------------------------- ### GET /api/orgs/:org_id/projects/:project_id/systems/details/ Source: https://developers.opensolar.com/api/system-details Returns an object with design-related data for each system in a given project. The data returned includes hardware, adders, incentives and information on module layout. This endpoint is only accessible for projects owned by the organization. ```APIDOC ## GET /api/orgs/:org_id/projects/:project_id/systems/details/ ### Description Retrieves comprehensive design details for all systems within a specified project, encompassing hardware, adders, incentives, and module layout information. ### Method GET ### Endpoint `/api/orgs/:org_id/projects/:project_id/systems/details/` ### Parameters #### Path Parameters - **org_id** (string) - Required - The unique identifier for the organization. - **project_id** (string) - Required - The unique identifier for the project. #### Query Parameters - **limit_to_sold** (boolean) - Optional - If true, only systems that have been sold will be returned. - **include_parts** (string) - Optional - Allows specifying particular fields to include in the system data. Cannot be used with `exclude_parts`. - **exclude_parts** (string) - Optional - Allows specifying particular fields to exclude from the system data. Cannot be used with `include_parts`. ### Request Example ```curl https://api.opensolar.com/api/orgs/:org_id/projects/:project_id/systems/details/?limit_to_sold=true -H "Authorization: Bearer " ``` ### Response #### Success Response (200) - **systems** (array) - An array of system objects, each containing detailed design information. - **kw_stc** (number) - The system's capacity in kW STC. - **uuid** (string) - The unique identifier for the system. - **id** (integer) - The system's internal ID. - **name** (string) - The name of the system. - **modules** (array) - Array of module objects. - **manufacturer_name** (string) - Name of the module manufacturer. - **code** (string) - Manufacturer's code for the module. - **quantity** (integer) - Number of modules. - **total_module_quantity** (integer) - Total count of modules across all groups. - **inverters** (array) - Array of inverter objects. - **manufacturer_name** (string) - Name of the inverter manufacturer. - **code** (string) - Manufacturer's code for the inverter. - **quantity** (integer) - Number of inverters. - **batteries** (array) - Array of battery objects. - **manufacturer_name** (string) - Name of the battery manufacturer. - **code** (string) - Manufacturer's code for the battery. - **quantity** (integer) - Number of batteries. - **other_components** (array) - Array of other component objects. - **manufacturer_name** (string) - Name of the component manufacturer. - **code** (string) - Manufacturer's code for the component. - **quantity** (integer) - Number of components. - **adders** (array) - Array of adder objects. - **label** (string) - Label for the adder. - **total_value** (number) - Total value of the adder. - **total_cost** (number) - Total cost associated with the adder. - **show_customer** (boolean) - Whether to show the adder to the customer. - **quantity** (integer) - Quantity of the adder. - **module_groups** (array) - Array of module group objects. - **module_quantity** (integer) - Number of modules in this group. - **azimuth** (integer) - Azimuth angle of the module group. - **slope** (number) - Slope angle of the module group. - **layout** (string) - Layout orientation of the modules. - **incentives** (array) - Array of incentive objects. - **paid_to_customer** (boolean) - Whether the incentive is paid to the customer. - **value** (number) - The value of the incentive. - **title** (string) - The title of the incentive. - **data** (object) - Additional system data. #### Response Example ```json { "systems": [ { "kw_stc": 6.21, "uuid": "E583FD88-EB6C-4311-91A9-AC719041EAA8", "id": 8280, "name": "System 1 (6.21 kW)", "modules": [ { "manufacturer_name": "LG Electronics Inc.", "code": "LG345N1C-V5", "quantity": 18 } ], "total_module_quantity": 18, "inverters": [ { "manufacturer_name": "123", "code": "123", "quantity": 1 } ], "batteries": [ { "manufacturer_name": "GoodWe", "code": "2*LX U5.4-L", "quantity": 1 } ], "other_components": [ { "manufacturer_name": "Hardware Co.", "code": "dc_isolator_xyz", "quantity": 1 } ], "adders": [ { "label": "Adder", "total_value": 20.0, "total_cost": 0, "show_customer": false, "quantity": 2 }, { "label": "Discount", "total_value": -30.0, "total_cost": 0, "show_customer": false, "quantity": 3 }, { "label": "Cost", "total_value": 0, "total_cost": 20.0, "show_customer": false, "quantity": 1 } ], "module_groups": [ { "module_quantity": 18, "azimuth": 7, "slope": 20.0, "layout": "portrait" } ], "incentives": [ { "paid_to_customer": true, "value": 884, "title": "6% Base Federal Investment Tax Credit (ITC)" } ], "data":{} } ] } ``` ``` -------------------------------- ### List Pricing Schemes - cURL Request Source: https://developers.opensolar.com/api/pricing-schemes Demonstrates how to retrieve a list of all pricing schemes for a given organization using a cURL command. It includes the necessary endpoint, authorization header, and potential query parameters for filtering and pagination. ```shell curl "https://api.opensolar.com/api/orgs/:org_id/pricing_schemes/" \ -H "Authorization: Bearer " ``` -------------------------------- ### GET /api/orgs/:org_id/webhooks/ Source: https://developers.opensolar.com/api/webhooks Retrieves a list of all configured webhooks for a specific organization. ```APIDOC ## GET /api/orgs/:org_id/webhooks/ ### Description Retrieves a list of all configured webhooks for a specific organization. ### Method GET ### Endpoint /api/orgs/:org_id/webhooks/ ### Parameters #### Path Parameters - **org_id** (string) - Required - The unique identifier of the organization. ### Request Example (No request body for GET requests) ### Response #### Success Response (200) - **webhooks** (array) - A list of webhook objects. - **id** (string) - The unique identifier of the webhook. - **endpoint** (string) - The URL to which webhook payloads will be sent. - **trigger_fields** (array) - List of fields that trigger the webhook. - **payload_fields** (array) - List of fields to include in the webhook payload. - **enabled** (boolean) - Indicates if the webhook is active. - **debug** (boolean) - Indicates if debug mode is enabled for the webhook. #### Response Example ```json { "webhooks": [ { "id": "whk_12345", "endpoint": "https://example.com/webhook-receiver", "trigger_fields": ["contact.first_name"], "payload_fields": ["contact.email"], "enabled": true, "debug": false } ] } ``` ``` -------------------------------- ### Get Project Source: https://developers.opensolar.com/api/projects Retrieves details for a specific project by its ID. ```APIDOC ## GET /api/orgs/:org_id/projects/:id/ ### Description Retrieves detailed information about a specific project using its unique identifier. ### Method GET ### Endpoint /api/orgs/:org_id/projects/:id/ ### Parameters #### Path Parameters - **org_id** (integer) - Required - The unique identifier of the organization. - **id** (integer) - Required - The unique identifier of the project. ### Response #### Success Response (200) Returns a project object with all its details. #### Response Example (Example response structure is similar to the 'List Projects' example, but for a single project.) ``` -------------------------------- ### Create Project using cURL Source: https://developers.opensolar.com/api/projects This snippet demonstrates how to create a new project via the OpenSolar API using a cURL command. It includes setting headers for content type and authorization, specifying the HTTP request method as POST, and providing project details in JSON format. The response includes the newly created project's ID and associated data. ```curl curl "https://api.opensolar.com/api/orgs/:org_id/projects/" \ --header "Content-Type: application/json" \ --header "Authorization: Bearer " \ --request POST \ -d '{ "identifier": "123456", "is_residential": "1", "lead_source": "Door Knockers", "notes": "Has a pool, needs LG panel.", "lat": "35.12364", "lon": "128.23216", "address": "123 Fake st", "locality": "Fakesville", "state": "NSW", "country_iso2": "AU", "zip": "2020", "number_of_phases": "1", "roof_type": "https://api.opensolar.com/api/roof_types/6/", "assigned_role": "https://api.opensolar.com/api/orgs/1/roles/123/", "contacts_new": [ { "first_name": "George", "family_name": "Costanza", "email": "gconstanza@vanderlayindustries.com", "phone": "0400000000", "date_of_birth": "1990-01-01", "gender": "2" } ] }' ``` -------------------------------- ### Get Contact Source: https://developers.opensolar.com/api/contacts Retrieves details for a specific contact within an organization. ```APIDOC ## GET /api/orgs/:org_id/contacts/:id/ ### Description Retrieves details for a specific contact within an organization. ### Method GET ### Endpoint /api/orgs/:org_id/contacts/:id/ ### Parameters #### Path Parameters - **org_id** (string) - Required - The ID of the organization. - **id** (integer) - Required - The ID of the contact to retrieve. ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the contact. - **first_name** (string) - The first name of the contact. - **family_name** (string) - The family name of the contact. #### Response Example ```json { "id": 34, "first_name": "Edmond", "family_name": "Becquerel", ... } ``` ``` -------------------------------- ### API Conventions - Lists and Pagination Source: https://developers.opensolar.com/api/api-conventions Details standard parameters for list endpoints, including limit, page, range, and ordering. ```APIDOC ## API Conventions - Lists and Pagination ### Description Endpoints using the `list` fieldset support standard parameters for controlling pagination and sorting. ### Method GET ### Endpoint `/websites/developers_opensolar_api/` (and other list endpoints) ### Parameters #### Query Parameters - **limit** (integer) - Optional - Amount of records per page. - **page** (integer) - Optional - The page to load. - **range** (string) - Optional - A URL encoded representation of the record range requested (e.g. `[0,19]` encoded as `%5B0%2C19%5D`). - **ordering** (string) - Optional - The field to sort on, prepended by a minus (`-`) for ascending order (e.g. `ordering: -id`). ### Request Example ```json { "example": "GET /api/items?limit=20&page=1&ordering=-created_at" } ``` ### Response #### Success Response (200) - **results** (array) - A list of records. - **count** (integer) - The total number of records available. #### Response Example ```json { "example": { "count": 100, "results": [ { "id": 1, "name": "Example Item" } // ... more items ] } } ``` ``` -------------------------------- ### GET /api/orgs/:org_id/roles/ Source: https://developers.opensolar.com/api/roles Retrieves a list of all roles within a specified organization. ```APIDOC ## GET /api/orgs/:org_id/roles/ ### Description Retrieves a list of all roles within a specified organization. ### Method GET ### Endpoint /api/orgs/:org_id/roles/ ### Parameters #### Path Parameters - **org_id** (string) - Required - The ID of the organization. ### Request Example ``` curl "https://api.opensolar.com/api/orgs/:org_id/roles/" -H "Authorization: Bearer " ``` ### Response #### Success Response (200) - **roles** (array) - A list of role objects. - **id** (integer) - The role ID. - **email** (string) - The user's email address. - **is_admin** (boolean) - Indicates if the user is an administrator. - **user** (string) - URL to the user resource. - **user_email** (string) - The user's email address. - **org** (string) - URL to the organization resource. - **is_hidden** (boolean) - Indicates if the role is hidden. - **url** (string) - URL to the role resource. - **first_name** (string) - The user's first name. - **family_name** (string) - The user's family name. - **job_title** (string) - The user's job title. - **accreditation** (string) - The user's accreditation. - **user_phone** (string) - The user's phone number. - **display** (string) - The display name of the user. - **phone** (string) - The user's phone number. - **allow_email_notifications** (boolean) - Indicates if email notifications are allowed. - **portrait_image** (null) - The user's portrait image URL (can be null). - **google_calendar_id** (null) - The user's Google Calendar ID (can be null). - **has_logged_in** (boolean) - Indicates if the user has logged in. - **schedule_meeting_url** (string) - URL for scheduling a meeting. - **schedule_meeting_label** (string) - Label for scheduling a meeting. - **api_key_chat** (string) - API key for chat features. - **user_is_staff** (boolean) - Indicates if the user is staff. - **org_name** (string) - The name of the organization. #### Response Example ```json [ { "id": 99, "email": "john@workplace.com.au", "is_admin": true, "user": "https://api.opensolar.com/auth/users/99/", "user_email": "john@workplace.com.au", "org": "https://api.opensolar.com/api/orgs/88/", "is_hidden": false, "url": "https://api.opensolar.com/api/orgs/88/roles/77/", "first_name": "John", "family_name": "Person", "job_title": "Sales Person", "accreditation": "", "user_phone": "", "display": "John person", "phone": "94811111", "allow_email_notifications": true, "portrait_image": null, "google_calendar_id": null, "has_logged_in": true, "schedule_meeting_url": "https://calendly.com/john-os/customer-walk-through", "schedule_meeting_label": "Schedule a time to discuss!", "api_key_chat": "1234-567-11-0000", "user_is_staff": true, "org_name": "SunCo" }, ... ] ``` ``` -------------------------------- ### Payment Options List Response - JSON Source: https://developers.opensolar.com/api/payment-options This is a sample JSON response for retrieving a list of payment options. Each object represents a payment option with detailed configuration, metadata, and identifiers. The response can be paginated and filtered using query parameters. ```json [ { "url": "https://api.opensolar.com/api/orgs/1/payment_options/242/", "org": "https://api.opensolar.com/api/orgs/1/", "utility_tariff_override": null, "is_archived": false, "payment_type": "loan_advanced", "title": "1 year Delay", "priority": 1, "configuration_json": "{\"collect_signature\":true,\"final_payment_frequency\":\"monthly\",\"final_term\":24,\"final_interest_rate\":6,\"final_dealer_fee_percentage\":null,\"final_dealer_fee_fixed\":null,\"down_payment_percentage\":10,\"down_payment_min\":10,\"down_payment_max\":10000,\"delayed_down_payment_duration\":12,\"down_payment_interest_rate\":7,\"down_payment_dealer_fee_percentage\":10,\"down_payment_dealer_fee_fixed\":50}", "description": "", "integration_external_reference": null, "created_date": "2019-10-13T23:51:34.296889Z", "modified_date": "2019-10-20T02:40:51.347454Z", "auto_apply_enabled": false, "use_highest_standard_system_price": true, "auto_discount": true, "auto_apply_only_specified_states": null, "auto_apply_only_specified_zips": null, "contract_template": "", "id": 242 }, ... ] ``` -------------------------------- ### GET /api/orgs/:org_id/ Source: https://developers.opensolar.com/api/orgs Retrieves the details of a specific organization using its unique identifier. ```APIDOC ## GET /api/orgs/:org_id/ ### Description Retrieves the details of a specific organization using its unique identifier. ### Method GET ### Endpoint /api/orgs/:org_id/ ### Parameters #### Path Parameters - **org_id** (string) - Required - The unique identifier of the organization. ### Request Example ```curl https://api.opensolar.com/api/orgs/:org_id/ --header "Authorization: Bearer " ``` ### Response #### Success Response (200) - **id** (integer) - The unique identifier of the organization. - **name** (string) - The name of the organization. - **projects** (string) - URL to fetch projects associated with the organization. #### Response Example ```json { "id": 1, "name": "My Company Name", "projects": "https://api.opensolar.com/api/orgs/:org_id/projects/", "...": "..." } ``` ``` -------------------------------- ### GET /api/orgs/:org_id/roles/:id/ Source: https://developers.opensolar.com/api/roles Retrieves details for a specific role within an organization. ```APIDOC ## GET /api/orgs/:org_id/roles/:id/ ### Description Retrieves details for a specific role within an organization. ### Method GET ### Endpoint /api/orgs/:org_id/roles/:id/ ### Parameters #### Path Parameters - **org_id** (string) - Required - The ID of the organization. - **id** (string) - Required - The ID of the role. #### Query Parameters - **fieldset** (list) - Optional - Specifies the fields to include in the response. - **range** (string) - Optional - Specifies the range of results to retrieve. - **page** (integer) - Optional - Specifies the page number of results. - **limit** (integer) - Optional - Specifies the maximum number of results per page. - **ordering** (string) - Optional - Specifies the field to order the results by (e.g., 'id', 'is_admin'). ### Request Example ``` curl "https://api.opensolar.com/api/orgs/:org_id/roles/:id/" -H "Authorization: Bearer " ``` ### Response #### Success Response (200) - **role** (object) - Details of the specified role. - **id** (integer) - The role ID. - **email** (string) - The user's email address. - **is_admin** (boolean) - Indicates if the user is an administrator. - **user** (string) - URL to the user resource. - **user_email** (string) - The user's email address. - **org** (string) - URL to the organization resource. - **is_hidden** (boolean) - Indicates if the role is hidden. - **url** (string) - URL to the role resource. - **first_name** (string) - The user's first name. - **family_name** (string) - The user's family name. - **job_title** (string) - The user's job title. - **accreditation** (string) - The user's accreditation. - **user_phone** (string) - The user's phone number. - **display** (string) - The display name of the user. - **phone** (string) - The user's phone number. - **allow_email_notifications** (boolean) - Indicates if email notifications are allowed. - **portrait_image** (null) - The user's portrait image URL (can be null). - **google_calendar_id** (null) - The user's Google Calendar ID (can be null). - **has_logged_in** (boolean) - Indicates if the user has logged in. - **schedule_meeting_url** (string) - URL for scheduling a meeting. - **schedule_meeting_label** (string) - Label for scheduling a meeting. - **api_key_chat** (string) - API key for chat features. - **user_is_staff** (boolean) - Indicates if the user is staff. - **org_name** (string) - The name of the organization. #### Response Example ```json { "id": 99, "email": "john@workplace.com.au", "is_admin": true, "user": "https://api.opensolar.com/auth/users/99/", "user_email": "john@workplace.com.au", "org": "https://api.opensolar.com/api/orgs/88/", "is_hidden": false, "url": "https://api.opensolar.com/api/orgs/88/roles/77/", "first_name": "John", "family_name": "Person", "job_title": "Sales Person", "accreditation": "", "user_phone": "", "display": "John person", "phone": "94811111", "allow_email_notifications": true, "portrait_image": null, "google_calendar_id": null, "has_logged_in": true, "schedule_meeting_url": "https://calendly.com/john-os/customer-walk-through", "schedule_meeting_label": "Schedule a time to discuss!", "api_key_chat": "1234-567-11-0000", "user_is_staff": true, "org_name": "SunCo" } ``` ```