{"openapi":"3.1.0","info":{"version":"1.0.0","title":"Derapi API Reference","contact":{"name":"Derapi.com","url":"https://derapi.com","email":"sales@derapi.com"}},"servers":[{"url":"https://api.derapi.com"}],"security":[{"DerapiAPIKey":[]},{"DerapiOAuth":[]}],"tags":[{"name":"Virtual","description":"Endpoints for managing Virtual Site and device configurations"},{"name":"Vendor Credentials","description":"Endpoints for managing vendor and device credentials"},{"name":"Join","description":"Join endpoints for collecting end-customer authorization"},{"name":"Enrollments","description":"Endpoints for enrolling new devices"},{"name":"Sites","description":"Site-level endpoints"},{"name":"Solar Inverters","description":"Solar Inverter monitoring endpoints"},{"name":"Batteries","description":"Battery monitoring endpoints"},{"name":"EV Chargers","description":"EV Charger monitoring endpoints"},{"name":"Thermostats","description":"Thermostat monitoring endpoints"},{"name":"Control Events","description":"Endpoints for creating and managing control events"},{"name":"API Keys","description":"Endpoints for managing API Keys"}],"paths":{"/sites":{"get":{"tags":["Sites"],"operationId":"listSites","summary":"List Sites","description":"Returns a [paginated](/reference/overview#pagination) list of Sites.\n\nThe returned list can be optionally filtered by vendor and vendor ID.\n","parameters":[{"$ref":"#/components/parameters/Vendor"},{"$ref":"#/components/parameters/VendorID"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSitesResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/sites/{id}":{"get":{"tags":["Sites"],"operationId":"getSite","summary":"Get Site details","description":"Returns details for a single Site including the list of devices associated\nwith the Site.\n","parameters":[{"name":"id","in":"path","description":"ID of the Site to return","required":true,"schema":{"$ref":"#/components/schemas/SiteID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSiteResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/sites/{id}/battery-intervals":{"get":{"tags":["Sites"],"operationId":"getSiteBatteryIntervals","summary":"Get Site-level Battery Intervals","description":"Returns Site-level Battery charge and discharge data aggregated to the\nspecific summary level requested for a specified start and end date. The\nenergy data values are represented in kWh.\n\nSee [Interval Data Overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor broader context on interval data endpoints.\n\nSee also [GetBatteryIntervals](https://docs.derapi.com/reference/getbatteryintervals) for\na similar endpoint that returns data for an individual Battery.\n","parameters":[{"name":"id","in":"path","description":"ID of the Site to query","required":true,"schema":{"$ref":"#/components/schemas/SiteID"}},{"$ref":"#/components/parameters/SummaryLevel"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/Missing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSiteBatteryIntervalsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/sites/{id}/solar-intervals":{"get":{"tags":["Sites"],"operationId":"getSiteSolarInverterIntervals","summary":"Get Site-level Solar Intervals","description":"Returns Site-level solar production data aggregated to the specific\nsummary level requested for a specified start and end date. The energy\ndata values are represented in kWh.\n\nSee [Interval Data Overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor broader context on interval data endpoints.\n\nSee also [GetSolarInverterIntervals](https://docs.derapi.com/reference/getsolarinverterintervals) for\na similar endpoint that returns data for an individual Solar Inverter.\n","parameters":[{"name":"id","in":"path","description":"ID of the Site to query","required":true,"schema":{"$ref":"#/components/schemas/SiteID"}},{"$ref":"#/components/parameters/SummaryLevel"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/Missing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSiteSolarInverterIntervalsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/sites/{id}/consumption-intervals":{"get":{"tags":["Sites"],"operationId":"getSiteConsumptionIntervals","summary":"Get Site-level Meter Energy Consumption","description":"Returns Site-level energy (kWh) consumed by loads at the Site. This load could be served\nby grid, Battery, or solar sources depending on the system configuration.\n\nSee [Interval Data Overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor broader context on interval data endpoints.\n","parameters":[{"name":"id","in":"path","description":"ID of the Site to query","required":true,"schema":{"$ref":"#/components/schemas/SiteID"}},{"$ref":"#/components/parameters/SummaryLevel"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/Missing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSiteConsumptionIntervalsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/sites/{id}/tags":{"parameters":[{"name":"id","description":"The ID of the Site which you're addressing","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SiteID"}}],"patch":{"tags":["Sites"],"summary":"Update Site Tags","description":"Add or update tags on a Site. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","operationId":"updateSiteTags","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSiteTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/sites/{id}/sync":{"post":{"tags":["Sites"],"operationId":"syncSite","summary":"Sync Site details","description":"Request a sync of the Site details from the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the Site has been\nsynced recently already.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the Site to sync","required":true,"schema":{"$ref":"#/components/schemas/SiteID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncSiteResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/solar-inverters":{"get":{"tags":["Solar Inverters"],"summary":"List Solar Inverters","description":"Returns a [paginated](/reference/overview#pagination) list of Solar Inverters.\n\nThe returned list can be optionally filtered by vendor and vendor ID.\n","operationId":"listSolarInverters","parameters":[{"$ref":"#/components/parameters/SolarInverterVendor"},{"$ref":"#/components/parameters/VendorID"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSolarInvertersResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/solar-inverters/{id}":{"get":{"tags":["Solar Inverters"],"summary":"Get Solar Inverter details","description":"Returns details for a single Solar Inverter","operationId":"getSolarInverter","parameters":[{"name":"id","in":"path","description":"ID of the solar inverter to return","required":true,"schema":{"$ref":"#/components/schemas/SolarInverterID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSolarInverterResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/solar-inverters/{id}/intervals":{"get":{"tags":["Solar Inverters"],"summary":"Get Solar Inverter Interval Data","description":"Returns production data for a specific solar inverter aggregated to the specific\nsummary level requested for a specified start and end date. The energy\ndata values are represented in kWh.\n\nSee [Interval Data Overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor broader context on interval data endpoints.\n\nSee also [GetSiteSolarInverterIntervals](https://docs.derapi.com/reference/getsitesolarinverterintervals) for\na similar endpoint that returns data for all Solar Inverters at a Site.\n","operationId":"getSolarInverterIntervals","parameters":[{"name":"id","in":"path","description":"ID of the solar inverter to query","required":true,"schema":{"$ref":"#/components/schemas/SolarInverterID"}},{"$ref":"#/components/parameters/SummaryLevel"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/Missing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSolarInverterIntervalsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/solar-inverters/{id}/tags":{"parameters":[{"name":"id","description":"the ID for the Solar Inverter","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SolarInverterID"}}],"patch":{"tags":["Solar Inverters"],"summary":"Update Solar Inverter Tags","description":"Add or update tags on a Solar Inverter. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","operationId":"updateSolarInverterTags","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSolarInverterTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/solar-inverters/{id}/sync":{"post":{"tags":["Solar Inverters"],"operationId":"syncSolarInverter","summary":"Sync Solar Inverter details","description":"Request a sync of the Solar Inverter details from the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the Solar Inverter has been\nsynced recently already.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the Solar Inverter to sync","required":true,"schema":{"$ref":"#/components/schemas/SolarInverterID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncSolarInverterResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/batteries":{"get":{"tags":["Batteries"],"summary":"List Batteries","description":"Returns a [paginated](/reference/overview#pagination) list of Batteries.\n\nThe returned list can be optionally filtered by vendor and vendor ID.\n","operationId":"listBatteries","parameters":[{"$ref":"#/components/parameters/BatteryVendor"},{"$ref":"#/components/parameters/VendorID"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListBatteriesResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/batteries/{id}":{"get":{"tags":["Batteries"],"operationId":"getBattery","summary":"Get Battery Details","description":"Returns details for a single Battery","parameters":[{"name":"id","in":"path","description":"ID of the Battery to return","required":true,"schema":{"$ref":"#/components/schemas/BatteryID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBatteryResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/batteries/{id}/intervals":{"get":{"tags":["Batteries"],"operationId":"getBatteryIntervals","summary":"Get Battery Interval Data","description":"Returns individual Battery charge and discharge data aggregated to the\nspecific granularity requested for a specified start and end date. The\nenergy data values are represented in kWh.\n\nSee [Interval Data Overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor broader context on interval data endpoints.\n\nSee also [GetSiteBatteryIntervals](https://docs.derapi.com/reference/getsitebatteryintervals) for\na similar endpoint that returns data for all Batteries at a Site.\n","parameters":[{"name":"id","in":"path","description":"ID of the Battery to query","required":true,"schema":{"$ref":"#/components/schemas/BatteryID"}},{"$ref":"#/components/parameters/SummaryLevel"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/Missing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetBatteryIntervalsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/batteries/{id}/tags":{"parameters":[{"name":"id","description":"the ID for the Battery","in":"path","required":true,"schema":{"$ref":"#/components/schemas/BatteryID"}}],"patch":{"tags":["Batteries"],"summary":"Update Battery Tags","description":"Add or update tags on a Battery. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","operationId":"updateBatteryTags","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateBatteryTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/programs":{"get":{"tags":["Enrollments"],"summary":"List Programs","description":"Returns the list of Programs that devices are, or can be, enrolled in.\n","operationId":"listPrograms","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListProgramsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/programs/{id}":{"parameters":[{"name":"id","description":"The ID of the Program which you're addressing","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProgramID"}}],"get":{"tags":["Enrollments"],"summary":"Get Program details","description":"Returns Program details including participating vendors and device types.\n","operationId":"getProgram","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetProgramResponse"}}}},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/programs/{id}/tags":{"parameters":[{"name":"id","description":"The ID of the Program which you're addressing","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ProgramID"}}],"patch":{"tags":["Enrollments"],"summary":"Update Program Tags","description":"Add or update tags on a Program. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","operationId":"updateProgramTags","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProgramTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/programs/{id}/sync":{"post":{"tags":["Enrollments"],"operationId":"syncProgram","summary":"Sync Program details","description":"Request a sync of the Program details with the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the Program has been\nsynced recently already.\n\nNot all vendors have a notion of Programs in their systems. If the targeted Program does not include any\nvendors who have a notion of Programs, Derapi will ignore this request.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the Program to sync","required":true,"schema":{"$ref":"#/components/schemas/ProgramID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncProgramResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/enrollments":{"get":{"tags":["Enrollments"],"summary":"List Enrollments","description":"Returns a [paginated](/reference/overview#pagination) list of Enrollments, including Site references and Enrollment status history.\n\nThe returned list can be optionally filtered by vendor and Program.\n","operationId":"listEnrollments","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Vendor"},{"name":"programID","description":"Program ID to filter by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ProgramID"}},{"name":"status","description":"Status to filter by; can be provided multiple times to include multiple statuses.","in":"query","required":false,"schema":{"$ref":"#/components/schemas/EnrollmentStatus"},"style":"form","explode":true},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"},{"name":"siteID","description":"Site ID to filter by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SiteID"}},{"name":"utilityAccountNumber","description":"Filter Enrollments by utility account number. Returns Enrollments where\nat least one Application has this utility account number.\n\nThe search is case-insensitive and ignores non-alphanumeric characters\n(dashes, spaces, etc.). For example, \"AC-123 456\" and \"ac123456\" are\ntreated as equivalent.\n","in":"query","required":false,"schema":{"type":"string"},"example":"AC-123456"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListEnrollmentsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/enrollments/submit":{"post":{"tags":["Enrollments"],"summary":"Submit an Enrollment","description":"Submits an Enrollment for the given Program.\n\nAny Enrollment created via this path requires vendor approval, and so\nwill begin with the status `pendingvendor`.\n\nClients can avoid duplicate submissions using the specified `Idempotency-Key`\nheader. Appropriate values are non-PII customer identifiers which guarantee\na unique customer on the clients' end.\n","operationId":"submitEnrollment","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitEnrollmentRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitEnrollmentResponse"}}}},"403":{"$ref":"#/components/responses/IncorrectModeProblemResponse"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/enrollments/{id}":{"parameters":[{"$ref":"#/components/parameters/EnrollmentID"},{"$ref":"#/components/parameters/IncludePII"}],"get":{"tags":["Enrollments"],"summary":"Get Enrollment details","description":"Returns Enrollment details and history for a specific Enrollment.\n","operationId":"getEnrollment","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetEnrollmentResponse"}}}},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/enrollments/{id}/additional-info":{"parameters":[{"$ref":"#/components/parameters/EnrollmentID"}]},"/enrollments/{id}/applications":{"parameters":[{"$ref":"#/components/parameters/EnrollmentID"}],"post":{"tags":["Enrollments"],"summary":"Record a new application","description":"Record a new application for an existing Enrollment record on behalf of a user.\n\nNew applications are accepted when the status of the Enrollment is not currently\n'enrolled.'\n","operationId":"createEnrollmentApplication","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnrollmentApplicationRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"409":{"description":"Enrollment Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/EnrollmentApplicationConflictProblem"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/enrollments/{id}/events":{"parameters":[{"$ref":"#/components/parameters/EnrollmentID"}],"post":{"tags":["Enrollments"],"summary":"Create an Enrollment event","description":"Record an event for an existing Enrollment record.\n\nFor example, use type of `unenrolled` to indicate\na customer has unenrolled from the Program.\n","operationId":"createEnrollmentEvent","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateEnrollmentEventRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"409":{"description":"Invalid Enrollment event","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InvalidEnrollmentStatusProblem"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/enrollments/{id}/tags":{"parameters":[{"name":"id","description":"The ID of the Enrollment which you're addressing","in":"path","required":true,"schema":{"$ref":"#/components/schemas/EnrollmentID"}}],"patch":{"tags":["Enrollments"],"summary":"Update Enrollment Tags","description":"Add or update tags on an Enrollment. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","operationId":"updateEnrollmentTags","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateEnrollmentTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/enrollments/{id}/sync":{"post":{"tags":["Enrollments"],"operationId":"syncEnrollment","summary":"Sync Enrollment details","description":"Request a sync of the Enrollment details from the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the Enrollment has been\nsynced recently already.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the Enrollment to sync","required":true,"schema":{"$ref":"#/components/schemas/EnrollmentID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncEnrollmentResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/vendor-credentials":{"get":{"tags":["Vendor Credentials"],"operationId":"listVendorCredentials","summary":"Lists Vendor Credentials","description":"Lists stored vendor credentials, paginated and optionally filtered.","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Vendor"},{"name":"name","in":"query","description":"The name of vendor credentials to filter for","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVendorCredentialsResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"post":{"tags":["Vendor Credentials"],"operationId":"createVendorCredentials","summary":"Create Vendor Credentials","description":"Stores vendor credentials as specified.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVendorCredentialsRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVendorCredentialsResponse"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsAlreadyExistProblem"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/vendor-credentials/{id}":{"parameters":[{"name":"id","description":"the ID for the vendor credentials","in":"path","required":true,"schema":{"$ref":"#/components/schemas/VendorCredentialsID"}},{"$ref":"#/components/parameters/IncludeSecrets"}],"get":{"tags":["Vendor Credentials"],"operationId":"getVendorCredentials","summary":"Get Vendor Credentials","description":"Fetches the Derapi managed credentials for the specified vendor and name","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVendorCredentialsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"delete":{"tags":["Vendor Credentials"],"operationId":"deleteVendorCredentials","summary":"Delete Vendor Credentials","description":"Deletes the stored vendor credentials with this ID","responses":{"204":{"description":"The vendor credentials were deleted successfully."},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/vendor-credentials/{id}/sync":{"post":{"tags":["Vendor Credentials"],"operationId":"syncVendorCredentials","summary":"Sync Vendor Credentials details","description":"Request a sync of the Vendor Credentials details from the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the Vendor Credentials have been\nsynced recently already.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the Vendor Credentials to sync","required":true,"schema":{"$ref":"#/components/schemas/VendorCredentialsID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncVendorCredentialsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/join/flows":{"post":{"tags":["Join"],"operationId":"createJoinFlow","summary":"Create a Join flow","description":"Create a Join Flow. A Flow combines configurations for one or more vendors that may be used\nto allow system owners to grant authorization for systems they control. Flows are reusable\nacross multiple authorization sessions.\n\nUpon completion of a session for this Flow, a redirect to the given `redirectURI` will be served.\nThe redirect URI will receive a `state` query string parameter matching the `state` parameter\nthat was provided when the session was initiated via the `/join/flows/{flowID}/authorize` endpoint.\n\nUpon success, the redirect URI will also receive an `enrollmentID` query string parameter, if the\nFlow was associated with a Program.\n\nUpon failure, the redirect URI will receive an `error` query string parameter\nwith an [OAuth error code](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1) and an optional\n`error_description` parameter with a description of the error.\n\nFlows may be deleted, but are immutable after creation.\n\nSee the [Working with Production Devices](/docs/production-devices) guide for more context on usage of this API.\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJoinFlowRequest"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateJoinFlowResponse"}}}},"403":{"$ref":"#/components/responses/IncorrectModeProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"get":{"tags":["Join"],"operationId":"listJoinFlows","summary":"List Join flows","description":"List Join flows.\n","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListJoinFlowsResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/join/flows/{id}/authorize":{"get":{"operationId":"getJoinFlowAuthorize","tags":["Join"],"security":[],"summary":"Create a Join session","description":"Create a Join session, and redirect to a vendor's authorization page to allow\nthe system owner to provide their consent.\n\nThis endpoint may be accessed without Derapi authentication, since it is\nintended to be usable by frontend code running in system owners' browsers.\n","parameters":[{"name":"id","in":"path","description":"The Join flow ID to use for the resulting session.","required":true,"schema":{"type":"string","examples":["flow-1234"]}},{"name":"state","in":"query","description":"A opaque client-supplied token which may be used to maintain state between this request and the resulting redirect\nto the flow's redirect URI upon authorization completion, as in OAuth 2.0.\n\nThe client should use a high-entropy random string for this value, e.g. one returned by `crypto.randomUUID()`.\nThe same state parameter will be included as a query string parameter when redirecting to the flow's redirect URI.\n","required":false,"schema":{"type":"string","examples":["323f8180e8b44a54a428a6f4ff8283aa"]}},{"name":"vendor","in":"query","description":"The vendor to authorize with. Must be one of the vendors supplied when the session was created.","required":true,"schema":{"type":"string","examples":["enphase"]}}],"responses":{"302":{"description":"Redirect","headers":{"Location":{"schema":{"type":"string","description":"The URL to redirect the system owner to for authorization.","examples":["https://api.enphaseenergy.com/oauth/authorize?client_id=1234567890&redirect_uri=https%3A%2F%2Fapi.derapi.com%2Fjoin%2Fcallback%3Fvendor%3Denphase&response_type=code&state=323f8180e8b44a54a428a6f4ff8283aa"]}}}},"404":{"x-python-unsupported":true,"description":"Flow ID not found, or vendor not found in flow.","$ref":"#/components/responses/NotFoundProblemOrErrorPage"},"422":{"x-python-unsupported":true,"description":"Vendor not found in flow.","$ref":"#/components/responses/ValidationProblemOrErrorPage"}}}},"/join/flows/{id}":{"get":{"tags":["Join"],"operationId":"getJoinFlow","summary":"Get Join flow details","description":"Get details about a Join flow.\n","parameters":[{"name":"id","in":"path","description":"ID of the Join flow","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetJoinFlowResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}},"delete":{"tags":["Join"],"operationId":"deleteJoinFlow","summary":"Delete a Join flow","description":"Delete a Join flow. Flows with active sessions may not be deleted.\n","parameters":[{"name":"id","in":"path","description":"ID of the Join flow to be deleted","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"OK"},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/virtual/sites":{"post":{"operationId":"createVirtualSite","tags":["Virtual"],"summary":"Create a Virtual Site","description":"Create a Virtual Site test configuration in the current sandbox.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualSiteRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualSiteResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"get":{"operationId":"listVirtualSites","tags":["Virtual"],"summary":"List Virtual Sites","description":"List Virtual Site test configurations in the current sandbox.","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVirtualSitesResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/sites/{id}":{"parameters":[{"name":"id","in":"path","description":"The ID of the Virtual Site test configuration","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getVirtualSite","tags":["Virtual"],"summary":"Get Virtual Site Details","description":"Get Virtual Site test configuration in the current sandbox.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVirtualSiteResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"delete":{"operationId":"deleteVirtualSite","tags":["Virtual"],"summary":"Delete a Virtual Site","description":"Delete Virtual Site test configuration in the current sandbox.","responses":{"204":{"description":"The Virtual Site test configuration was deleted successfully."},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/batteries":{"post":{"operationId":"createVirtualBattery","tags":["Virtual"],"summary":"Create a Virtual Battery","description":"Create Virtual Battery test configuration in the current sandbox.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualBatteryRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualBatteryResponse"}}}},"400":{"x-python-unsupported":true,"$ref":"#/components/responses/TooManyVirtualResourcesProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"get":{"operationId":"listVirtualBatteries","tags":["Virtual"],"summary":"List Virtual Batteries","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"description":"List Virtual Battery test configurations in the current sandbox.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVirtualBatteriesResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/batteries/{id}":{"parameters":[{"name":"id","in":"path","description":"The ID of the Virtual Battery","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getVirtualBattery","tags":["Virtual"],"summary":"Get Virtual Battery details","description":"Get Virtual Battery test configuration in the current sandbox.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVirtualBatteryResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"delete":{"operationId":"deleteVirtualBattery","tags":["Virtual"],"summary":"Delete a Virtual Battery","description":"Delete Virtual Battery test configuration in the current sandbox.","responses":{"204":{"description":"The Virtual Battery test configuration was deleted successfully."},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/ev/chargers":{"post":{"operationId":"createVirtualCharger","tags":["Virtual"],"summary":"Create a Virtual EV Charger","description":"Create Virtual EV Charger test configuration in the current sandbox.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualChargerRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualChargerResponse"}}}},"400":{"x-python-unsupported":true,"$ref":"#/components/responses/TooManyVirtualResourcesProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"get":{"operationId":"listVirtualChargers","tags":["Virtual"],"summary":"List Virtual EV Chargers","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"description":"List Virtual EV Charger test configurations in the current sandbox.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVirtualChargersResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/ev/chargers/{id}":{"parameters":[{"name":"id","in":"path","description":"The ID of the Virtual Charger","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getVirtualCharger","tags":["Virtual"],"summary":"Get Virtual Charger details","description":"Get Virtual Charger test configuration in the current sandbox.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVirtualChargerResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"delete":{"operationId":"deleteVirtualCharger","tags":["Virtual"],"summary":"Delete a Virtual Charger","description":"Delete Virtual Charger test configuration in the current sandbox.","responses":{"204":{"description":"The Virtual Charger test configuration was deleted successfully."},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/solar-inverters":{"post":{"operationId":"createVirtualSolarInverter","tags":["Virtual"],"summary":"Create a Virtual Solar Inverter","description":"Create Virtual Solar Inverter test configuration in the current sandbox.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualSolarInverterRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualSolarInverterResponse"}}}},"400":{"x-python-unsupported":true,"$ref":"#/components/responses/TooManyVirtualResourcesProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"get":{"operationId":"listVirtualSolarInverters","tags":["Virtual"],"summary":"List Virtual Solar Inverters","description":"List Virtual Solar Inverter test configurations in the current sandbox.","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVirtualSolarInvertersResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/solar-inverters/{id}":{"parameters":[{"name":"id","in":"path","description":"The ID of the Virtual Solar Inverter test configuration","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getVirtualSolarInverter","tags":["Virtual"],"summary":"Get Virtual Solar Inverter details","description":"Get Virtual Solar Inverter test configuration in the current sandbox.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVirtualSolarInverterResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"delete":{"operationId":"deleteVirtualSolarInverter","tags":["Virtual"],"summary":"Delete a Virtual Solar Inverter","description":"Delete Virtual Solar Inverter test configuration in the current sandbox.","responses":{"204":{"description":"The Virtual Solar Inverter test configuration was deleted successfully."},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/thermostats":{"post":{"operationId":"createVirtualThermostat","tags":["Virtual"],"summary":"Create a Virtual Thermostat","description":"Create Virtual Thermostat test configuration in the current sandbox.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualThermostatRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualThermostatResponse"}}}},"400":{"x-python-unsupported":true,"$ref":"#/components/responses/TooManyVirtualResourcesProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"get":{"operationId":"listVirtualThermostats","tags":["Virtual"],"summary":"List Virtual Thermostats","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"description":"List Virtual Thermostat test configurations in the current sandbox.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVirtualThermostatsResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/thermostats/{id}":{"get":{"operationId":"getVirtualThermostat","tags":["Virtual"],"summary":"Get Virtual Thermostat details","description":"Get Virtual Thermostat test configuration in the current sandbox.","parameters":[{"name":"id","in":"path","description":"The ID of the Virtual Thermostat","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVirtualThermostatResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}},"delete":{"operationId":"deleteVirtualThermostat","tags":["Virtual"],"summary":"Delete a Virtual Thermostat","description":"Delete Virtual Thermostat test configuration in the current sandbox.","parameters":[{"name":"id","in":"path","description":"The ID of the Virtual Thermostat","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"The Virtual Thermostat test configuration was deleted successfully."},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/enrollments":{"post":{"operationId":"createVirtualEnrollment","tags":["Virtual"],"summary":"Create a Virtual Enrollment","description":"Create a Virtual Enrollment test configuration in the current sandbox.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualEnrollmentRequest"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVirtualEnrollmentResponse"}}}},"400":{"x-python-unsupported":true,"$ref":"#/components/responses/TooManyVirtualResourcesProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/enrollments/submit-pairing-code":{"post":{"operationId":"submitPairingCodeVirtual","tags":["Virtual"],"summary":"Submit a Pairing Code for a Virtual Enrollment","description":"Submit a pairing code to link a virtual system to a pending virtual Enrollment.\n\nIf it matches a known virtual Enrollment, the system will be paired to\nthat Enrollment and the Enrollment's status will be updated accordingly.\nIf the pairing code is invalid or expired, `matched` will be false.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPairingCodeVirtualRequest"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitPairingCodeVirtualResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/virtual/enrollments/{id}":{"parameters":[{"name":"id","in":"path","description":"The ID of the Virtual Enrollment test configuration","required":true,"schema":{"type":"string"}}]},"/control-events":{"post":{"operationId":"createControlEvent","tags":["Control Events"],"summary":"Create a Control Event","description":"Create Control Event with the specified interval and list of targets.\n\nA Control Event can target a list of Site IDs, Derapi Program ID, or\na vendor-specific Program ID. Vendor-specific Program ID targeting only\napplies to EnphaseVPP.\n\nEvent parameters can optionally include the `vendorParameters` object\nfor vendor-specific event settings.\n\nControl Events cannot be edited after creation. To change an upcoming Control\nEvent you should cancel and reschedule before the event start time.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateControlEventRequest"}}}},"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateControlEventResponse"}}}},"409":{"description":"A conflicting control event already exists","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictingEventsProblem"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}},"get":{"operationId":"listControlEvents","tags":["Control Events"],"summary":"List Control Events","parameters":[{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"}],"description":"List Control Events","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListControlEventsResponse"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/control-events/{id}":{"parameters":[{"name":"id","description":"the ID for the control event","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ControlEventID"}}],"get":{"operationId":"getControlEvent","tags":["Control Events"],"summary":"Get Control Event details","description":"Fetches Scheduled Control Event for the specified ID","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetControlEventResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/control-events/{id}/cancel":{"parameters":[{"name":"id","description":"the ID for the control event","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ControlEventID"}}],"post":{"operationId":"cancelControlEvent","tags":["Control Events"],"summary":"Cancel a Control Event","description":"Cancel a Control Event with the specified ID.  If the event is still in the future, cancellation with be attempted.","responses":{"202":{"description":"The control event was successfully scheduled for cancellation."},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"409":{"description":"Invalid event status","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/InvalidEventStatusProblem"}}}},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/control-events/{id}/sites":{"get":{"operationId":"getControlEventSites","tags":["Control Events"],"summary":"Get Control Event Sites","description":"Fetches information about the status of each Site targeted by a control event","parameters":[{"name":"id","description":"the ID for the control event","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ControlEventID"}},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetControlEventSitesResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/control-events/{id}/sites/{siteID}":{"get":{"operationId":"getControlEventSiteDetails","tags":["Control Events"],"summary":"Get Control Event Site Details","description":"Fetches information about the status of a single Site targeted by a control event.","parameters":[{"name":"id","description":"the ID for the control event","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ControlEventID"}},{"name":"siteID","description":"the ID of the Site to fetch participation details for","in":"path","required":true,"schema":{"$ref":"#/components/schemas/SiteID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetControlEventSiteDetailsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/control-events/{id}/tags":{"parameters":[{"name":"id","description":"the ID for the control event","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ControlEventID"}}],"patch":{"tags":["Control Events"],"summary":"Update Control Event Tags","description":"Add or update tags on a Control Event. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","operationId":"updateControlEventTags","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateControlEventTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/ev/chargers":{"get":{"tags":["EV Chargers"],"summary":"List EV Chargers","description":"Returns a [paginated](/reference/overview#pagination) list of EV Chargers.\n\nThe returned list can be optionally filtered by vendor and vendor ID.\n","operationId":"listChargers","parameters":[{"$ref":"#/components/parameters/ChargerVendor"},{"$ref":"#/components/parameters/VendorID"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChargersResponse"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/ev/chargers/{id}":{"get":{"tags":["EV Chargers"],"operationId":"getCharger","summary":"Get EV Charger Details","description":"Returns details for a single EV Charger","parameters":[{"name":"id","in":"path","description":"ID of the Charger to return","required":true,"schema":{"$ref":"#/components/schemas/ChargerID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChargerResponse"}}}},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/ev/chargers/{id}/tags":{"parameters":[{"name":"id","description":"the ID for the Charger","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ChargerID"}}],"patch":{"tags":["EV Chargers"],"summary":"Update EV Charger Tags","description":"Add or update tags on an EV Charger. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","operationId":"updateChargerTags","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChargerTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/ev/chargers/{id}/sync":{"post":{"tags":["EV Chargers"],"operationId":"syncCharger","summary":"Sync EV Charger details","description":"Request a sync of the EV Charger details from the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the EV Charger has been\nsynced recently already.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the EV Charger to sync","required":true,"schema":{"$ref":"#/components/schemas/ChargerID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncChargerResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/ev/charging-sessions":{"get":{"tags":["EV Chargers"],"operationId":"getChargingSessions","summary":"Get EV Charging Sessions","description":"Returns EV Charging Sessions that overlap with a specified start and end date.\n\nOptionally, a vendor-specific customer identifier can be provided.\n","parameters":[{"$ref":"#/components/parameters/Vendor"},{"name":"start","in":"query","description":"The earliest date for which data should be returned.\n\nIntervals that partially overlap will be returned.\n","required":true,"schema":{"type":"string","examples":["2025-08-01T23:59:00+00:00"],"format":"date-time-like"}},{"name":"end","in":"query","description":"The latest date for which data should be returned.\n\nIntervals that partially overlap will be returned.\n","required":true,"schema":{"type":"string","examples":["2025-08-02T23:59:00+00:00"],"format":"date-time-like"}},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChargingSessionsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/thermostats":{"get":{"tags":["Thermostats"],"summary":"List Thermostats","description":"Returns a [paginated](/reference/overview#pagination) list of Thermostats.\n\nThe returned list can be optionally filtered by vendor and vendor ID.\n","operationId":"listThermostats","parameters":[{"$ref":"#/components/parameters/Vendor"},{"$ref":"#/components/parameters/VendorID"},{"$ref":"#/components/parameters/PageSize"},{"$ref":"#/components/parameters/PageToken"},{"$ref":"#/components/parameters/Tags"},{"$ref":"#/components/parameters/HasTag"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThermostatsResponse"}}}},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/thermostats/{id}":{"get":{"tags":["Thermostats"],"operationId":"getThermostat","summary":"Get Thermostat Details","description":"Returns details for a single Thermostat","parameters":[{"name":"id","in":"path","description":"ID of the Thermostat to return","required":true,"schema":{"$ref":"#/components/schemas/ThermostatID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetThermostatResponse"}}}},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/thermostats/{id}/sync":{"post":{"tags":["Thermostats"],"operationId":"syncThermostat","summary":"Sync Thermostat Details","description":"Request a sync of the Thermostat details from the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the Thermostat has been\nsynced recently already.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the Thermostat to sync","required":true,"schema":{"$ref":"#/components/schemas/ThermostatID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncThermostatResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/thermostats/{id}/state":{"get":{"tags":["Thermostats"],"operationId":"getThermostatState","summary":"Get Thermostat State","description":"Returns current state for a single Thermostat","parameters":[{"name":"id","in":"path","description":"ID of the Thermostat to return","required":true,"schema":{"$ref":"#/components/schemas/ThermostatID"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetThermostatStateResponse"}}}},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/thermostats/{id}/state/sync":{"post":{"tags":["Thermostats"],"operationId":"syncThermostatState","summary":"Sync Thermostat State","description":"Request a sync of the Thermostat's current state from the vendor's system.\n\nNote that this endpoint is treated as a hint, and Derapi may choose to ignore it if the Thermostat has been\nsynced recently already.\n\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","parameters":[{"name":"id","in":"path","description":"ID of the Thermostat to sync","required":true,"schema":{"$ref":"#/components/schemas/ThermostatID"}}],"responses":{"202":{"description":"Accepted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncThermostatStateResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"}}}},"/thermostats/{id}/intervals":{"get":{"tags":["Thermostats"],"operationId":"getThermostatIntervals","summary":"Get Thermostat Interval Data","description":"Returns individual Thermostat runtime data aggregated to the\nspecific granularity requested for a specified start and end date.\n\nSee [Interval Data Overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor broader context on interval data endpoints.\n","parameters":[{"name":"id","in":"path","description":"ID of the Thermostat to query","required":true,"schema":{"$ref":"#/components/schemas/ThermostatID"}},{"$ref":"#/components/parameters/SummaryLevel"},{"$ref":"#/components/parameters/Start"},{"$ref":"#/components/parameters/End"},{"$ref":"#/components/parameters/Missing"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetThermostatIntervalsResponse"}}}},"404":{"x-python-unsupported":true,"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"x-python-unsupported":true,"$ref":"#/components/responses/ValidationProblemResponse"}}}},"/thermostats/{id}/tags":{"patch":{"tags":["Thermostats"],"operationId":"updateThermostatTags","summary":"Update Thermostat Tags","description":"Add or update tags on a Thermostat. Tags are key/value pairs that can be used to\norganize and filter resources. If a tag with the same key already exists, its\nvalue will be updated.\n\nThis operation is idempotent; applying the same tags multiple times will not\nresult in duplicate tags.\n","parameters":[{"name":"id","description":"the ID for the Thermostat","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ThermostatID"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateThermostatTagsRequest"}}}},"responses":{"204":{"description":"No content"},"404":{"$ref":"#/components/responses/NotFoundProblemResponse"},"422":{"$ref":"#/components/responses/ValidationProblemResponse"}}}}},"components":{"securitySchemes":{"DerapiAPIKey":{"type":"apiKey","name":"Authorization","in":"header","description":"A Derapi-issued API key, provided in the Authorization header with a scheme of 'apikey'.\nFor example: 'Authorization: apikey sk-1234'\n","x-default":"apikey sk-1234"},"DerapiOAuth":{"type":"oauth2","description":"Enter your Derapi clientSecret and clientID to get a token","flows":{"clientCredentials":{"tokenUrl":"https://auth.derapi.com/oauth2/token","scopes":{}}}}},"schemas":{"Vendor":{"title":"Vendor","type":"string","enum":["chargepoint","eg4","enphase","enphasevpp","foxess","franklinwh","generac","lunar","sma","solaredge","solis","tesla","virtual"],"examples":["virtual","enphase","tesla"]},"Tags":{"title":"Tags","type":"object","description":"A set of client-defined key-value pairs that can be attached to an object. Tags can be used for\nfiltering and organization.\n\nTags should not be used to store sensitive information (e.g., personally identifiable information or\nauthentication data).\n\nA maximum of 10 tags can be attached to an object\n\nKeys:\n- case sensitive\n- can only contain URL unreserved characters (letters, digits, hyphens, periods, underscores, and tildes)\n- at most 30 characters long\n\nValues:\n- case sensitive\n- can contain any UTF-8 character (but must be escaped in query parameters)\n- at most 100 characters long\n","additionalProperties":{"type":"string","maxLength":100},"maxProperties":10,"examples":[{"environment":"production","team":"alpha"},{"project":"solar","owner":"alice"}]},"HasTag":{"title":"HasTag","type":"array","items":{"type":"string"}},"SiteID":{"type":"string","examples":["site-rfkzu6fkbgxzd5ib"],"description":"the ID for the Site","pattern":"^site-[a-z0-9]+$"},"SiteSummary":{"title":"SiteSummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/SiteID"},"vendor":{"$ref":"#/components/schemas/Vendor"},"vendorID":{"type":"string","description":"The corresponding ID of the Site in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"tags":{"$ref":"#/components/schemas/Tags"}},"required":["id","vendor","vendorID","tags"],"additionalProperties":false},"NextPageToken":{"description":"A token to request the next page, if any. If absent, there are no more pages.","type":"string","examples":["dGhpc2lzYW5vcGFxdWV0b2tlbgo="]},"ListSitesResponse":{"title":"ListSitesResponse","type":"object","properties":{"sites":{"description":"List of Sites","type":"array","items":{"$ref":"#/components/schemas/SiteSummary"},"examples":[[{"id":"site-wbkxaezgyuvklnop","vendor":"enphase","vendorID":"123456","tags":{"priority":"high","customer":"foo"}},{"id":"site-ykvlw42l763dz7di","vendor":"tesla","vendorID":"bizbazbar","tags":{}},{"id":"site-gyumoznfcfivzmrr","vendor":"sma","vendorID":"654321","tags":{}}]]},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Sites available.","examples":[42]}},"required":["sites","totalCount"],"additionalProperties":false},"SubError":{"title":"SubError","type":"object","properties":{"detail":{"type":"string","description":"A human-readable explanation for this sub-problem.","example":"-1 is less than the minimum of 0"},"pointer":{"type":"string","description":"A pointer to the specific location within the request that triggered this sub-problem.\n\nFor errors in the request body, this will be a JSON Pointer. For query or path parameter errors,\nit will be the name of the parameter with the error, formatted as a JSON Pointer.\n","example":"#/duration"},"in":{"title":"SubErrorIn","type":"string","enum":["query","path","body"],"description":"A string describing which part of the request this error was in.","example":"path"}},"required":["detail"],"additionalProperties":false},"ValidationProblem":{"title":"ValidationProblem","type":"object","description":"This error is returned when the request submitted by the API caller did not conform\nto Derapi's API specification, or when it contained content which was otherwise semantically\ninvalid. Validation failures may derive from problems within the request body, path,\nor query string parameters.\n\nThe `detail` key will contain a summary of any validation failures, and the `errors`\nkey will contain a listing of each individual validation failure, with `detail` and\n`pointer` keys explaining the failure and providing a\n[JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) to its source within the\nsubmitted document.\n","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#validation","description":"A URI reference that identifies the problem type.","example":"https://docs.derapi.com/reference/errors#validation","default":"https://docs.derapi.com/reference/errors#validation"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Validation Error","example":"Validation Error","default":"Validation Error"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","example":"body: Additional properties are not allowed ('other' was unexpected)"},"errors":{"type":"array","description":"At least one validation error which occurred while processing this request","minLength":1,"items":{"$ref":"#/components/schemas/SubError"}}},"required":["type","title","detail","errors"],"additionalProperties":false,"examples":[{"type":"https://docs.derapi.com/reference/errors#validation","title":"Validation Error","detail":"body: Additional properties are not allowed ('other' was unexpected) (and 1 others)","errors":[{"detail":"Additional properties are not allowed ('other' was unexpected)","pointer":""},{"detail":"-1 is less than the minimum of 0","pointer":"/duration"}]}]},"SiteName":{"type":"string","description":"Customer defined name of the Site","examples":["My Site"]},"SiteLocation":{"title":"SiteLocation","type":"object","description":"The location of this Site in lat/lon coordinates","properties":{"lat":{"type":"number","description":"Latitude of the Site","examples":[40.755421]},"lon":{"type":"number","description":"Longitude of the Site","examples":[-73.816803]},"timezone":{"type":"string","description":"IANA timezone string. This will be absent for ChargePoint.","examples":["America/Denver"]}},"required":[],"additionalProperties":false},"SiteOperationalSince":{"type":"string","description":"The date the Site became operational or received permission to operate.\n\nSometimes absent for Solaredge. Always absent for ChargePoint.\n","examples":["2023-01-01T12:00:00+00:00"],"format":"date-time"},"SiteBESS":{"title":"SiteBESS","type":"object","description":"For Sites with Batteries this key is present","properties":{"nameplateKwh":{"type":"number","description":"The rated storage capacity of the system in kWh","examples":[200]},"mode":{"type":"string","description":"Battery management system mode","examples":["Full Backup"]},"stateOfChargePercent":{"type":"number","description":"Battery system state of charge as a percent of capacity","examples":[100],"minimum":0,"maximum":100},"stateOfHealthPercent":{"type":"number","description":"The current full-charge kWh storage capacity relative to the nameplate kWh storage capacity when the unit was new, expressed as a percentage.","examples":[99.2],"minimum":0,"maximum":100},"maxChargeRateKw":{"type":"number","description":"Maximum charging power for all of the Batteries in the system","examples":[10]},"maxDischargeRateKw":{"type":"number","description":"Maximum charging power for all of the Batteries in the system","examples":[10]}},"required":[],"additionalProperties":false},"DeviceSummary":{"title":"DeviceSummary","type":"object","properties":{"id":{"type":"string","description":"The unique ID of the device","examples":["batt-3e754i27ugnhqbfv"]},"vendor":{"$ref":"#/components/schemas/Vendor"},"vendorID":{"type":"string","description":"The corresponding ID of the device in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]}},"additionalProperties":false,"required":["id","vendor","vendorID"]},"SiteBatteries":{"description":"List of Battery IDs associated with this Site","type":"array","items":{"$ref":"#/components/schemas/DeviceSummary"},"examples":[[{"id":"batt-3e754i27ugnhqbfv","vendor":"enphase","vendorID":"123456"}]]},"SiteChargers":{"description":"List of EV Charger IDs associated with this Site","type":"array","items":{"$ref":"#/components/schemas/DeviceSummary"},"examples":[[{"id":"chrg-ae02fl39bgdd8tmx","vendor":"chargepoint","vendorID":"123456"}]]},"SiteSolarInverters":{"description":"List of Solar Inverter IDs associated with this Site","type":"array","items":{"$ref":"#/components/schemas/DeviceSummary"},"examples":[[{"id":"solr-3oyebofjhhxsuqy3","vendor":"enphase","vendorID":"123456"}]]},"SiteThermostats":{"description":"List of Thermostat IDs associated with this Site","type":"array","items":{"$ref":"#/components/schemas/DeviceSummary"},"examples":[[{"id":"tstat-3e754i27ugnhqspw","vendor":"virtual","vendorID":"123456"}]]},"SiteMeter":{"title":"SiteMeter","type":"object","description":"For Sites with a consumption meter this key is present","additionalProperties":false},"LastSyncedAt":{"type":"string","format":"date-time","description":"The time at which information about this resource was last synced with the vendor's system.\nSee [Vendor Synchronization and Caching](/reference/overview#caching-and-synchronization) for more details.\n","examples":["2024-06-01T12:34:56Z"]},"Site":{"title":"Site","type":"object","properties":{"id":{"$ref":"#/components/schemas/SiteID"},"vendor":{"$ref":"#/components/schemas/Vendor","description":"The vendor providing this Site"},"vendorID":{"type":"string","description":"The corresponding ID of the Site in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"name":{"$ref":"#/components/schemas/SiteName"},"location":{"$ref":"#/components/schemas/SiteLocation"},"operationalSince":{"$ref":"#/components/schemas/SiteOperationalSince"},"bess":{"$ref":"#/components/schemas/SiteBESS"},"batteries":{"$ref":"#/components/schemas/SiteBatteries"},"chargers":{"$ref":"#/components/schemas/SiteChargers"},"solarInverters":{"$ref":"#/components/schemas/SiteSolarInverters"},"thermostats":{"$ref":"#/components/schemas/SiteThermostats"},"meter":{"$ref":"#/components/schemas/SiteMeter"},"tags":{"$ref":"#/components/schemas/Tags"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"}},"required":["id","vendor","vendorID","name","batteries","chargers","solarInverters","thermostats","tags"],"additionalProperties":false},"GetSiteResponse":{"title":"GetSiteResponse","allOf":[{"$ref":"#/components/schemas/Site"}]},"NotFoundResource":{"title":"NotFoundResource","type":"object","description":"Information about the resource which couldn't be found","properties":{"id":{"type":"string","description":"The unique identifier of the resource","examples":["solr-abcdefgh"]},"type":{"type":"string","description":"The type of the resource","examples":["solarinverter"]}},"additionalProperties":false,"required":["id","type"]},"NotFoundProblem":{"title":"NotFoundProblem","description":"A NotFoundProblem is returned when a requested resource cannot be found.\n\nIt contains a URI reference that identifies the problem type, a human-readable summary,\nand a human-readable explanation specific to this occurrence of the problem.\n\nCorrect the request by ensuring the resource exists or by using the correct identifier.\n","type":"object","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#not-found","description":"A URI reference that identifies the problem type.","example":"https://docs.derapi.com/reference/errors#not-found","default":"https://docs.derapi.com/reference/errors#not-found"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Not Found","example":"Not Found","default":"Not Found"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","example":"Your resource was not found"},"resource":{"$ref":"#/components/schemas/NotFoundResource"}},"required":["type","title","detail"],"additionalProperties":false},"SummaryLevel":{"title":"SummaryLevel","type":"string","enum":["month","day","hour","15mins"],"examples":["hour"]},"Missing":{"title":"Missing","type":"string","default":"include","enum":["include","drop"],"examples":["include","drop"]},"IntervalResponseStart":{"title":"IntervalResponseStart","type":"string","description":"The inclusive start date of the the requested data in ISO-8601 format.\n\nAlways aligned with the summary level boundaries. May differ from the requested parameter `start` if\nthe start date does not align with the requested summary level.\n\nMay differ from the start time of the earlier interval if `missing=drop` was specified.\n\nSuitable for passing as the `end` parameter in a subsequent request to retrieve the prior set of intervals.\n","format":"date-time","examples":["2025-07-01T00:00:00+00:00"]},"IntervalResponseEnd":{"title":"IntervalResponseEnd","type":"string","description":"The exclusive end date of the the requested data in ISO-8601 format.\n\nAlways aligned with the summary level boundaries. May differ from a provided parameter `end`\nif the parameter did not align with the requested summary level.\n\nMay differ from the end time of the latest interval if `missing=drop` was specified.\n\nSuitable for passing as the `start` parameter in a subsequent request to retrieve the next\nset of intervals.\n","format":"date-time","examples":["2025-07-31T23:59:59+00:00"]},"IntervalStart":{"title":"IntervalStart","type":"string","description":"Interval start in ISO-8601 format. The inclusive start of the interval.\n","format":"date-time","examples":["2025-07-01T12:00:00+00:00"]},"IntervalEnd":{"title":"IntervalEnd","type":"string","description":"Interval end in ISO-8601 format. The exclusive end of the interval.\n","format":"date-time","examples":["2025-07-01T13:59:59+00:00"]},"IntervalMissing":{"title":"IntervalMissing","type":"boolean","description":"Indicates if the interval data is missing; if this field is absent, the interval is considered present.","examples":[true],"const":true,"default":true},"SiteBatteryInterval":{"title":"SiteBatteryInterval","description":"A single interval of Site Battery charge and discharge data.\n\nIf `missing` is present and `true`, the interval data is missing and value fields are omitted;\notherwise, values will be populated.\n","type":"object","properties":{"chargeKwh":{"type":"number","description":"kWh into the Battery system (i.e. energy into all the Batteries in\nthe system) during the interval\n","examples":[21.1]},"dischargeKwh":{"type":"number","description":"kWh out of the Battery system (i.e. energy discharged from all the\nBatteries in the system) during the interval\n","examples":[14.2]},"stateOfChargePercent":{"type":"number","description":"Average % charge over the interval for all Batteries in the system","examples":[82.1]},"start":{"$ref":"#/components/schemas/IntervalStart"},"end":{"$ref":"#/components/schemas/IntervalEnd"},"missing":{"$ref":"#/components/schemas/IntervalMissing"}},"required":["start","end"],"additionalProperties":false},"GetSiteBatteryIntervalsResponse":{"title":"GetSiteBatteryIntervalsResponse","type":"object","properties":{"id":{"$ref":"#/components/schemas/SiteID"},"summaryLevel":{"$ref":"#/components/schemas/SummaryLevel"},"start":{"$ref":"#/components/schemas/IntervalResponseStart"},"end":{"$ref":"#/components/schemas/IntervalResponseEnd"},"intervals":{"type":"array","items":{"$ref":"#/components/schemas/SiteBatteryInterval"},"examples":[[{"chargeKwh":23.1,"dischargeKwh":0,"stateOfChargePercent":92.8,"start":"2025-07-01T12:00:00+00:00","end":"2025-07-01T13:00:00+00:00"},{"chargeKwh":1.3,"dischargeKwh":21.8,"stateOfChargePercent":91.2,"start":"2025-07-01T13:00:00+00:00","end":"2025-07-01T14:00:00+00:00"},{"missing":true,"start":"2025-07-01T14:00:00+00:00","end":"2025-07-01T15:00:00+00:00"}]]}},"required":["id","summaryLevel","start","end","intervals"],"additionalProperties":false},"SiteSolarInverterInterval":{"title":"SiteSolarInverterInterval","description":"A single interval of Site solar inverter production data.\n\nIf `missing` is present and `true`, the interval data is missing and value fields are omitted;\notherwise, values will be populated.\n","type":"object","properties":{"kwh":{"type":"number","description":"Solar energy production in kWh","examples":[13.2]},"start":{"$ref":"#/components/schemas/IntervalStart"},"end":{"$ref":"#/components/schemas/IntervalEnd"},"missing":{"$ref":"#/components/schemas/IntervalMissing"}},"required":["start","end"],"additionalProperties":false},"GetSiteSolarInverterIntervalsResponse":{"title":"GetSiteSolarInverterIntervalsResponse","type":"object","properties":{"id":{"$ref":"#/components/schemas/SiteID"},"summaryLevel":{"$ref":"#/components/schemas/SummaryLevel","description":"Historical solar production data is available summarized to `month`,\n`day`, `hour`, `15mins`.\n"},"start":{"$ref":"#/components/schemas/IntervalResponseStart"},"end":{"$ref":"#/components/schemas/IntervalResponseEnd"},"intervals":{"type":"array","items":{"$ref":"#/components/schemas/SiteSolarInverterInterval"},"examples":[[{"kwh":13.3,"start":"2025-07-01T12:00:00+00:00","end":"2025-07-01T12:59:59+00:00"},{"kwh":12.9,"start":"2025-07-01T13:00:00+00:00","end":"2025-07-01T13:59:59+00:00"}]]}},"required":["id","summaryLevel","start","end","intervals"],"additionalProperties":false},"SiteConsumptionInterval":{"title":"SiteConsumptionInterval","description":"A single interval of Site consumption data.\n\nIf `missing` is present and `true`, the interval data is missing and value fields are omitted;\notherwise, values will be populated.\n","type":"object","properties":{"kwh":{"type":"number","description":"Energy consumption in kWh","examples":[1.8]},"start":{"$ref":"#/components/schemas/IntervalStart"},"end":{"$ref":"#/components/schemas/IntervalEnd"},"missing":{"$ref":"#/components/schemas/IntervalMissing"}},"required":["start","end"],"additionalProperties":false},"GetSiteConsumptionIntervalsResponse":{"title":"GetSiteConsumptionIntervalsResponse","type":"object","properties":{"id":{"$ref":"#/components/schemas/SiteID"},"summaryLevel":{"$ref":"#/components/schemas/SummaryLevel","description":"Historical energy consumption data is available summarized to `month`, `day`, `hour`, `15mins`.\n"},"start":{"$ref":"#/components/schemas/IntervalResponseStart"},"end":{"$ref":"#/components/schemas/IntervalResponseEnd"},"intervals":{"type":"array","items":{"$ref":"#/components/schemas/SiteConsumptionInterval","examples":[[{"kwh":1.8,"start":"2025-07-01T12:00:00+00:00","end":"2025-07-01T13:00:00+00:00"},{"kwh":2.3,"start":"2025-07-01T13:00:00+00:00","end":"2025-07-01T14:00:00+00:00"}]]}}},"required":["id","summaryLevel","start","end","intervals"],"additionalProperties":false},"TagsPatch":{"title":"TagsPatch","type":"object","additionalProperties":{"type":["string","null"]}},"UpdateSiteTagsRequest":{"title":"UpdateSiteTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]},"SyncSiteResponse":{"type":"object","title":"SyncSiteResponse","properties":{},"required":[],"additionalProperties":false},"SolarInverterVendor":{"title":"SolarInverterVendor","type":"string","enum":["enphase","enphasevpp","sma","solaredge","solis","tesla","virtual"],"examples":["enphase","tesla","virtual"]},"SolarInverterID":{"type":"string","description":"ID of the solar inverter","examples":["solr-cblzzm67hjdit6mc"],"pattern":"^solr-[a-z0-9]+$"},"SolarInverterSummary":{"title":"SolarInverterSummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/SolarInverterID"},"vendor":{"$ref":"#/components/schemas/SolarInverterVendor"},"vendorID":{"type":"string","description":"The corresponding ID of the Solar Inverter in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["id","vendor","vendorID","tags"]},"ListSolarInvertersResponse":{"title":"ListSolarInvertersResponse","type":"object","properties":{"solarInverters":{"description":"List of Solar Inverters","type":"array","items":{"$ref":"#/components/schemas/SolarInverterSummary"},"examples":[[{"id":"solr-yexly3z7vbleiks5","vendor":"enphase","vendorID":"123456","tags":{}},{"id":"solr-js52acfwhabbhvka","vendor":"tesla","vendorID":"bizbazbar","tags":{}},{"id":"solr-6npc5aux5rlayh3m","vendor":"sma","vendorID":"654321","tags":{}}]]},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of solar inverters available.","examples":[42]}},"required":["solarInverters","totalCount"],"additionalProperties":false},"SolarInverterModel":{"type":"string","description":"Model number of this Solar Inverter","examples":["STP 5000TL-20"]},"SolarInverterSerialNumber":{"type":"string","description":"Manufacturer serial number of this Solar Inverter","examples":["9988776"]},"SolarInverterName":{"type":"string","description":"Customer defined name of this Solar Inverter","examples":["My Inverter"]},"SolarInverterSiteID":{"type":"string","description":"The Derapi Site ID this Solar Inverter is associated with","examples":["site-eoyjh4gsmasbxvrg"]},"SolarInverterRecentProduction":{"title":"SolarInverterRecentProduction","type":"object","properties":{"kwh":{"type":"number","description":"Recent production value in kWh","examples":[11.88773344]},"start":{"type":"string","description":"The start date of the recent production period in ISO-8601 format","examples":["2025-08-01T23:59:00+00:00"],"format":"date-time"}},"required":["kwh","start"],"additionalProperties":false},"SolarInverterLifetimeProduction":{"title":"SolarInverterLifetimeProduction","type":"object","properties":{"kwh":{"type":"number","description":"Lifetime production value in kWh","examples":[999.8877]},"start":{"type":["string"],"description":"The start date of the lifetime production period in ISO-8601 format","examples":["2023-01-01T23:59:00+00:00"],"format":"date-time"}},"required":["kwh"],"additionalProperties":false},"SolarInverterRecentErrors":{"title":"SolarInverterRecentErrors","description":"Most recent errors, warnings, or info reported by the manufacturer for this Solar Inverter.\n\nThe key represents the severity level (info/warning/error); the value is a string description.\n`start` is always present and is the last element to be returned.\n","type":"array","items":{"title":"SolarInverterRecentError","oneOf":[{"title":"SolarInverterRecentErrorsError","type":"object","properties":{"error":{"type":"string","description":"","examples":["SPI internal communication failure"]}},"required":["error"],"additionalProperties":false},{"title":"SolarInverterRecentErrorsWarning","type":"object","properties":{"warning":{"type":"string","description":"","examples":["device sensor not detected"]}},"required":["warning"],"additionalProperties":false},{"title":"SolarInverterRecentErrorsInfo","type":"object","properties":{"info":{"type":"string","description":"","examples":["info COM A communication status goes to Ok"]}},"required":["info"],"additionalProperties":false},{"title":"SolarInverterRecentErrorsStart","type":"object","properties":{"start":{"type":"string","description":"The start date of the recent errors log in ISO-8601 format","examples":["2025-08-01T23:59:00+00:00"],"format":"date-time"}},"required":["start"],"additionalProperties":false}]}},"SolarInverter":{"title":"SolarInverter","type":"object","properties":{"id":{"$ref":"#/components/schemas/SolarInverterID"},"vendor":{"$ref":"#/components/schemas/SolarInverterVendor","description":"vendor providing this Solar Inverter"},"vendorID":{"type":"string","description":"The corresponding ID of the Solar Inverter in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"model":{"$ref":"#/components/schemas/SolarInverterModel"},"serialNumber":{"$ref":"#/components/schemas/SolarInverterSerialNumber"},"name":{"$ref":"#/components/schemas/SolarInverterName"},"siteID":{"$ref":"#/components/schemas/SolarInverterSiteID"},"recentProduction":{"$ref":"#/components/schemas/SolarInverterRecentProduction"},"lifetimeProduction":{"$ref":"#/components/schemas/SolarInverterLifetimeProduction"},"recentErrors":{"$ref":"#/components/schemas/SolarInverterRecentErrors"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"},"tags":{"$ref":"#/components/schemas/Tags"}},"required":["id","vendor","vendorID","model","serialNumber","siteID","tags"],"additionalProperties":false},"GetSolarInverterResponse":{"title":"GetSolarInverterResponse","allOf":[{"$ref":"#/components/schemas/SolarInverter"}]},"SolarInverterInterval":{"title":"SolarInverterInterval","description":"A single interval of Solar Inverter production data.\n\nIf `missing` is present and `true`, the interval data is missing and value fields are omitted;\notherwise, values will be populated.\n","type":"object","properties":{"kwh":{"type":"number","description":"Solar energy production in kWh","examples":[21.8]},"start":{"$ref":"#/components/schemas/IntervalStart"},"end":{"$ref":"#/components/schemas/IntervalEnd"},"missing":{"$ref":"#/components/schemas/IntervalMissing"}},"required":["start","end"],"additionalProperties":false},"GetSolarInverterIntervalsResponse":{"title":"GetSolarInverterIntervalsResponse","type":"object","properties":{"id":{"$ref":"#/components/schemas/SolarInverterID"},"summaryLevel":{"$ref":"#/components/schemas/SummaryLevel","description":"Historical solar production data is available summarized to `month`,\n`day`, `hour`, `15mins`.\n"},"start":{"$ref":"#/components/schemas/IntervalResponseStart"},"end":{"$ref":"#/components/schemas/IntervalResponseEnd"},"intervals":{"type":"array","items":{"$ref":"#/components/schemas/SolarInverterInterval"},"examples":[[{"kwh":21.8,"start":"2025-08-01T12:00:00+00:00","end":"2025-08-01T12:59:59+00:00"},{"kwh":23.1,"start":"2025-08-01T13:00:00+00:00","end":"2025-08-01T13:59:59+00:00"}]]}},"required":["id","summaryLevel","intervals","start","end"],"additionalProperties":false},"UpdateSolarInverterTagsRequest":{"title":"UpdateSolarInverterTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]},"SyncSolarInverterResponse":{"type":"object","title":"SyncSolarInverterResponse","properties":{},"required":[],"additionalProperties":false},"BatteryVendor":{"title":"BatteryVendor","type":"string","enum":["eg4","enphase","enphasevpp","franklinwh","generac","lunar","sma","solis","tesla","virtual"],"examples":["enphase","tesla","virtual"]},"BatteryID":{"type":"string","examples":["batt-vbte2jglx43tudsj"],"pattern":"^batt-[a-z0-9]+$","description":"Battery id"},"BatterySummary":{"title":"BatterySummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/BatteryID"},"vendor":{"$ref":"#/components/schemas/BatteryVendor"},"vendorID":{"type":"string","description":"The corresponding ID of the Battery in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["id","vendor","vendorID","tags"]},"ListBatteriesResponse":{"title":"ListBatteriesResponse","type":"object","properties":{"batteries":{"description":"List of Batteries","type":"array","items":{"$ref":"#/components/schemas/BatterySummary"},"examples":[[{"id":"batt-3e754i27ugnhqbfv","vendor":"enphase","vendorID":"123456","tags":{}},{"id":"batt-25qka365qzaw65ak","vendor":"tesla","vendorID":"bizbazbar","tags":{"env":"prod","id":"123"}}]]},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Batteries available.","examples":[42]}},"required":["batteries","totalCount"],"additionalProperties":false},"BatteryModel":{"type":"string","description":"Model number of Battery","examples":["STP 5000TL-20"]},"BatterySerialNumber":{"type":"string","description":"Manufacturer serial number of the Battery","examples":["2233556"]},"BatteryName":{"type":"string","description":"Customer defined name of the Battery","examples":["My Battery"]},"BatterySiteID":{"type":"string","description":"The Derapi Site ID this Battery is associated with","examples":["site-mitpus7brtdd36c2"]},"BatteryNameplateKwh":{"type":"number","description":"The rated storage capacity of the unit","examples":[10]},"BatteryStateOfChargePercent":{"type":"number","description":"Battery state of charge as a percent of capacity","default":20,"examples":[90]},"BatteryRecentErrors":{"description":"Most recent errors, warnings, or info reported by the manufacturer for this Battery.\n\nThe key represents the severity level (info/warning/error); the value is a string description.\n`start` is always present and is the last element to be returned.\n","type":"array","items":{"title":"BatteryRecentError","oneOf":[{"title":"BatteryRecentErrorsError","type":"object","properties":{"error":{"type":"string","description":"","examples":["SPI internal communication failure"]}},"required":["error"],"additionalProperties":false},{"title":"BatteryRecentErrorsWarning","type":"object","properties":{"warning":{"type":"string","description":"","examples":["device sensor not detected"]}},"required":["warning"],"additionalProperties":false},{"title":"BatteryRecentErrorsInfo","type":"object","properties":{"info":{"type":"string","description":"","examples":["info COM A communication status goes to Ok"]}},"required":["info"],"additionalProperties":false},{"title":"BatteryRecentErrorsStart","type":"object","properties":{"start":{"type":"string","description":"The start date of the recent errors log in ISO-8601 format","examples":["2025-08-01T23:59:00+00:00"],"format":"date-time"}},"required":["start"],"additionalProperties":false}]}},"Battery":{"title":"Battery","type":"object","properties":{"id":{"$ref":"#/components/schemas/BatteryID"},"vendor":{"$ref":"#/components/schemas/BatteryVendor","description":"vendor providing this Battery"},"vendorID":{"type":"string","description":"The corresponding ID of the Battery in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"model":{"$ref":"#/components/schemas/BatteryModel"},"serialNumber":{"$ref":"#/components/schemas/BatterySerialNumber"},"name":{"$ref":"#/components/schemas/BatteryName"},"siteID":{"$ref":"#/components/schemas/BatterySiteID"},"nameplateKwh":{"$ref":"#/components/schemas/BatteryNameplateKwh"},"stateOfChargePercent":{"$ref":"#/components/schemas/BatteryStateOfChargePercent"},"recentErrors":{"$ref":"#/components/schemas/BatteryRecentErrors"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"},"tags":{"$ref":"#/components/schemas/Tags"}},"required":["id","vendor","vendorID","model","serialNumber","siteID","tags"],"additionalProperties":false},"GetBatteryResponse":{"title":"GetBatteryResponse","allOf":[{"$ref":"#/components/schemas/Battery"}]},"BatteryInterval":{"title":"BatteryInterval","type":"object","description":"A single interval of Battery charge and discharge data.\n\nIf `missing` is present and `true`, the interval data is missing and value fields are omitted;\notherwise, values will be populated.\n","properties":{"chargeKwh":{"type":"number","description":"kWh into the Battery during the interval","examples":[2.1]},"dischargeKwh":{"type":"number","description":"kWh out of the Battery during the interval","examples":[0]},"stateOfChargePercent":{"type":"number","description":"average % charge over the interval","examples":[84.1]},"start":{"$ref":"#/components/schemas/IntervalStart"},"end":{"$ref":"#/components/schemas/IntervalEnd"},"missing":{"$ref":"#/components/schemas/IntervalMissing"}},"required":["start","end"],"additionalProperties":false},"GetBatteryIntervalsResponse":{"title":"GetBatteryIntervalsResponse","type":"object","properties":{"id":{"$ref":"#/components/schemas/BatteryID"},"summaryLevel":{"$ref":"#/components/schemas/SummaryLevel","description":"Historical Battery data is available summarized to `month`, `day`, `hour`,\n`15mins`.\n"},"start":{"$ref":"#/components/schemas/IntervalResponseStart"},"end":{"$ref":"#/components/schemas/IntervalResponseEnd"},"intervals":{"type":"array","items":{"$ref":"#/components/schemas/BatteryInterval"},"examples":[[{"chargeKwh":2.1,"dischargeKwh":0,"stateOfChargePercent":92.8,"start":"2025-01-01T12:00:00+00:00","end":"2025-01-01T12:59:59+00:00"},{"chargeKwh":1.1,"dischargeKwh":1.8,"stateOfChargePercent":91.2,"start":"2025-01-01T13:00:00+00:00","end":"2025-01-01T13:59:59+00:00"}]]}},"required":["id","summaryLevel","start","end","intervals"],"additionalProperties":false},"UpdateBatteryTagsRequest":{"title":"UpdateBatteryTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]},"ProgramID":{"type":"string","pattern":"^prog-[a-z0-9]+$","description":"A Derapi Program ID","examples":["prog-vbte2jglx43tudsj"]},"ProgramName":{"type":"string","examples":["My Battery Program"],"description":"Friendly name of the Program","minLength":1},"ProgramResourceType":{"title":"ProgramResourceType","type":"string","enum":["batterysystem"],"examples":["batterysystem"]},"Program":{"title":"Program","type":"object","properties":{"id":{"$ref":"#/components/schemas/ProgramID"},"name":{"$ref":"#/components/schemas/ProgramName"},"vendors":{"description":"The vendors supported in this Program","type":"array","items":{"$ref":"#/components/schemas/Vendor"}},"resourceTypes":{"description":"The resource types supported in this Program","type":"array","items":{"$ref":"#/components/schemas/ProgramResourceType"}},"start":{"type":"string","format":"date-time","description":"When the Program begins if specified","examples":["2025-06-01T12:00:00Z"]},"end":{"type":"string","format":"date-time","description":"When the Program ends if specified","examples":["2025-09-01T12:00:00Z"]},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["id","name","vendors","resourceTypes","tags"]},"ListProgramsResponse":{"title":"ListProgramsResponse","type":"object","properties":{"programs":{"description":"List of Programs","type":"array","items":{"$ref":"#/components/schemas/Program"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Programs available.","examples":[42]}},"required":["programs","totalCount"],"additionalProperties":false},"GetProgramResponse":{"title":"GetProgramResponse","allOf":[{"$ref":"#/components/schemas/Program"}]},"UpdateProgramTagsRequest":{"title":"UpdateProgramTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]},"SyncProgramResponse":{"type":"object","title":"SyncProgramResponse","properties":{},"required":[],"additionalProperties":false},"EnrollmentStatus":{"title":"EnrollmentStatus","type":"string","examples":["pending"],"description":"Enrollment status","enum":["pendingvendor","pending","enrolled","pendingresubmission","rejected","unenrolled"],"x-enumDescriptions":{"pendingvendor":"Pending vendor approval","pending":"Pending operator acceptance","enrolled":"Enrolled","pendingresubmission":"Application needs to be resubmitted","rejected":"Rejected","unenrolled":"Unenrolled"}},"EnrollmentID":{"type":"string","examples":["enrl-vbte2jglx43tudsj"],"pattern":"^enrl-[a-z0-9]+$","description":"Enrollment id"},"EnrollmentHistoryEventSubmitted":{"title":"EnrollmentHistoryEventSubmitted","properties":{"type":{"const":"submitted","default":"submitted","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"requiresVendorApproval":{"type":"boolean","description":"Indicates if vendor approval is required.","examples":[true]},"status":{"$ref":"#/components/schemas/EnrollmentStatus"}},"required":["type","at","requiresVendorApproval","status"],"additionalProperties":false},"EnrollmentHistoryEventActor":{"title":"EnrollmentHistoryEventActor","type":"string","description":"The source of this Enrollment event","enum":["vendor","operator","customer"],"examples":["vendor","operator","customer"],"x-enumDescriptions":{"vendor":"The system vendor","operator":"The client application","customer":"The end customer"}},"EnrollmentHistoryEventApproved":{"title":"EnrollmentHistoryEventApproved","properties":{"type":{"const":"approved","default":"approved","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"actor":{"$ref":"#/components/schemas/EnrollmentHistoryEventActor"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"autoApproved":{"type":"boolean","description":"Whether the Enrollment was automatically approved in accordance with Program configuration.","examples":[false]}},"required":["type","at","actor","status","autoApproved"],"additionalProperties":false},"EnrollmentHistoryEventUnenrolled":{"title":"EnrollmentHistoryEventUnenrolled","properties":{"type":{"const":"unenrolled","default":"unenrolled","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"actor":{"$ref":"#/components/schemas/EnrollmentHistoryEventActor"},"reason":{"type":"string","description":"The reason for the unenrollment, if known.","examples":["Customer request"]},"status":{"$ref":"#/components/schemas/EnrollmentStatus"}},"required":["type","at","actor","status"],"additionalProperties":false},"EnrollmentHistoryEventRejected":{"title":"EnrollmentHistoryEventRejected","properties":{"type":{"const":"rejected","default":"rejected","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"reason":{"type":"string","description":"The reason for the rejection.","examples":["Invalid information provided"]},"actor":{"$ref":"#/components/schemas/EnrollmentHistoryEventActor"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"}},"required":["type","at","actor","status"],"additionalProperties":false},"EnrollmentHistoryEventResubmitRequested":{"title":"EnrollmentHistoryEventResubmitrequested","properties":{"type":{"const":"resubmitrequested","default":"resubmitrequested","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"reason":{"type":"string","examples":["Incorrect street address"]},"actor":{"$ref":"#/components/schemas/EnrollmentHistoryEventActor"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"}},"required":["type","at","reason","actor","status"],"additionalProperties":false},"EnrollmentHistoryEventImported":{"title":"EnrollmentHistoryEventImported","properties":{"type":{"const":"imported","default":"imported","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"status":{"$ref":"#/components/schemas/EnrollmentStatus"}},"required":["type","at","status"],"additionalProperties":false},"EnrollmentHistoryEvent":{"title":"EnrollmentHistoryEvent","discriminator":{"propertyName":"type","mapping":{"submitted":"#/components/schemas/EnrollmentHistoryEventSubmitted","approved":"#/components/schemas/EnrollmentHistoryEventApproved","unenrolled":"#/components/schemas/EnrollmentHistoryEventUnenrolled","rejected":"#/components/schemas/EnrollmentHistoryEventRejected","resubmitrequested":"#/components/schemas/EnrollmentHistoryEventResubmitRequested","imported":"#/components/schemas/EnrollmentHistoryEventImported"}},"oneOf":[{"$ref":"#/components/schemas/EnrollmentHistoryEventSubmitted"},{"$ref":"#/components/schemas/EnrollmentHistoryEventApproved"},{"$ref":"#/components/schemas/EnrollmentHistoryEventUnenrolled"},{"$ref":"#/components/schemas/EnrollmentHistoryEventRejected"},{"$ref":"#/components/schemas/EnrollmentHistoryEventResubmitRequested"},{"$ref":"#/components/schemas/EnrollmentHistoryEventImported"}]},"EnrollmentSummary":{"title":"EnrollmentSummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/EnrollmentID"},"vendor":{"$ref":"#/components/schemas/Vendor"},"programID":{"$ref":"#/components/schemas/ProgramID"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"siteID":{"$ref":"#/components/schemas/SiteID","description":"The enrolled site, if known"},"history":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentHistoryEvent"}},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["id","programID","status","history","vendor","tags"]},"ListEnrollmentsResponse":{"title":"ListEnrollmentsResponse","type":"object","properties":{"enrollments":{"description":"List of Enrollments","type":"array","items":{"$ref":"#/components/schemas/EnrollmentSummary"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Enrollments available.","examples":[42]}},"required":["enrollments","totalCount"],"additionalProperties":false},"FranklinWHSiteSubmissionFlow":{"title":"FranklinWHSiteSubmissionFlow","type":"string","enum":["pairingcode"],"x-enumDescriptions":{"pairingcode":"Initiates a FranklinWH pairing code flow; the pairing code will be associated\nwith this enrollment and provided in the response.\n"},"description":"The FranklinWH flow to initiate","examples":["pairingcode"]},"FranklinWHSiteSubmission":{"title":"FranklinWHSiteSubmission","type":"object","properties":{"vendor":{"const":"franklinwh","default":"franklinwh","type":"string"},"flow":{"$ref":"#/components/schemas/FranklinWHSiteSubmissionFlow"}},"required":["vendor","flow"]},"VirtualSiteSubmissionFlow":{"title":"VirtualSiteSubmissionFlow","type":"string","enum":["pairingcode"],"x-enumDescriptions":{"pairingcode":"Initiates a virtual pairing code flow; the pairing code will be associated\nwith this enrollment and provided in the response.\n"},"description":"The virtual flow to initiate","examples":["pairingcode"]},"VirtualSiteSubmission":{"title":"VirtualSiteSubmission","type":"object","properties":{"vendor":{"const":"virtual","default":"virtual","type":"string"},"flow":{"$ref":"#/components/schemas/VirtualSiteSubmissionFlow"}},"required":["vendor","flow"]},"SiteSubmission":{"title":"SiteSubmission","discriminator":{"propertyName":"vendor","mapping":{"franklinwh":"#/components/schemas/FranklinWHSiteSubmission","virtual":"#/components/schemas/VirtualSiteSubmission"}},"oneOf":[{"$ref":"#/components/schemas/FranklinWHSiteSubmission"},{"$ref":"#/components/schemas/VirtualSiteSubmission"}]},"SubmitEnrollmentRequest":{"title":"SubmitEnrollmentRequest","type":"object","properties":{"programID":{"$ref":"#/components/schemas/ProgramID"},"site":{"$ref":"#/components/schemas/SiteSubmission"},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["programID","site"]},"EnrollmentSystemBESS":{"title":"EnrollmentSystemBESS","type":"object","properties":{"nameplateKwh":{"type":"number","description":"The rated storage capacity of the system in kWh","example":10.5},"maxChargeKw":{"type":"number","description":"The maximum charge rate of the system","example":4},"maxDischargeKw":{"type":"number","description":"The maximum discharge rate of the system","example":4}},"required":[],"additionalProperties":false},"EnrollmentSystem":{"title":"EnrollmentSystem","type":"object","properties":{"vendorID":{"type":"string","description":"The corresponding ID of the system/plant/Site in the vendor's system.","example":"9922118877"},"operationalSince":{"type":"string","format":"date-time","description":"The date the Site became operational or received permission to operate.","example":"2022-01-01T15:10:00+00:00"},"bess":{"$ref":"#/components/schemas/EnrollmentSystemBESS"},"model":{"type":"string","description":"The model of the system.","example":"SuperBESS 3000"}},"required":["vendorID"],"additionalProperties":false},"EnrollmentCustomer":{"title":"EnrollmentCustomer","type":"object","description":"Customer information for an Enrollment, inferred from the latest application.","properties":{"firstName":{"type":"string","description":"Customer first name","examples":["Sonny"]},"lastName":{"type":"string","description":"Customer last name","examples":["Wattson"]},"emailAddress":{"type":"string","description":"Customer email address","examples":["sonny.wattson@gmail.com"]},"phoneNumber":{"type":"string","description":"Customer phone number","examples":["212-999-9999"]}},"required":["firstName","lastName","emailAddress"],"additionalProperties":false},"EnrollmentAddress":{"title":"EnrollmentAddress","type":"object","description":"Address information for an Enrollment, inferred from the latest application.","properties":{"line1":{"type":"string","description":"Customer address line 1","examples":["100 Main Street"]},"line2":{"type":"string","description":"Customer address line 2","examples":["Suite C102"]},"city":{"type":"string","description":"Customer City","examples":["Brooklyn"]},"state":{"type":"string","description":"Customer State","examples":["NY"]},"zipCode":{"type":"string","description":"Customer zip code","examples":["11212"]}},"required":["line1","city","state","zipCode"],"additionalProperties":false},"EnrollmentAdditionalInfo":{"title":"EnrollmentAdditionalInfo","type":"object","maxProperties":50,"additionalProperties":{"type":"string","maxLength":250,"example":"PG&E"},"examples":[{"utility":"PG&E","sgip-funding":"true"}]},"EnrollmentUtilityAccountNumber":{"title":"EnrollmentUtilityAccountNumber","type":"string","description":"The utility account number associated with the Enrollment, inferred from the latest application.","examples":["889-0000-12345"]},"EnrollmentPairingInformation":{"type":"object","title":"EnrollmentPairingInformation","description":"Pairing information, if pending approval from a vendor who supports pairing codes","properties":{"code":{"type":"string","description":"A pairing code to use if pending approval from a vendor who supports pairing codes","examples":["ABCD-1234"]},"expiresAt":{"type":"string","description":"The time until which the current pairing code is valid.","format":"date-time","examples":["2026-03-19T00:00:00Z"]}},"required":["code","expiresAt"],"additionalProperties":false},"Enrollment":{"title":"Enrollment","type":"object","properties":{"id":{"$ref":"#/components/schemas/EnrollmentID"},"programID":{"$ref":"#/components/schemas/ProgramID"},"vendor":{"$ref":"#/components/schemas/Vendor"},"status":{"$ref":"#/components/schemas/EnrollmentStatus"},"siteID":{"$ref":"#/components/schemas/SiteID","description":"The enrolled site, if known"},"systemInfo":{"$ref":"#/components/schemas/EnrollmentSystem","description":"Information about the enrolled system, inferred from the latest application."},"history":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentHistoryEvent"}},"customer":{"$ref":"#/components/schemas/EnrollmentCustomer"},"address":{"$ref":"#/components/schemas/EnrollmentAddress"},"additionalInfo":{"description":"Additional information about the latest application.","$ref":"#/components/schemas/EnrollmentAdditionalInfo"},"utilityAccountNumber":{"$ref":"#/components/schemas/EnrollmentUtilityAccountNumber"},"siteSubmission":{"$ref":"#/components/schemas/SiteSubmission"},"pairing":{"$ref":"#/components/schemas/EnrollmentPairingInformation"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["id","programID","status","history","vendor","tags"]},"SubmitEnrollmentResponse":{"title":"SubmitEnrollmentResponse","allOf":[{"$ref":"#/components/schemas/Enrollment"}]},"IncorrectModeProblem":{"title":"IncorrectModeProblem","description":"An IncorrectModeProblem is returned when a request is made to an endpoint that requires\na different API key mode than the one being used.\n\nFor example, using virtual mode credentials to access a production-only endpoint, or vice versa.\n\nCorrect the request by using the appropriate mode credentials.\n","type":"object","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#incorrect-mode","description":"A URI reference that identifies the problem type.","example":"https://docs.derapi.com/reference/errors#incorrect-mode","default":"https://docs.derapi.com/reference/errors#incorrect-mode"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Incorrect Mode","example":"Incorrect Mode","default":"Incorrect Mode"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","example":"Not authorized for this endpoint -- did you mean to use your production mode credentials?"},"requiredMode":{"type":"string","description":"The mode required by the endpoint.","example":"production"}},"required":["type","title","detail","requiredMode"],"additionalProperties":false},"GetEnrollmentResponse":{"title":"GetEnrollmentResponse","allOf":[{"$ref":"#/components/schemas/Enrollment"}]},"CreateEnrollmentApplicationRequest":{"title":"CreateEnrollmentApplicationRequest","type":"object","properties":{"appliedAt":{"type":"string","format":"date-time","description":"Date and time customer submitted their application in ISO-8601 format with timezone","example":"2025-01-01T13:50:00+00:00"},"utilityAccountNumber":{"$ref":"#/components/schemas/EnrollmentUtilityAccountNumber","description":"The utility account number associated with this application."},"customerAcceptedTerms":{"type":"boolean","description":"Whether the user accepted terms","example":true,"const":true,"default":true},"customer":{"description":"Information about customer whose application it is","$ref":"#/components/schemas/EnrollmentCustomer"},"address":{"description":"The address of the site in the application.","$ref":"#/components/schemas/EnrollmentAddress"},"additionalInfo":{"description":"Additional information about the latest application, which may be retrieved on later calls\nloading the Enrollment.\n\nMaximum of 50 keys. Keys are limited to 100 bytes, values to 250 bytes.\n","$ref":"#/components/schemas/EnrollmentAdditionalInfo"}},"required":["appliedAt","utilityAccountNumber","customerAcceptedTerms","customer","address"]},"InvalidEnrollmentStatusProblem":{"title":"InvalidEnrollmentStatusProblem","type":"object","description":"An InvalidEnrollmentStatusProblem is returned when an Enrollment has a conflicting status\nfor the requested event.\n\nIt contains details about the conflicting status.\n\nRemedy it by ensuring the Enrollment is in a valid state for the requested event.\n","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#invalid-enrollment-status","description":"A URI reference that identifies the problem type.","examples":["https://docs.derapi.com/reference/errors#invalid-enrollment-status"],"default":"https://docs.derapi.com/reference/errors#invalid-enrollment-status"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Invalid Enrollment Status","examples":["Invalid Enrollment Status"],"default":"Invalid Enrollment Status"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","examples":["The enrollment has an conflicting status for the requested event"]},"status":{"$ref":"#/components/schemas/EnrollmentStatus","description":"The conflicting status"}},"required":["type","title","detail","status"],"additionalProperties":false},"InvalidEnrollmentApplicationTimeProblem":{"title":"InvalidEnrollmentApplicationTimeProblem","type":"object","description":"An InvalidEnrollmentApplicationTimeProblem is returned when an Enrollment has an application\nthat is later than the provided one.\n\nRemedy it by ensuring the Enrollment application time is set correctly and does not exceed the provided time.\n","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#invalid-enrollment-application-time","description":"A URI reference that identifies the problem type.","examples":["https://docs.derapi.com/reference/errors#invalid-enrollment-application-time"],"default":"https://docs.derapi.com/reference/errors#invalid-enrollment-application-time"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Invalid Enrollment Application Time","examples":["Invalid Enrollment Application Time"],"default":"Invalid Enrollment Application Time"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","examples":["The enrollment has an application later than the provided one"]}},"required":["type","title","detail"],"additionalProperties":false},"EnrollmentApplicationConflictProblem":{"title":"EnrollmentApplicationConflictProblem","type":"object","oneOf":[{"$ref":"#/components/schemas/InvalidEnrollmentStatusProblem"},{"$ref":"#/components/schemas/InvalidEnrollmentApplicationTimeProblem"}]},"EnrollmentHistoryEventType":{"title":"EnrollmentHistoryEventType","type":"string","enum":["submitted","vendorsubmitted","approved","unenrolled","rejected","resubmitrequested","imported"],"examples":["submitted"]},"CreateEnrollmentEventRequest":{"title":"CreateEnrollmentEventRequest","type":"object","description":"Records an Enrollment event.\n\nOnly certain operator event types are allowed to be created via this endpoint.\n","properties":{"type":{"x-go-type":"EnrollmentHistoryEventType","description":"The type of enrollment event to be created","enum":["approved","rejected","resubmitrequested","unenrolled"],"x-enumDescriptions":{"approved":"Record operator approval","rejected":"Record operator rejection, without the ability to resubmit","resubmitrequested":"Request customer resubmit enrollment application","unenrolled":"Record operator unenrollment"},"$ref":"#/components/schemas/EnrollmentHistoryEventType"},"reason":{"type":"string","description":"Reason for the event; only accepted for `rejected`, `resubmitrequested`, and `unenrolled` types","maxLength":500,"examples":["Missing required documents","Customer requested resubmission to update information"]}},"additionalProperties":false,"required":["type"]},"UpdateEnrollmentTagsRequest":{"title":"UpdateEnrollmentTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]},"SyncEnrollmentResponse":{"type":"object","title":"SyncEnrollmentResponse","properties":{},"required":[],"additionalProperties":false},"VendorCredentialsID":{"type":"string","description":"ID for the vendor credentials","pattern":"^cred-[a-z0-9]+$","examples":["cred-rvu37v4fylnbuznf"]},"VendorCredentialsName":{"type":"string","description":"The name of the vendor credentials; inferred if not provided.","examples":["my enphase credentials"],"minLength":1},"HiddenChargePointCredentials":{"title":"HiddenChargePointCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"chargepoint/api","examples":["chargepoint/api"],"default":"chargepoint/api"},"type":{"const":"api","examples":["api"],"type":"string","default":"api"},"vendor":{"const":"chargepoint","examples":["chargepoint"],"type":"string","default":"chargepoint"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenEG4Credentials":{"title":"HiddenEG4Credentials","type":"object","properties":{"vendorType":{"type":"string","const":"eg4/apikey","examples":["eg4/apikey"],"default":"eg4/apikey"},"type":{"const":"apikey","examples":["apikey"],"type":"string","default":"apikey"},"vendor":{"const":"eg4","examples":["eg4"],"type":"string","default":"eg4"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"VendorEnphase":{"type":"string","const":"enphase","examples":["enphase"],"default":"enphase"},"HiddenEnphaseDeveloperAppCredentials":{"title":"HiddenEnphaseDeveloperAppCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"enphase/developerapp","examples":["enphase/developerapp"],"default":"enphase/developerapp"},"type":{"const":"developerapp","examples":["developerapp"],"type":"string","default":"developerapp"},"vendor":{"$ref":"#/components/schemas/VendorEnphase"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenEnphasePartnerAppCredentials":{"title":"HiddenEnphasePartnerAppCredentials","type":"object","description":"Credentials for an Enphase partner app","properties":{"vendorType":{"type":"string","const":"enphase/partnerapp","examples":["enphase/partnerapp"],"default":"enphase/partnerapp"},"type":{"const":"partnerapp","examples":["partnerapp"],"type":"string","default":"partnerapp"},"vendor":{"$ref":"#/components/schemas/VendorEnphase"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenEnphaseVPPCredentials":{"title":"HiddenEnphaseVPPCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"enphasevpp/vpp","examples":["enphasevpp/vpp"],"default":"enphasevpp/vpp"},"type":{"const":"vpp","examples":["vpp"],"type":"string","default":"vpp"},"vendor":{"const":"enphasevpp","examples":["enphasevpp"],"type":"string","default":"enphasevpp"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"EnphaseVPPProgramID":{"type":"string","description":"The Enphase ID of the Program to which these credentials are bound.","examples":["Smart_Energy_Program"],"minLength":1},"HiddenEnphaseVPPProgramAuthCredentials":{"title":"HiddenEnphaseVPPProgramAuthCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"enphasevpp/programauth","examples":["enphasevpp/programauth"],"default":"enphasevpp/programauth"},"vendor":{"const":"enphasevpp","examples":["enphasevpp"],"type":"string","default":"enphasevpp"},"type":{"const":"programauth","examples":["programauth"],"type":"string","default":"programauth"},"programID":{"$ref":"#/components/schemas/EnphaseVPPProgramID"}},"required":["vendorType","vendor","type","programID"],"additionalProperties":false},"HiddenFoxESSApiKeyCredentials":{"title":"HiddenFoxESSApiKeyCredentials","type":"object","description":"Hidden version of FoxESS credentials (secrets not exposed)","properties":{"vendorType":{"type":"string","const":"foxess/apikey","examples":["foxess/apikey"],"default":"foxess/apikey"},"vendor":{"type":"string","const":"foxess","examples":["foxess"],"default":"foxess"},"type":{"type":"string","const":"apikey","examples":["apikey"],"default":"apikey"}},"required":["vendorType","vendor","type"],"additionalProperties":false,"examples":[{"vendorType":"foxess/apikey","vendor":"foxess","type":"apikey"}]},"HiddenFranklinWHCredentials":{"title":"HiddenFranklinWHCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"franklinwh/partner","examples":["franklinwh/partner"],"default":"franklinwh/partner"},"type":{"const":"partner","examples":["partner"],"type":"string","default":"partner"},"vendor":{"const":"franklinwh","examples":["franklinwh"],"type":"string","default":"franklinwh"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenGeneracPWRAPICredentials":{"title":"HiddenGeneracPWRAPICredentials","type":"object","properties":{"vendorType":{"type":"string","const":"generac/pwrapi","examples":["generac/pwrapi"],"default":"generac/pwrapi"},"type":{"const":"pwrapi","examples":["pwrapi"],"type":"string","default":"pwrapi"},"vendor":{"const":"generac","examples":["generac"],"type":"string","default":"generac"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenLunarGridsharePartnerCredentials":{"title":"HiddenLunarGridsharePartnerCredentials","type":"object","description":"Credentials for the Lunar Gridshare Partner API","properties":{"vendorType":{"type":"string","const":"lunar/gridsharepartner","examples":["lunar/gridsharepartner"],"default":"lunar/gridsharepartner"},"type":{"const":"gridsharepartner","examples":["gridsharepartner"],"type":"string","default":"gridsharepartner"},"vendor":{"const":"lunar","examples":["lunar"],"type":"string","default":"lunar"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenSMACustomGrantCredentials":{"title":"HiddenSMACustomGrantCredentials","type":"object","description":"Credentials from the SMA custom grant oauth flow","properties":{"vendorType":{"type":"string","const":"sma/customgrant","examples":["sma/customgrant"],"default":"sma/customgrant"},"type":{"const":"customgrant","examples":["customgrant"],"type":"string","default":"customgrant"},"vendor":{"const":"sma","examples":["sma"],"type":"string","default":"sma"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenSMAOAuthCredentials":{"title":"HiddenSMAOAuthCredentials","type":"object","description":"Credentials from the SMA OAuth code grant flow","properties":{"vendorType":{"type":"string","const":"sma/oauthclient","examples":["sma/oauthclient"],"default":"sma/oauthclient"},"type":{"const":"oauthclient","examples":["oauthclient"],"type":"string","default":"oauthclient"},"vendor":{"const":"sma","examples":["sma"],"type":"string","default":"sma"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenSolarEdgeCredentials":{"title":"HiddenSolarEdgeCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"solaredge/apikey","examples":["solaredge/apikey"],"default":"solaredge/apikey"},"type":{"const":"apikey","examples":["apikey"],"type":"string","default":"apikey"},"vendor":{"const":"solaredge","examples":["solaredge"],"type":"string","default":"solaredge"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenSolisOAuthCredentials":{"title":"HiddenSolisOAuthCredentials","type":"object","description":"Credentials from the Solis OAuth code grant flow","properties":{"vendorType":{"type":"string","const":"solis/oauthclient","examples":["solis/oauthclient"],"default":"solis/oauthclient"},"type":{"const":"oauthclient","examples":["oauthclient"],"type":"string","default":"oauthclient"},"vendor":{"const":"solis","examples":["solis"],"type":"string","default":"solis"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenTeslaAppCredentials":{"title":"HiddenTeslaAppCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"tesla/app","examples":["tesla/app"],"default":"tesla/app"},"type":{"const":"app","examples":["app"],"type":"string","default":"app"},"vendor":{"const":"tesla","examples":["tesla"],"type":"string","default":"tesla"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenTeslaPowerhubCredentials":{"title":"HiddenTeslaPowerhubCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"tesla/powerhub","examples":["tesla/powerhub"],"default":"tesla/powerhub"},"vendor":{"const":"tesla","examples":["tesla"],"type":"string","default":"tesla"},"type":{"const":"powerhub","examples":["powerhub"],"type":"string","default":"powerhub"}},"required":["vendorType","vendor","type"],"additionalProperties":false},"HiddenVendorCredentialsCredentials":{"title":"HiddenVendorCredentialsCredentials","oneOf":[{"$ref":"#/components/schemas/HiddenChargePointCredentials"},{"$ref":"#/components/schemas/HiddenEG4Credentials"},{"$ref":"#/components/schemas/HiddenEnphaseDeveloperAppCredentials"},{"$ref":"#/components/schemas/HiddenEnphasePartnerAppCredentials"},{"$ref":"#/components/schemas/HiddenEnphaseVPPCredentials"},{"$ref":"#/components/schemas/HiddenEnphaseVPPProgramAuthCredentials"},{"$ref":"#/components/schemas/HiddenFoxESSApiKeyCredentials"},{"$ref":"#/components/schemas/HiddenFranklinWHCredentials"},{"$ref":"#/components/schemas/HiddenGeneracPWRAPICredentials"},{"$ref":"#/components/schemas/HiddenLunarGridsharePartnerCredentials"},{"$ref":"#/components/schemas/HiddenSMACustomGrantCredentials"},{"$ref":"#/components/schemas/HiddenSMAOAuthCredentials"},{"$ref":"#/components/schemas/HiddenSolarEdgeCredentials"},{"$ref":"#/components/schemas/HiddenSolisOAuthCredentials"},{"$ref":"#/components/schemas/HiddenTeslaAppCredentials"},{"$ref":"#/components/schemas/HiddenTeslaPowerhubCredentials"}],"description":"Hidden credentials for a given vendor.","discriminator":{"propertyName":"vendorType","mapping":{"chargepoint/api":"#/components/schemas/HiddenChargePointCredentials","eg4/apikey":"#/components/schemas/HiddenEG4Credentials","enphase/developerapp":"#/components/schemas/HiddenEnphaseDeveloperAppCredentials","enphase/partnerapp":"#/components/schemas/HiddenEnphasePartnerAppCredentials","enphasevpp/vpp":"#/components/schemas/HiddenEnphaseVPPCredentials","enphasevpp/programauth":"#/components/schemas/HiddenEnphaseVPPProgramAuthCredentials","foxess/apikey":"#/components/schemas/HiddenFoxESSApiKeyCredentials","franklinwh/partner":"#/components/schemas/HiddenFranklinWHCredentials","generac/pwrapi":"#/components/schemas/HiddenGeneracPWRAPICredentials","lunar/gridsharepartner":"#/components/schemas/HiddenLunarGridsharePartnerCredentials","sma/customgrant":"#/components/schemas/HiddenSMACustomGrantCredentials","sma/oauthclient":"#/components/schemas/HiddenSMAOAuthCredentials","solaredge/apikey":"#/components/schemas/HiddenSolarEdgeCredentials","solis/oauthclient":"#/components/schemas/HiddenSolisOAuthCredentials","tesla/app":"#/components/schemas/HiddenTeslaAppCredentials","tesla/powerhub":"#/components/schemas/HiddenTeslaPowerhubCredentials"}}},"HiddenVendorCredentials":{"title":"HiddenVendorCredentials","type":"object","description":"Vendor credentials which are hidden.","properties":{"id":{"$ref":"#/components/schemas/VendorCredentialsID"},"name":{"$ref":"#/components/schemas/VendorCredentialsName"},"credentials":{"$ref":"#/components/schemas/HiddenVendorCredentialsCredentials"}},"required":["id","name","credentials"],"additionalProperties":false},"ListVendorCredentialsResponse":{"title":"ListVendorCredentialsResponse","type":"object","properties":{"vendorCredentials":{"type":"array","items":{"$ref":"#/components/schemas/HiddenVendorCredentials"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Vendor Credentials available.","examples":[42]}},"required":["vendorCredentials","totalCount"],"additionalProperties":false},"ChargePointEnvironment":{"type":"string","title":"ChargePointEnvironment","description":"Indicates which ChargePoint API environment these credentials are associated with.","enum":["naprod","naqa","euprod","euqa","caprod"],"default":"naprod","examples":["naprod"]},"ChargePointCredentials":{"title":"ChargePointCredentials","type":"object","description":"ChargePoint credentials for the Web Services API can be generated following instructions at https://na.chargepoint.com/UI/s3docs/docs/help/SetupWebServicesAPI.pdf\n","properties":{"vendorType":{"type":"string","const":"chargepoint/api","examples":["chargepoint/api"],"default":"chargepoint/api"},"vendor":{"type":"string","const":"chargepoint","examples":["chargepoint"],"default":"chargepoint"},"type":{"type":"string","const":"api","examples":["api"],"default":"api"},"apiLicenseKey":{"type":"string","description":"ChargePoint API License Key","examples":["0123456789abcdef0123456789abcdef0123456789abcdef0123456"],"minLength":1},"apiPassword":{"type":"string","description":"ChargePoint API Password","examples":["0123456789abcdef0123456789abcdef"],"minLength":1},"env":{"$ref":"#/components/schemas/ChargePointEnvironment"}},"required":["vendorType","vendor","type","apiLicenseKey","apiPassword"],"additionalProperties":false,"examples":[{"vendorType":"chargepoint/api","vendor":"chargepoint","type":"api","apiLicenseKey":"0123456789abcdef0123456789abcdef0123456789abcdef0123456","apiPassword":"0123456789abcdef0123456789abcdef","env":"caprod"}]},"EG4Environment":{"type":"string","title":"EG4Environment","description":"Indicates which EG4 API environment these credentials are associated with.","enum":["production","dev"],"default":"production","examples":["production"]},"EG4Credentials":{"title":"EG4Credentials","type":"object","properties":{"vendorType":{"type":"string","const":"eg4/apikey","examples":["eg4/apikey"],"default":"eg4/apikey"},"vendor":{"type":"string","const":"eg4","examples":["eg4"],"default":"eg4"},"type":{"type":"string","const":"apikey","examples":["apikey"],"default":"apikey"},"apiKey":{"type":"string","description":"EG4 API Key","examples":["abc12-34def-ghi56"],"minLength":1},"env":{"$ref":"#/components/schemas/EG4Environment"}},"required":["vendorType","vendor","type","apiKey"],"additionalProperties":false,"examples":[{"vendorType":"eg4/apikey","vendor":"eg4","type":"apikey","apiKey":"abc12-34def-ghi56"}]},"EnphaseClientID":{"type":"string","description":"Enphase Client ID","examples":["rj3x6iWqn7rLXQ"],"minLength":1},"EnphaseClientSecret":{"type":"string","description":"Enphase Client Secret","examples":["2O3ISVVUD3PNOLGOK27GXIHTPD4NGMFC"],"minLength":1},"EnphaseApiKey":{"type":"string","description":"Enphase API key of the application","examples":["WOUBAA4RW36EO3PFZCJMFV7DOSHQ55IY"],"minLength":1},"EnphasePartnerAppCredentials":{"title":"EnphasePartnerAppCredentials","type":"object","description":"Enphase API credentials for an application created under a Partner plan, as described in the Enphase Developer Portal at https://developer-v4.enphase.com/docs/quickstart.html#step_1_partner\n","properties":{"vendorType":{"type":"string","const":"enphase/partnerapp","examples":["enphase/partnerapp"],"default":"enphase/partnerapp"},"vendor":{"$ref":"#/components/schemas/VendorEnphase"},"type":{"type":"string","const":"partnerapp","examples":["partnerapp"],"default":"partnerapp"},"clientID":{"$ref":"#/components/schemas/EnphaseClientID"},"clientSecret":{"$ref":"#/components/schemas/EnphaseClientSecret"},"apiKey":{"$ref":"#/components/schemas/EnphaseApiKey"}},"required":["vendorType","vendor","type","clientID","clientSecret","apiKey"],"additionalProperties":false,"examples":[{"vendorType":"enphase/partnerapp","vendor":"enphase","type":"partnerapp","apiKey":"98shaf","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"EnphaseDeveloperAppCredentials":{"title":"EnphaseDeveloperAppCredentials","type":"object","description":"Enphase API credentials for an application created under a developer plan (Watt, Kilowatt, or Megawatt), as described in the Enphase Developer Portal at https://developer-v4.enphase.com/docs/quickstart.html#step_1\n","properties":{"vendorType":{"type":"string","const":"enphase/developerapp","examples":["enphase/developerapp"],"default":"enphase/developerapp"},"vendor":{"$ref":"#/components/schemas/VendorEnphase"},"type":{"type":"string","const":"developerapp","examples":["developerapp"],"default":"developerapp"},"clientID":{"$ref":"#/components/schemas/EnphaseClientID"},"clientSecret":{"$ref":"#/components/schemas/EnphaseClientSecret"},"apiKey":{"$ref":"#/components/schemas/EnphaseApiKey"}},"required":["vendorType","vendor","type","clientID","clientSecret","apiKey"],"additionalProperties":false,"examples":[{"vendorType":"enphase/developerapp","vendor":"enphase","type":"developerapp","apiKey":"98shaf","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"EnphaseVPPClientID":{"type":"string","description":"Enphase VPP Client ID","examples":["R6UVS7BUAUMO4"],"minLength":1},"EnphaseVPPClientSecret":{"examples":["R6UVS7BUAUMO4"],"type":"string","description":"Enphase VPP Client Secret","minLength":1},"EnphaseVPPApiKey":{"type":"string","description":"Enphase VPP API Key","examples":["AZIFWQ33OMOPPCNR7NTVHQIQXJIRRZPV"],"minLength":1},"EnphaseVPPCredentials":{"title":"EnphaseVPPCredentials","type":"object","description":"App Client credentials for use with the Enphase VPP (aka Grid Services) API.\nThese credentials are provisioned within the Enphase Grid Services Manager portal.\n","properties":{"vendorType":{"type":"string","const":"enphasevpp/vpp","examples":["enphasevpp/vpp"],"default":"enphasevpp/vpp"},"vendor":{"type":"string","const":"enphasevpp","examples":["enphasevpp"],"default":"enphasevpp"},"type":{"type":"string","const":"vpp","examples":["vpp"],"default":"vpp"},"clientID":{"$ref":"#/components/schemas/EnphaseVPPClientID"},"clientSecret":{"$ref":"#/components/schemas/EnphaseVPPClientSecret"},"apiKey":{"$ref":"#/components/schemas/EnphaseVPPApiKey"}},"required":["vendorType","vendor","type","clientID","clientSecret","apiKey"],"additionalProperties":false,"examples":[{"vendorType":"enphasevpp/vpp","vendor":"enphasevpp","type":"vpp","apiKey":"98shaf","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"EnphaseAuthClientID":{"type":"string","description":"Enphase Auth Client ID","minLength":1,"examples":["f2a479f3c6064f0d9517cadae7f00b47"]},"EnphaseAuthClientSecret":{"type":"string","description":"Enphase Auth Client Secret","minLength":1,"examples":["gluigsp1rtf4n3rn9v8cqr3461i6a84nad16c2m8dbt89b6bg07"]},"EnphaseVPPProgramAuthCredentials":{"title":"EnphaseVPPProgramAuthCredentials","type":"object","description":"Program-bound credentials used to enroll and authorize systems for access via the Enphase VPP API (aka Grid Services API).\nThese credentials appear in the Enphase Grid Services Manager portal, listed alongside the Program that they are bound to.\n","properties":{"vendorType":{"type":"string","const":"enphasevpp/programauth","examples":["enphasevpp/programauth"],"default":"enphasevpp/programauth"},"vendor":{"type":"string","const":"enphasevpp","examples":["enphasevpp"],"default":"enphasevpp"},"type":{"type":"string","const":"programauth","examples":["programauth"],"default":"programauth"},"clientID":{"$ref":"#/components/schemas/EnphaseAuthClientID"},"clientSecret":{"$ref":"#/components/schemas/EnphaseAuthClientSecret"},"programID":{"$ref":"#/components/schemas/EnphaseVPPProgramID"}},"required":["vendorType","vendor","type","clientID","clientSecret","programID"],"additionalProperties":false,"examples":[{"vendorType":"enphasevpp/programauth","vendor":"enphasevpp","type":"programauth","clientID":"23rnohfdosv","clientSecret":"kvn20r0","programID":"Smart_Energy_Program"}]},"FoxESSApiKeyCredentials":{"title":"FoxESSApiKeyCredentials","type":"object","description":"API Key for the FoxESS Cloud Platform API","properties":{"vendorType":{"type":"string","const":"foxess/apikey","examples":["foxess/apikey"],"default":"foxess/apikey"},"vendor":{"type":"string","const":"foxess","examples":["foxess"],"default":"foxess"},"type":{"type":"string","const":"apikey","examples":["apikey"],"default":"apikey"},"apiKey":{"type":"string","description":"FoxESS API key","examples":["1234567890abcdef"],"minLength":1}},"required":["vendorType","vendor","type","apiKey"],"examples":[{"vendorType":"foxess/apikey","vendor":"foxess","type":"apikey","apiKey":"1234567890abcdef"}]},"FranklinWHEnvironment":{"type":"string","title":"FranklinWHEnvironment","description":"Indicates which Franklin API environment these credentials are associated with.","enum":["production","test"],"default":"production","examples":["production"]},"FranklinWHCredentials":{"title":"FranklinWHCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"franklinwh/partner","examples":["franklinwh/partner"],"default":"franklinwh/partner"},"vendor":{"type":"string","const":"franklinwh","examples":["franklinwh"],"default":"franklinwh"},"type":{"type":"string","const":"partner","examples":["partner"],"default":"partner"},"clientID":{"type":"string","description":"FranklinWH Client ID","examples":["4W7LXAIOCGDQE"],"minLength":1},"clientSecret":{"type":"string","description":"FranklinWH Client Secret","examples":["ATFRVVXLKBGZP7SNSUC4US2SMTDWQ3Y6"],"minLength":1},"env":{"$ref":"#/components/schemas/FranklinWHEnvironment"}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"franklinwh/partner","vendor":"franklinwh","type":"partner","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"GeneracPWRAPICredentials":{"title":"GeneracPWRAPICredentials","type":"object","description":"Client credentials for use with Generac PWRapi.\nSee https://docs.pwrapi.generac.com/getting-started/authentication\n","properties":{"vendorType":{"type":"string","const":"generac/pwrapi","examples":["generac/pwrapi"],"default":"generac/pwrapi"},"vendor":{"type":"string","const":"generac","examples":["generac"],"default":"generac"},"type":{"type":"string","const":"pwrapi","examples":["pwrapi"],"default":"pwrapi"},"clientID":{"type":"string","description":"Client ID for Generac PWRapi","minLength":1,"example":"23rnohfdosv"},"clientSecret":{"type":"string","description":"Client secret for Generac PWRapi","minLength":1,"example":"kvn20r0"}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"generac/pwrapi","vendor":"generac","type":"pwrapi","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"LunarGridsharePartnerRegion":{"type":"string","title":"LunarGridsharePartnerRegion","description":"Indicates which Lunar Gridshare Partner API region these credentials are associated with.","enum":["us","global"],"default":"us","examples":["us"]},"LunarGridsharePartnerEnvironment":{"type":"string","title":"LunarGridsharePartnerEnvironment","description":"Indicates which Lunar Gridshare Partner API environment these credentials are associated with.","enum":["production","development"],"default":"production","examples":["production"]},"LunarGridsharePartnerCredentials":{"title":"LunarGridsharePartnerCredentials","type":"object","description":"Credentials for the [Lunar Gridshare Partner API](https://developers.gridshare.com/reference/authentication)","properties":{"vendorType":{"type":"string","const":"lunar/gridsharepartner","examples":["lunar/gridsharepartner"],"default":"lunar/gridsharepartner"},"type":{"const":"gridsharepartner","examples":["gridsharepartner"],"type":"string","default":"gridsharepartner"},"vendor":{"const":"lunar","examples":["lunar"],"type":"string","default":"lunar"},"clientID":{"type":"string","description":"Client ID provided from Lunar.","examples":["UO7I7B43U73VM"],"minLength":1},"clientSecret":{"type":"string","description":"Lunar Client Secret","examples":["XLOGU2DOC2EPY35A7RCZHKJHBUA7MO5M"],"minLength":1},"region":{"$ref":"#/components/schemas/LunarGridsharePartnerRegion"},"env":{"$ref":"#/components/schemas/LunarGridsharePartnerEnvironment"}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"lunar/gridsharepartner","vendor":"lunar","type":"gridsharepartner","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"SMAClientID":{"type":"string","description":"SMA Client ID","examples":["UO7I7B43U73VM"],"minLength":1},"SMAClientSecret":{"type":"string","description":"SMA Client Secret","examples":["XLOGU2DOC2EPY35A7RCZHKJHBUA7MO5M"],"minLength":1},"SMACustomGrantCredentials":{"title":"SMACustomGrantCredentials","type":"object","description":"Credentials from the SMA custom grant oauth flow","properties":{"vendorType":{"type":"string","const":"sma/customgrant","examples":["sma/customgrant"],"default":"sma/customgrant"},"vendor":{"type":"string","const":"sma","examples":["sma"],"default":"sma"},"type":{"type":"string","const":"customgrant","examples":["customgrant"],"default":"customgrant"},"clientID":{"$ref":"#/components/schemas/SMAClientID"},"clientSecret":{"$ref":"#/components/schemas/SMAClientSecret"}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"sma/customgrant","vendor":"sma","type":"customgrant","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"SMAOAuthCredentials":{"title":"SMAOAuthCredentials","type":"object","description":"Credentials from the SMA OAuth code grant flow","properties":{"vendorType":{"type":"string","const":"sma/oauthclient","examples":["sma/oauthclient"],"default":"sma/oauthclient"},"vendor":{"type":"string","const":"sma","examples":["sma"],"default":"sma"},"type":{"type":"string","const":"oauthclient","examples":["oauthclient"],"default":"oauthclient"},"clientID":{"$ref":"#/components/schemas/SMAClientID"},"clientSecret":{"$ref":"#/components/schemas/SMAClientSecret"}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"sma/oauthclient","vendor":"sma","type":"oauthclient","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"SolarEdgeCredentials":{"title":"SolarEdgeCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"solaredge/apikey","examples":["solaredge/apikey"],"default":"solaredge/apikey"},"vendor":{"type":"string","const":"solaredge","examples":["solaredge"],"default":"solaredge"},"type":{"type":"string","const":"apikey","examples":["apikey"],"default":"apikey"},"apiKey":{"type":"string","description":"SolarEdge API Key","examples":["SXNKOMJ7SNRZTHWLRNPKRR2K6ZDJL5Y4LRXCOEW3"],"minLength":1}},"required":["vendorType","vendor","type","apiKey"],"additionalProperties":false,"examples":[{"vendorType":"solaredge/apikey","vendor":"solaredge","type":"apikey","apiKey":"23rnohfdosv"}]},"SolisOAuthCredentials":{"title":"SolisOAuthCredentials","type":"object","description":"Credentials from the Solis OAuth code grant flow","properties":{"vendorType":{"type":"string","const":"solis/oauthclient","examples":["solis/oauthclient"],"default":"solis/oauthclient"},"vendor":{"type":"string","const":"solis","examples":["solis"],"default":"solis"},"type":{"type":"string","const":"oauthclient","examples":["oauthclient"],"default":"oauthclient"},"clientID":{"type":"string","description":"Solis Client ID","examples":["UO7I7B43U73VM"],"minLength":1},"clientSecret":{"type":"string","description":"Solis Client Secret","examples":["XLOGU2DOC2EPY35A7RCZHKJHBUA7MO5M"],"minLength":1}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"solis/oauthclient","vendor":"solis","type":"oauthclient","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"TeslaClientID":{"type":"string","description":"Client ID for a Tesla App","examples":["HKHP4UNG3V5MG7YK"],"minLength":1},"TeslaClientSecret":{"type":"string","description":"Client secret for a Tesla App","examples":["YTDCFOK37KW37LYPANCWDXDEEHT7UWPUWLM32N5L"],"minLength":1},"TeslaAppCredentials":{"title":"TeslaAppCredentials","type":"object","properties":{"vendorType":{"type":"string","const":"tesla/app","examples":["tesla/app"],"default":"tesla/app"},"vendor":{"type":"string","const":"tesla","examples":["tesla"],"default":"tesla"},"type":{"type":"string","const":"app","examples":["app"],"default":"app"},"clientID":{"$ref":"#/components/schemas/TeslaClientID"},"clientSecret":{"$ref":"#/components/schemas/TeslaClientSecret"}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"tesla/app","vendor":"tesla","type":"app","clientID":"23rnohfdosv","clientSecret":"kvn20r0"}]},"TeslaPowerhubCredentials":{"title":"TeslaPowerhubCredentials","type":"object","description":"Client credentials to access the Tesla Powerhub API.\n","properties":{"vendorType":{"type":"string","const":"tesla/powerhub","examples":["tesla/powerhub"],"default":"tesla/powerhub"},"vendor":{"type":"string","const":"tesla","examples":["tesla"],"default":"tesla"},"type":{"type":"string","const":"powerhub","examples":["powerhub"],"default":"powerhub"},"clientID":{"type":"string","description":"Tesla Powerhub Client ID","examples":["abc12-34def-ghi56"],"minLength":1},"clientSecret":{"type":"string","description":"Tesla Powerhub Client Secret","examples":["tesla_secret_789xyz"],"minLength":1}},"required":["vendorType","vendor","type","clientID","clientSecret"],"additionalProperties":false,"examples":[{"vendorType":"tesla/powerhub","vendor":"tesla","type":"powerhub","clientID":"abc12-34def-ghi56","clientSecret":"tesla_secret_789xyz"}]},"VendorCredentialsCredentials":{"title":"VendorCredentialsCredentials","oneOf":[{"$ref":"#/components/schemas/ChargePointCredentials"},{"$ref":"#/components/schemas/EG4Credentials"},{"$ref":"#/components/schemas/EnphasePartnerAppCredentials"},{"$ref":"#/components/schemas/EnphaseDeveloperAppCredentials"},{"$ref":"#/components/schemas/EnphaseVPPCredentials"},{"$ref":"#/components/schemas/EnphaseVPPProgramAuthCredentials"},{"$ref":"#/components/schemas/FoxESSApiKeyCredentials"},{"$ref":"#/components/schemas/FranklinWHCredentials"},{"$ref":"#/components/schemas/GeneracPWRAPICredentials"},{"$ref":"#/components/schemas/LunarGridsharePartnerCredentials"},{"$ref":"#/components/schemas/SMACustomGrantCredentials"},{"$ref":"#/components/schemas/SMAOAuthCredentials"},{"$ref":"#/components/schemas/SolarEdgeCredentials"},{"$ref":"#/components/schemas/SolisOAuthCredentials"},{"$ref":"#/components/schemas/TeslaAppCredentials"},{"$ref":"#/components/schemas/TeslaPowerhubCredentials"}],"description":"Credentials for a given vendor.","discriminator":{"propertyName":"vendorType","mapping":{"chargepoint/api":"#/components/schemas/ChargePointCredentials","eg4/apikey":"#/components/schemas/EG4Credentials","enphase/partnerapp":"#/components/schemas/EnphasePartnerAppCredentials","enphase/developerapp":"#/components/schemas/EnphaseDeveloperAppCredentials","enphasevpp/vpp":"#/components/schemas/EnphaseVPPCredentials","enphasevpp/programauth":"#/components/schemas/EnphaseVPPProgramAuthCredentials","foxess/apikey":"#/components/schemas/FoxESSApiKeyCredentials","franklinwh/partner":"#/components/schemas/FranklinWHCredentials","generac/pwrapi":"#/components/schemas/GeneracPWRAPICredentials","lunar/gridsharepartner":"#/components/schemas/LunarGridsharePartnerCredentials","sma/customgrant":"#/components/schemas/SMACustomGrantCredentials","sma/oauthclient":"#/components/schemas/SMAOAuthCredentials","solaredge/apikey":"#/components/schemas/SolarEdgeCredentials","solis/oauthclient":"#/components/schemas/SolisOAuthCredentials","tesla/app":"#/components/schemas/TeslaAppCredentials","tesla/powerhub":"#/components/schemas/TeslaPowerhubCredentials"}}},"CreateVendorCredentialsRequest":{"title":"CreateVendorCredentialsRequest","type":"object","properties":{"name":{"$ref":"#/components/schemas/VendorCredentialsName"},"credentials":{"$ref":"#/components/schemas/VendorCredentialsCredentials"}},"required":["credentials"],"additionalProperties":false},"CreateVendorCredentialsResponse":{"title":"CreateVendorCredentialsResponse","allOf":[{"$ref":"#/components/schemas/HiddenVendorCredentials"}]},"CredentialsAlreadyExistProblem":{"type":"object","title":"CredentialsAlreadyExistProblem","description":"A CredentialsAlreadyExistProblem is returned when the request cannot be processed\nbecause the provided credentials already exist in the system.\n","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#credentials-already-exist","description":"A URI reference that identifies the problem type.","example":"https://docs.derapi.com/reference/errors#credentials-already-exist","default":"https://docs.derapi.com/reference/errors#credentials-already-exist"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Already Exists","examples":["Already Exists"],"default":"Already Exists"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","examples":["The provided credentials already exist in the system"]},"conflictingCredentials":{"type":"string","description":"The conflicting credential ID","examples":["cred-1234"]}},"required":["type","title","detail","conflictingCredentials"],"additionalProperties":false},"MaybeHiddenVendorCredentialsCredentials":{"title":"MaybeHiddenVendorCredentialsCredentials","oneOf":[{"$ref":"#/components/schemas/HiddenVendorCredentialsCredentials"},{"$ref":"#/components/schemas/VendorCredentialsCredentials"}]},"VendorCredentials":{"title":"VendorCredentials","type":"object","description":"Vendor credentials which may or may not be hidden.","properties":{"id":{"$ref":"#/components/schemas/VendorCredentialsID"},"name":{"$ref":"#/components/schemas/VendorCredentialsName"},"credentials":{"$ref":"#/components/schemas/MaybeHiddenVendorCredentialsCredentials"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"}},"required":["id","name","credentials"],"additionalProperties":false},"GetVendorCredentialsResponse":{"title":"GetVendorCredentialsResponse","allOf":[{"$ref":"#/components/schemas/VendorCredentials"}]},"SyncVendorCredentialsResponse":{"type":"object","title":"SyncVendorCredentialsResponse","properties":{},"required":[],"additionalProperties":false},"JoinFlowID":{"type":"string","description":"An identifier for the flow.","examples":["flow-1234"]},"EnphaseJoinConfig":{"title":"EnphaseJoinConfig","properties":{"vendor":{"const":"enphase","default":"enphase","type":"string"},"credentialsID":{"type":"string","description":"ID of the previously-stored Enphase credentials to use for this flow.\nThe referenced credentials must have `vendor=enphase` and `type={developerapp,partnerapp}`.\n","pattern":"^cred-[a-z0-9]+$","examples":["cred-rvu37v4fylnbuznf"]}},"required":["vendor","credentialsID"],"additionalProperties":false},"EnphaseVPPJoinConfig":{"title":"EnphaseVPPJoinConfig","properties":{"vendor":{"const":"enphasevpp","default":"enphasevpp","type":"string"},"vppCredentialsID":{"type":"string","description":"ID of the previously-stored Enphase VPP credentials to use for this flow.\nThe referenced credentials must have `vendor=enphasevpp` and `type=vpp`.\n","pattern":"^cred-[a-z0-9]+$","examples":["cred-rvu37v4fylnbuznf"]},"programAuthCredentialsID":{"type":"string","pattern":"^cred-[a-z0-9]+$","examples":["cred-rvu37v4fylnbuznf"],"description":"ID of the previously-stored Enphase VPP Program Auth credentials to use for this flow.\nThe referenced credentials must have `vendor=enphasevpp` and `type=programauth`.\n"}},"required":["vendor","vppCredentialsID","programAuthCredentialsID"],"additionalProperties":false},"SMAJoinConfig":{"title":"SMAJoinConfig","properties":{"vendor":{"const":"sma","default":"sma","type":"string"},"credentialsID":{"type":"string","pattern":"^cred-[a-z0-9]+$","examples":["cred-rvu37v4fylnbuznf"],"description":"ID of the previously-stored SMA credentials to use for this flow.\nThe referenced credentials must have `vendor=sma`.\n"}},"required":["vendor","credentialsID"],"additionalProperties":false},"SolarEdgeJoinConfig":{"title":"JoinConfigSolarEdge","properties":{"vendor":{"const":"solaredge","default":"solaredge","type":"string"}},"required":["vendor"],"additionalProperties":false},"SolisOAuthJoinConfig":{"title":"SolisOAuthJoinConfig","properties":{"vendor":{"const":"solis","default":"solis","type":"string"},"credentialsID":{"type":"string","pattern":"^cred-[a-z0-9]+$","examples":["cred-rvu37v4fylnbuznf"],"description":"ID of the previously-stored Solis OAuth credentials to use for this flow.\nThe referenced credentials must have `vendor=solis` and `type=oauthclient`.\n"}},"required":["vendor","credentialsID"],"additionalProperties":false},"TeslaJoinConfig":{"title":"TeslaJoinConfig","properties":{"vendor":{"const":"tesla","default":"tesla","type":"string"},"credentialsID":{"type":"string","pattern":"^cred-[a-z0-9]+$","examples":["cred-rvu37v4fylnbuznf"],"description":"ID of the previously-stored Tesla credentials to use for this flow.\nThe referenced credentials must have `vendor=tesla` and `type=app`.\n"}},"additionalProperties":false,"required":["vendor","credentialsID"]},"VirtualJoinConfig":{"title":"VirtualJoinConfig","properties":{"vendor":{"const":"virtual","default":"virtual","type":"string"}},"required":["vendor"],"additionalProperties":false},"VendorJoinConfig":{"title":"VendorJoinConfig","discriminator":{"propertyName":"vendor","mapping":{"enphase":"#/components/schemas/EnphaseJoinConfig","enphasevpp":"#/components/schemas/EnphaseVPPJoinConfig","sma":"#/components/schemas/SMAJoinConfig","solaredge":"#/components/schemas/SolarEdgeJoinConfig","solis":"#/components/schemas/SolisOAuthJoinConfig","tesla":"#/components/schemas/TeslaJoinConfig","virtual":"#/components/schemas/VirtualJoinConfig"}},"oneOf":[{"$ref":"#/components/schemas/EnphaseJoinConfig"},{"$ref":"#/components/schemas/EnphaseVPPJoinConfig"},{"$ref":"#/components/schemas/SMAJoinConfig"},{"$ref":"#/components/schemas/SolarEdgeJoinConfig"},{"$ref":"#/components/schemas/SolisOAuthJoinConfig"},{"$ref":"#/components/schemas/TeslaJoinConfig"},{"$ref":"#/components/schemas/VirtualJoinConfig"}]},"JoinFlowVendors":{"type":"array","description":"A list of the vendors that this Join flow should allow.\nEach vendor may require references to previously-stored credentials.\nA given vendor should appear at most once within this list.\n","items":{"$ref":"#/components/schemas/VendorJoinConfig"}},"JoinFlowRedirectUri":{"type":"string","format":"uri","description":"The URI to redirect the system owner to after they have completed an authorization for this flow.\n","examples":["https://myenergyprogram.com/auth/complete"]},"JoinFlowProgramID":{"type":"string","description":"The Derapi Program ID, if any, to enroll in upon successful authorization via this Flow.","pattern":"^prog-[a-z0-9]+$","examples":["prog-vbte2jglx43tudsj"]},"JoinFlow":{"title":"JoinFlow","properties":{"id":{"$ref":"#/components/schemas/JoinFlowID"},"vendors":{"$ref":"#/components/schemas/JoinFlowVendors"},"redirectURI":{"$ref":"#/components/schemas/JoinFlowRedirectUri"},"programID":{"$ref":"#/components/schemas/JoinFlowProgramID"}},"required":["id","vendors","redirectURI"],"additionalProperties":false},"ListJoinFlowsResponse":{"title":"ListJoinFlowsResponse","type":"object","properties":{"joinFlows":{"type":"array","items":{"$ref":"#/components/schemas/JoinFlow"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Join Flows available.","examples":[42]}},"required":["joinFlows","totalCount"],"additionalProperties":false},"CreateJoinFlowRequest":{"title":"CreateJoinFlowRequest","type":"object","properties":{"programID":{"$ref":"#/components/schemas/JoinFlowProgramID"},"vendors":{"$ref":"#/components/schemas/JoinFlowVendors"},"redirectURI":{"$ref":"#/components/schemas/JoinFlowRedirectUri"}},"required":["vendors","redirectURI"],"additionalProperties":false},"CreateJoinFlowResponse":{"title":"CreateJoinFlowResponse","properties":{"id":{"$ref":"#/components/schemas/JoinFlowID"},"vendors":{"$ref":"#/components/schemas/JoinFlowVendors"},"redirectURI":{"$ref":"#/components/schemas/JoinFlowRedirectUri"},"programID":{"$ref":"#/components/schemas/JoinFlowProgramID"}},"required":["id","vendors","redirectURI"],"additionalProperties":false},"GetJoinFlowResponse":{"title":"GetJoinFlowResponse","properties":{"id":{"$ref":"#/components/schemas/JoinFlowID"},"vendors":{"$ref":"#/components/schemas/JoinFlowVendors"},"redirectURI":{"$ref":"#/components/schemas/JoinFlowRedirectUri"},"programID":{"$ref":"#/components/schemas/JoinFlowProgramID"}},"required":["id","vendors","redirectURI"],"additionalProperties":false},"VirtualSite":{"title":"VirtualSite","type":"object","properties":{"id":{"$ref":"#/components/schemas/SiteID"},"vendor":{"$ref":"#/components/schemas/Vendor","description":"The vendor providing this Site"},"name":{"$ref":"#/components/schemas/SiteName"},"location":{"$ref":"#/components/schemas/SiteLocation"},"operationalSince":{"$ref":"#/components/schemas/SiteOperationalSince"},"bess":{"$ref":"#/components/schemas/SiteBESS"},"batteries":{"$ref":"#/components/schemas/SiteBatteries"},"chargers":{"$ref":"#/components/schemas/SiteChargers"},"solarInverters":{"$ref":"#/components/schemas/SiteSolarInverters"},"thermostats":{"$ref":"#/components/schemas/SiteThermostats"},"meter":{"$ref":"#/components/schemas/SiteMeter"}},"required":["id","vendor","name","batteries","chargers","solarInverters","thermostats"],"additionalProperties":false},"ListVirtualSitesResponse":{"title":"ListVirtualSitesResponse","type":"object","properties":{"virtualSites":{"type":"array","items":{"$ref":"#/components/schemas/VirtualSite"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Virtual Sites available.","examples":[42]}},"additionalProperties":false,"required":["virtualSites","totalCount"]},"CreateVirtualSiteRequest":{"title":"CreateVirtualSiteRequest","description":"Fields the user would like to provide. Omitted ones will be inferred.","properties":{"name":{"$ref":"#/components/schemas/SiteName"},"location":{"$ref":"#/components/schemas/SiteLocation"},"operationalSince":{"$ref":"#/components/schemas/SiteOperationalSince"},"bess":{"$ref":"#/components/schemas/SiteBESS"}},"additionalProperties":false},"CreateVirtualSiteResponse":{"title":"CreateVirtualSiteResponse","allOf":[{"$ref":"#/components/schemas/VirtualSite"}]},"GetVirtualSiteResponse":{"title":"GetVirtualSiteResponse","allOf":[{"$ref":"#/components/schemas/VirtualSite"}]},"VirtualBattery":{"title":"VirtualBattery","type":"object","properties":{"id":{"$ref":"#/components/schemas/BatteryID"},"vendor":{"$ref":"#/components/schemas/Vendor","description":"vendor providing this Battery"},"model":{"$ref":"#/components/schemas/BatteryModel"},"serialNumber":{"$ref":"#/components/schemas/BatterySerialNumber"},"name":{"$ref":"#/components/schemas/BatteryName"},"siteID":{"$ref":"#/components/schemas/BatterySiteID"},"nameplateKwh":{"$ref":"#/components/schemas/BatteryNameplateKwh"},"stateOfChargePercent":{"$ref":"#/components/schemas/BatteryStateOfChargePercent"},"recentErrors":{"$ref":"#/components/schemas/BatteryRecentErrors"}},"required":["id","vendor","model","serialNumber","siteID"],"additionalProperties":false},"ListVirtualBatteriesResponse":{"title":"ListVirtualBatteriesResponse","type":"object","properties":{"virtualBatteries":{"type":"array","items":{"$ref":"#/components/schemas/VirtualBattery"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Virtual Batteries available.","examples":[42]}},"additionalProperties":false,"required":["virtualBatteries","totalCount"]},"CreateVirtualBatteryRequest":{"title":"CreateVirtualBatteryRequest","description":"Fields the user would like to provide. Omitted ones will be inferred.","properties":{"name":{"$ref":"#/components/schemas/BatteryName"},"siteID":{"$ref":"#/components/schemas/BatterySiteID","description":"ID of an existing Virtual Site to which this Virtual Battery should be attached.\n\nIf not provided, a new Virtual Site will be created.\n"},"model":{"$ref":"#/components/schemas/BatteryModel"},"serialNumber":{"$ref":"#/components/schemas/BatterySerialNumber"},"nameplateKwh":{"$ref":"#/components/schemas/BatteryNameplateKwh"},"stateOfChargePercent":{"$ref":"#/components/schemas/BatteryStateOfChargePercent"}},"additionalProperties":false},"CreateVirtualBatteryResponse":{"title":"CreateVirtualBatteryResponse","allOf":[{"$ref":"#/components/schemas/VirtualBattery"}]},"TooManyVirtualResourcesProblem":{"title":"TooManyVirtualResourcesProblem","description":"A TooManyVirtualResourcesProblem is returned when a request exceeds the quota for virtual resources.\n\nRemedy it by reducing the number of virtual resources in the request or by checking the quota limits.\n\nSee also https://docs.derapi.com/docs/virtual-mode#quotas.\n","type":"object","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#too-many-virtual-resources","description":"A URI reference that identifies the problem type.","examples":["https://docs.derapi.com/reference/errors#too-many-virtual-resources"],"default":"https://docs.derapi.com/reference/errors#too-many-virtual-resources"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Too Many Virtual Resources","examples":["Too Many Virtual Resources"],"default":"Too Many Virtual Resources"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","examples":["Too many virtual sites -- maximum 100"]}},"required":["type","title","detail"],"additionalProperties":false},"GetVirtualBatteryResponse":{"title":"GetVirtualBatteryResponse","allOf":[{"$ref":"#/components/schemas/VirtualBattery"}]},"ChargerID":{"type":"string","description":"ID of the Charger. For multi-port systems, each port will be represented as a separate API object and have a unique ID.","examples":["chrg-ae02fl39bgdd8tmx"],"pattern":"^chrg-[a-z0-9]+$"},"ChargerVendor":{"title":"ChargerVendor","type":"string","enum":["chargepoint","virtual"],"examples":["chargepoint"]},"ChargerSerialNumber":{"type":"string","description":"Manufacturer serial number of the Charger","examples":["183341016451"]},"ChargerPortIdentifier":{"type":"string","description":"For multi-port systems, identifies the charging port","examples":["1"]},"ChargerModel":{"type":"string","description":"Model number of Charger","examples":["CT4020-HD"]},"ChargerName":{"type":"string","description":"Customer defined name of the Charger","examples":["Test Station"]},"ChargerStatus":{"title":"ChargerStatus","type":"string","description":"Status of the Charger","enum":["available","inuse","offline","unknown"],"examples":["available"],"x-enumDescriptions":{"available":"Charger is communicating and ready for use","inuse":"Vehicle is connected to port","offline":"Charger is having trouble connecting and reporting status","unknown":"Charger is in an unknown state"}},"ChargerSiteID":{"type":"string","description":"The Derapi Site ID this Charger is associated with","examples":["site-mitpus7brtdd36c2"]},"VirtualCharger":{"title":"VirtualCharger","type":"object","properties":{"id":{"$ref":"#/components/schemas/ChargerID"},"vendor":{"$ref":"#/components/schemas/ChargerVendor","description":"vendor providing this Charger"},"serialNumber":{"$ref":"#/components/schemas/ChargerSerialNumber"},"portIdentifier":{"$ref":"#/components/schemas/ChargerPortIdentifier"},"model":{"$ref":"#/components/schemas/ChargerModel"},"name":{"$ref":"#/components/schemas/ChargerName"},"status":{"$ref":"#/components/schemas/ChargerStatus"},"siteID":{"$ref":"#/components/schemas/ChargerSiteID"}},"required":["id","vendor","serialNumber","model","name","status","siteID"],"additionalProperties":false},"ListVirtualChargersResponse":{"title":"ListVirtualChargersResponse","type":"object","properties":{"virtualChargers":{"type":"array","items":{"$ref":"#/components/schemas/VirtualCharger"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Virtual Chargers available.","examples":[42]}},"additionalProperties":false,"required":["virtualChargers","totalCount"]},"CreateVirtualChargerRequest":{"title":"CreateVirtualChargerRequest","description":"Fields the user would like to provide. Omitted ones will be inferred.","properties":{"serialNumber":{"$ref":"#/components/schemas/ChargerSerialNumber"},"portIdentifier":{"$ref":"#/components/schemas/ChargerPortIdentifier"},"model":{"$ref":"#/components/schemas/ChargerModel"},"name":{"$ref":"#/components/schemas/ChargerName"},"status":{"$ref":"#/components/schemas/ChargerStatus"},"siteID":{"$ref":"#/components/schemas/ChargerSiteID","description":"ID of an existing Virtual Site to which this Virtual Charger should be attached.\n\nIf not provided, a new Virtual Site will be created.\n"}},"additionalProperties":false},"CreateVirtualChargerResponse":{"title":"CreateVirtualChargerResponse","allOf":[{"$ref":"#/components/schemas/VirtualCharger"}]},"GetVirtualChargerResponse":{"title":"GetVirtualChargerResponse","allOf":[{"$ref":"#/components/schemas/VirtualCharger"}]},"VirtualSolarInverter":{"title":"VirtualSolarInverter","type":"object","properties":{"id":{"$ref":"#/components/schemas/SolarInverterID"},"vendor":{"$ref":"#/components/schemas/Vendor","description":"vendor providing this Solar Inverter"},"model":{"$ref":"#/components/schemas/SolarInverterModel"},"serialNumber":{"$ref":"#/components/schemas/SolarInverterSerialNumber"},"name":{"$ref":"#/components/schemas/SolarInverterName"},"siteID":{"$ref":"#/components/schemas/SolarInverterSiteID"},"recentProduction":{"$ref":"#/components/schemas/SolarInverterRecentProduction"},"lifetimeProduction":{"$ref":"#/components/schemas/SolarInverterLifetimeProduction"},"recentErrors":{"$ref":"#/components/schemas/SolarInverterRecentErrors"}},"required":["id","vendor","model","serialNumber","siteID"],"additionalProperties":false},"ListVirtualSolarInvertersResponse":{"title":"ListVirtualSolarInvertersResponse","type":"object","properties":{"virtualSolarInverters":{"type":"array","items":{"$ref":"#/components/schemas/VirtualSolarInverter"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Virtual Solar Inverters available.","examples":[42]}},"required":["virtualSolarInverters","totalCount"],"additionalProperties":false},"CreateVirtualSolarInverterRequest":{"title":"CreateVirtualSolarInverterRequest","properties":{"siteID":{"$ref":"#/components/schemas/SolarInverterSiteID","description":"ID of an existing Virtual Site to which this Virtual Solar Inverter should be attached.\n\nIf not provided, a new Virtual Site will be created.\n"},"model":{"$ref":"#/components/schemas/SolarInverterModel"},"serialNumber":{"$ref":"#/components/schemas/SolarInverterSerialNumber"},"name":{"$ref":"#/components/schemas/SolarInverterName"},"recentProduction":{"$ref":"#/components/schemas/SolarInverterRecentProduction"},"lifetimeProduction":{"$ref":"#/components/schemas/SolarInverterLifetimeProduction"}},"additionalProperties":false},"CreateVirtualSolarInverterResponse":{"title":"CreateVirtualSolarInverterResponse","allOf":[{"$ref":"#/components/schemas/VirtualSolarInverter"}]},"GetVirtualSolarInverterResponse":{"title":"GetVirtualSolarInverterResponse","allOf":[{"$ref":"#/components/schemas/VirtualSolarInverter"}]},"ThermostatID":{"type":"string","description":"ID of the Thermostat.","examples":["tstat-ae02fl39bgdd8tmx"],"pattern":"^tstat-[a-z0-9]+$"},"ThermostatVendor":{"title":"ThermostatVendor","type":"string","enum":["virtual"],"examples":["virtual"]},"ThermostatSerialNumber":{"type":"string","description":"Manufacturer serial number of the Thermostat","examples":["123456789101"]},"ThermostatModel":{"type":"string","description":"Model number of Thermostat","examples":["Gen 1"]},"ThermostatName":{"type":"string","description":"Customer defined name of the Thermostat","examples":["Test Thermostat"]},"ThermostatAmbientF":{"type":"number","description":"Ambient temperature in Fahrenheit.","examples":[75.5]},"ThermostatCoolTargetF":{"type":"number","description":"Cool target / setpoint temperature in Fahrenheit.","examples":[78]},"ThermostatHeatTargetF":{"type":"number","description":"Heat target / setpoint temperature in Fahrenheit.","examples":[68]},"ThermostatMode":{"type":"string","description":"HVAC mode of the Thermostat.","examples":["heat"]},"ThermostatOperatingState":{"type":"string","description":"Whether the Thermostat is actively heating, cooling, or off.","examples":["off"]},"ThermostatFanMode":{"type":"string","description":"Fan mode of the Thermostat.","examples":["auto"]},"ThermostatSiteID":{"type":"string","description":"The Derapi Site ID this Thermostat is associated with","examples":["site-mitpus7brtdd36c2"]},"VirtualThermostat":{"title":"VirtualThermostat","type":"object","properties":{"id":{"$ref":"#/components/schemas/ThermostatID"},"vendor":{"$ref":"#/components/schemas/ThermostatVendor","description":"vendor providing this Thermostat"},"serialNumber":{"$ref":"#/components/schemas/ThermostatSerialNumber"},"model":{"$ref":"#/components/schemas/ThermostatModel"},"name":{"$ref":"#/components/schemas/ThermostatName"},"ambientF":{"$ref":"#/components/schemas/ThermostatAmbientF"},"coolTargetF":{"$ref":"#/components/schemas/ThermostatCoolTargetF"},"heatTargetF":{"$ref":"#/components/schemas/ThermostatHeatTargetF"},"mode":{"$ref":"#/components/schemas/ThermostatMode"},"operatingState":{"$ref":"#/components/schemas/ThermostatOperatingState"},"fanMode":{"$ref":"#/components/schemas/ThermostatFanMode"},"siteID":{"$ref":"#/components/schemas/ThermostatSiteID"}},"required":["id","vendor","serialNumber","model","name","ambientF","coolTargetF","heatTargetF","mode","operatingState","fanMode","siteID"],"additionalProperties":false},"ListVirtualThermostatsResponse":{"title":"ListVirtualThermostatsResponse","type":"object","properties":{"virtualThermostats":{"type":"array","items":{"$ref":"#/components/schemas/VirtualThermostat"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Virtual Thermostats available.","examples":[42]}},"additionalProperties":false,"required":["virtualThermostats","totalCount"]},"CreateVirtualThermostatRequest":{"title":"CreateVirtualThermostatRequest","description":"Fields the user would like to provide. Omitted ones will be inferred.","properties":{"serialNumber":{"$ref":"#/components/schemas/ThermostatSerialNumber"},"model":{"$ref":"#/components/schemas/ThermostatModel"},"name":{"$ref":"#/components/schemas/ThermostatName"},"ambientF":{"$ref":"#/components/schemas/ThermostatAmbientF"},"coolTargetF":{"$ref":"#/components/schemas/ThermostatCoolTargetF"},"heatTargetF":{"$ref":"#/components/schemas/ThermostatHeatTargetF"},"mode":{"$ref":"#/components/schemas/ThermostatMode"},"operatingState":{"$ref":"#/components/schemas/ThermostatOperatingState"},"fanMode":{"$ref":"#/components/schemas/ThermostatFanMode"},"siteID":{"$ref":"#/components/schemas/ThermostatSiteID","description":"ID of an existing Virtual Site to which this Virtual Thermostat should be attached.\n\nIf not provided, a new Virtual Site will be created.\n"}},"additionalProperties":false},"CreateVirtualThermostatResponse":{"title":"CreateVirtualThermostatResponse","allOf":[{"$ref":"#/components/schemas/VirtualThermostat"}]},"GetVirtualThermostatResponse":{"title":"GetVirtualThermostatResponse","allOf":[{"$ref":"#/components/schemas/VirtualThermostat"}]},"VirtualEnrollmentInitialApplicationState":{"title":"VirtualEnrollmentInitialApplicationState","type":"string","enum":["applied","preapplication"],"default":"applied","examples":["applied","preapplication"]},"CreateVirtualEnrollmentRequest":{"title":"CreateVirtualEnrollmentRequest","description":"Fields to create a virtual Enrollment. Based on Enrollment application data but without calculated fields.\n\n`initialApplicationState` controls how this Enrollment is created.\n\n-   if initialApplicationState is not provided, it will default to \"applied\".\n\n-   customer data can either be provided or will be inferred.\n\n-   if initialApplicationState is \"preapplication\", no system or customer data will be associated;\nany provided in the request will be ignored\n","type":"object","properties":{"programID":{"$ref":"#/components/schemas/ProgramID","description":"The program ID for this enrollment"},"appliedAt":{"type":"string","format":"date-time","description":"Date and time customer submitted their application in ISO-8601 format with timezone","example":"2025-01-01T13:50:00+00:00"},"utilityAccountNumber":{"$ref":"#/components/schemas/EnrollmentUtilityAccountNumber","description":"The utility account number associated with this application."},"customerAcceptedTerms":{"type":"boolean","description":"Whether the user accepted terms","example":true,"const":true,"default":true},"customer":{"description":"Information about customer whose application it is","$ref":"#/components/schemas/EnrollmentCustomer"},"address":{"description":"The address of the site in the application.","$ref":"#/components/schemas/EnrollmentAddress"},"additionalInfo":{"description":"Additional information about the latest application, which may be retrieved on later calls\nloading the Enrollment.\n\nMaximum of 50 keys. Keys are limited to 100 bytes, values to 250 bytes.\n","$ref":"#/components/schemas/EnrollmentAdditionalInfo"},"systemInfo":{"$ref":"#/components/schemas/EnrollmentSystem"},"siteID":{"$ref":"#/components/schemas/SiteID","description":"The enrolled site, if known; if not provided, one will be created."},"initialApplicationState":{"$ref":"#/components/schemas/VirtualEnrollmentInitialApplicationState"}},"additionalProperties":false,"required":["programID"]},"VirtualEnrollment":{"title":"VirtualEnrollment","type":"object","properties":{"id":{"$ref":"#/components/schemas/EnrollmentID"},"programID":{"$ref":"#/components/schemas/ProgramID"},"vendor":{"$ref":"#/components/schemas/Vendor","description":"The vendor providing this Enrollment (always \"virtual\" for virtual enrollments)"},"siteID":{"$ref":"#/components/schemas/SiteID","description":"The enrolled site, if known"},"systemInfo":{"$ref":"#/components/schemas/EnrollmentSystem","description":"Information about the enrolled system, inferred from the latest application."},"customer":{"$ref":"#/components/schemas/EnrollmentCustomer"},"address":{"$ref":"#/components/schemas/EnrollmentAddress"},"additionalInfo":{"description":"Additional information about the latest application.","$ref":"#/components/schemas/EnrollmentAdditionalInfo"},"utilityAccountNumber":{"$ref":"#/components/schemas/EnrollmentUtilityAccountNumber"},"tags":{"$ref":"#/components/schemas/Tags"},"initialApplicationState":{"$ref":"#/components/schemas/VirtualEnrollmentInitialApplicationState"}},"additionalProperties":false,"required":["id","programID","vendor","additionalInfo","tags","initialApplicationState"]},"CreateVirtualEnrollmentResponse":{"title":"CreateVirtualEnrollmentResponse","allOf":[{"$ref":"#/components/schemas/VirtualEnrollment"}]},"SubmitPairingCodeVirtualRequest":{"title":"SubmitPairingCodeVirtualRequest","type":"object","description":"Submit a pairing code to match a virtual Enrollment.","properties":{"pairingCode":{"type":"string","description":"The pairing code to submit","example":"ABCD-1234"},"programID":{"$ref":"#/components/schemas/ProgramID","description":"The ID of the program in the Derapi system"}},"required":["pairingCode","programID"],"additionalProperties":false},"SubmitPairingCodeVirtualResponse":{"title":"SubmitPairingCodeVirtualResponse","type":"object","description":"Response from submitting a pairing code for a virtual Enrollment.","properties":{"matched":{"type":"boolean","description":"Whether the pairing code matched an existing Enrollment","example":true},"enrollmentID":{"$ref":"#/components/schemas/EnrollmentID","description":"The ID of the matched Enrollment, if any"},"enrollmentStatus":{"$ref":"#/components/schemas/EnrollmentStatus","description":"The status of the matched Enrollment, if any"}},"required":["matched"],"additionalProperties":false},"ControlEventID":{"type":"string","examples":["ctrl-vbte2jglx43tudsj"],"pattern":"^ctrl-[a-z0-9]+$","description":"Control Event ID"},"ControlEventType":{"title":"ControlEventType","type":"string","enum":["batterysystem","thermostats"],"examples":["batterysystem"]},"BatteryCommand":{"title":"BatteryCommand","type":"string","description":"discharge, charge, or idle","default":"discharge","enum":["discharge","charge","idle"],"examples":["discharge"]},"BatteryPowerKw":{"type":"number","description":"`charge` or `discharge` rate, in kilowatts.\n\nEither this setting (`powerKw`) or `powerPercent` must be set if the command is `charge` or `discharge`; for `idle`, it must be absent.\n\nThis value will apply individually to every Site included in the control event.\nFor example: if 5 Sites are targeted, with a powerKw value of 5.0 kW, each will be\nsent a control command for charge or discharge of 5.0 kW.\n","examples":[1.7]},"BatteryPowerPercent":{"type":"number","description":"`charge` or `discharge` rate, as a percentage of the maximum charge or discharge rate supported for each targeted Site.\n\nEither this setting (`powerPercent`) or `powerKw` must be set for `charge` or `discharge`; for `idle`, it must be absent.\n","minimum":0,"maximum":100,"examples":[50]},"ControlEventStart":{"title":"ControlEventStart","type":"string","description":"Event start time in ISO-8601 format","format":"date-time","examples":["2025-07-01T16:00:00+00:00"]},"ControlEventEnd":{"title":"ControlEventEnd","type":"string","description":"Event end time in ISO-8601 format","format":"date-time","examples":["2025-07-01T19:00:00+00:00"]},"ControlEventTargetProgram":{"title":"ControlEventTargetProgram","description":"A target which targets all Sites with active Enrollments in the given Program.\n","type":"object","properties":{"type":{"type":"string","const":"program","examples":["program"],"default":"program"},"programID":{"type":"string","description":"Derapi Program ID","examples":["program-2oeifj20934"]}},"required":["type","programID"],"examples":[{"type":"program","programID":"program-dkflj19348"}],"additionalProperties":false},"ControlEventTargetSite":{"title":"ControlEventTargetSite","description":"A target which targets a single, specific Site.","type":"object","properties":{"type":{"type":"string","const":"site","examples":["site"],"default":"site"},"siteID":{"type":"string","description":"Derapi Site ID","examples":["site-2oeifj20934"]}},"required":["type","siteID"],"examples":[{"type":"site","siteID":"site-dkflj19348"}],"additionalProperties":false},"ControlEventTargetSiteTags":{"type":"object","title":"ControlEventTargetSiteTags","description":"A dynamic target that targets all matching Sites based on their tags.\n","properties":{"type":{"const":"sitetags","default":"sitetags","type":"string"},"tags":{"$ref":"#/components/schemas/Tags","description":"A set of tag key/value pairs that Sites must have in order to be targeted.\nAt least one tag is required.\n\nKey/value pairs in this object are logically `AND`ed together - that is, a given Site must\nhave *all* of the tags in the list in order to match.\n"}},"additionalProperties":false,"required":["type","tags"]},"ControlEventTargetAllSites":{"title":"ControlEventTargetAllSites","description":"A target which targets all dispatchable Sites\n","type":"object","properties":{"type":{"type":"string","const":"allsites","examples":["allsites"],"default":"allsites"}},"required":["type"],"additionalProperties":false},"ControlEventTarget":{"title":"ControlEventTarget","oneOf":[{"$ref":"#/components/schemas/ControlEventTargetProgram"},{"$ref":"#/components/schemas/ControlEventTargetSite"},{"$ref":"#/components/schemas/ControlEventTargetSiteTags"},{"$ref":"#/components/schemas/ControlEventTargetAllSites"}],"discriminator":{"propertyName":"type","mapping":{"program":"#/components/schemas/ControlEventTargetProgram","site":"#/components/schemas/ControlEventTargetSite","sitetags":"#/components/schemas/ControlEventTargetSiteTags","allsites":"#/components/schemas/ControlEventTargetAllSites"}}},"ControlEventStatus":{"title":"ControlEventStatus","description":"The current status of the control event. This is a high-level summary status across all targeted Sites.\n\nTo see more details about the status of each targeted Site, see the `sitesByStatus` property of the Control Event details response,\nor the 'Get Control Event Sites' endpoint.\n","type":"string","enum":["pending","inprogress","completed","failed","canceling","canceled","nosites"],"examples":["pending","inprogress"],"x-enumDescriptions":{"pending":"The event start time has not yet arrived.","inprogress":"The event was dispatched to at least one target successfully, and the event start time has elapsed.","completed":"The event was dispatched to at least one target successfully, and the event end time has passed.","failed":"Dispatching the event to all targets failed.","canceling":"Derapi is in the process of canceling the event.","canceled":"The event has been canceled.","nosites":"No sites matched the event's targeting criteria, so nothing was dispatched."}},"BatteryControlEventSummary":{"title":"BatteryControlEventSummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/ControlEventID"},"type":{"$ref":"#/components/schemas/ControlEventType"},"command":{"$ref":"#/components/schemas/BatteryCommand"},"powerKw":{"$ref":"#/components/schemas/BatteryPowerKw"},"powerPercent":{"$ref":"#/components/schemas/BatteryPowerPercent"},"start":{"$ref":"#/components/schemas/ControlEventStart"},"end":{"$ref":"#/components/schemas/ControlEventEnd"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ControlEventTarget"}},"eventStatus":{"$ref":"#/components/schemas/ControlEventStatus"},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"example":{"id":"ctrl-asdlkfj3498","type":"batterysystem","command":"discharge","powerPercent":100,"start":"2025-07-01T17:00:00+00:00","end":"2025-07-01T19:00:00+00:00","eventStatus":"pending","targets":[{"type":"vendorprogram","vendor":"enphasevpp","programID":"an enphase vpp program name"},{"type":"site","siteID":"site-dfj02i43fj4"}],"vendorParameters":[],"tags":{}},"required":["id","type","command","start","end","targets","eventStatus","vendorParameters","tags"]},"ThermostatCommand":{"title":"ThermostatCommand","type":"string","description":"cooloffset or heatoffset","default":"cooloffset","enum":["cooloffset","heatoffset"],"examples":["cooloffset"]},"ThermostatOffsetDegreesF":{"type":"number","description":"Cool or heat target offset, in degrees Fahrenheit.\n","minimum":0,"maximum":10,"default":4,"examples":[4]},"ThermostatControlEventSummary":{"title":"ThermostatControlEventSummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/ControlEventID"},"type":{"$ref":"#/components/schemas/ControlEventType"},"command":{"$ref":"#/components/schemas/ThermostatCommand"},"offsetDegreesF":{"$ref":"#/components/schemas/ThermostatOffsetDegreesF"},"start":{"$ref":"#/components/schemas/ControlEventStart"},"end":{"$ref":"#/components/schemas/ControlEventEnd"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ControlEventTarget"}},"eventStatus":{"$ref":"#/components/schemas/ControlEventStatus"},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"example":{"id":"ctrl-asdlkfj3498","type":"thermostats","command":"cooloffset","offsetDegreesF":2,"start":"2025-07-01T17:00:00+00:00","end":"2025-07-01T19:00:00+00:00","eventStatus":"pending","targets":[{"type":"site","siteID":"site-dfj02i43fj4"}],"tags":{}},"required":["id","type","command","start","end","targets","eventStatus","tags"]},"ControlEventSummary":{"title":"ControlEventSummary","discriminator":{"propertyName":"type","mapping":{"batterysystem":"#/components/schemas/BatteryControlEventSummary","thermostats":"#/components/schemas/ThermostatControlEventSummary"}},"oneOf":[{"$ref":"#/components/schemas/BatteryControlEventSummary"},{"$ref":"#/components/schemas/ThermostatControlEventSummary"}],"description":"Summary information about a control event"},"ListControlEventsResponse":{"title":"ListControlEventsResponse","type":"object","properties":{"controlEvents":{"type":"array","items":{"$ref":"#/components/schemas/ControlEventSummary"}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Control Events available.","examples":[42]}},"required":["controlEvents","totalCount"],"additionalProperties":false},"EnphaseVPPBatteryChargePriority":{"title":"EnphaseVPPBatteryChargePriority","type":"string","description":"For a charge event defaults to `solar` if not specified. Not supported for discharge or idle events.","enum":["solar","load"],"examples":["solar"],"x-enumDescriptions":{"solar":"use solar production to charge the Battery first","load":"use solar production to meet Site loads first, whatever is left charges the Battery"}},"EnphaseVPPBatteryDischargePriority":{"title":"EnphaseVPPBatteryDischargePriority","type":"string","description":"For a discharge event defaults to `battery` if not specified. Not supported for charge or idle events.","enum":["battery","solar"],"examples":["battery"],"x-enumDescriptions":{"battery":"use Battery discharge to meet Site loads first, then if allowed export to grid","solar":"use solar production to meet Site loads first, then if needed Battery is used"}},"EnphaseVPPBatteryAllowGridExport":{"type":"boolean","description":"Can the Battery export to the grid while discharging.\nFor a discharge event, defaults to `false` if not specified.\nNot supported for charge or idle events.\n","examples":[false]},"EnphaseVPPBatteryAllowGridCharging":{"type":"boolean","description":"Can the Battery import from the grid while charging.\nFor a charge event, defaults to `false` if not specified.\nNot supported for discharge or idle events.\n","examples":[false]},"EnphaseVPPStateOfChargeLimitPercent":{"type":"number","description":"The minimum/maximum state of charge, expressed as a percentage, that the Battery should charge/discharge to.\n\nDefaults to a minimum of 20 when discharging and a maximum of 100 when charging.\n","examples":[10],"minimum":0,"maximum":100},"EnphaseVPPBatteryControlEventParameters":{"title":"EnphaseVPPBatteryControlEventParameters","type":"object","description":"Enphase VPP specific control event parameters for Battery systems. When specifying Enphase\nVPP Vendor Parameters be sure to supply **all** settings for the selected command (`charge`, `discharge`).\n- For `charge` events supply `chargePriority` and `allowGridCharging`.\n- For `discharge` events supply `dischargePriority` and `allowGridExport`.\n- For `idle` events no vendor parameters are applicable.\n","properties":{"vendor":{"type":"string","const":"enphasevpp","description":"The vendor name for the Battery control event.","example":"enphasevpp","default":"enphasevpp"},"chargePriority":{"$ref":"#/components/schemas/EnphaseVPPBatteryChargePriority"},"dischargePriority":{"$ref":"#/components/schemas/EnphaseVPPBatteryDischargePriority"},"allowGridExport":{"$ref":"#/components/schemas/EnphaseVPPBatteryAllowGridExport"},"allowGridCharging":{"$ref":"#/components/schemas/EnphaseVPPBatteryAllowGridCharging"},"stateOfChargeLimitPercent":{"$ref":"#/components/schemas/EnphaseVPPStateOfChargeLimitPercent"}},"required":["vendor"],"additionalProperties":false},"FranklinWHStateOfChargeLimitPercent":{"type":"number","description":"The minimum/maximum state of charge, expressed as a percentage, that the Battery should charge/discharge to.\nRequired for charge and discharge events, disallowed for idle.\n","examples":[10],"minimum":0,"maximum":100},"FranklinWHBatteryAllowGridExport":{"type":"boolean","description":"Whether to allow the Battery export to the grid.\nRequired for both discharge and charge events, disallowed for idle.\n\nFor discharge events, the only supported value is `true` (that is, export is always allowed).\n\nDuring a charge event, grid export may be performed if this flag is true, and\nthe Battery is fully charged and solar generation exceeds the Site load.\n","examples":[false]},"FranklinWHBatteryAllowGridCharging":{"type":"string","title":"FranklinWHBatteryAllowGridCharging","enum":["systemsettings","allowed","disallowed"],"x-enumDescriptions":{"systemsettings":"The target system's settings will determine grid charging behavior. System settings may be set by the\nsystem owner in the FranklinWH app.\n","allowed":"Allow charging the Battery from the grid.","disallowed":"Disallow charging the Battery from the grid.\n\nNote that this value will cause the event to begin immediately on FranklinWH devices,\ndisregarding the start time included on the event.\n"},"description":"Can the Battery import from the grid while charging.\nRequired for charge events, disallowed for discharge and idle.\n","examples":["allowed"]},"FranklinWHBatteryControlEventParameters":{"title":"FranklinWHBatteryControlEventParameters","type":"object","description":"FranklinWH specific control event parameters for Battery systems.\n","properties":{"vendor":{"type":"string","const":"franklinwh","description":"The vendor name for the Battery control event.","example":"franklinwh","default":"franklinwh"},"stateOfChargeLimitPercent":{"$ref":"#/components/schemas/FranklinWHStateOfChargeLimitPercent"},"allowGridExport":{"$ref":"#/components/schemas/FranklinWHBatteryAllowGridExport"},"allowGridCharging":{"$ref":"#/components/schemas/FranklinWHBatteryAllowGridCharging"}},"required":["vendor"],"additionalProperties":false},"SolisStateOfChargeLimitPercent":{"type":"number","description":"The minimum/maximum state of charge, expressed as a percentage, that the Battery should charge/discharge to.\n\nDefaults to a minimum of 20 when discharging and a maximum of 100 when charging.\n","examples":[10],"minimum":0,"maximum":100},"SolisBatteryControlEventParameters":{"title":"SolisBatteryControlEventParameters","type":"object","description":"Solis specific control event parameters for Battery systems.\n","properties":{"vendor":{"type":"string","const":"solis","description":"The vendor name for the Battery control event.","example":"solis","default":"solis"},"stateOfChargeLimitPercent":{"$ref":"#/components/schemas/SolisStateOfChargeLimitPercent"}},"required":["vendor","stateOfChargeLimitPercent"],"additionalProperties":false},"EG4StateOfChargeLimitPercent":{"type":"number","description":"The minimum/maximum state of charge, expressed as a percentage, that the Battery should charge/discharge to.\n\nDefaults to a minimum of 20 when discharging and a maximum of 100 when charging.\n","examples":[10],"minimum":0,"maximum":100},"EG4BatteryControlEventParameters":{"title":"EG4BatteryControlEventParameters","type":"object","description":"EG4 specific control event parameters for Battery systems.\n","properties":{"vendor":{"type":"string","const":"eg4","description":"The vendor name for the Battery control event.","example":"eg4","default":"eg4"},"stateOfChargeLimitPercent":{"$ref":"#/components/schemas/EG4StateOfChargeLimitPercent"}},"required":["vendor","stateOfChargeLimitPercent"],"additionalProperties":false},"BatteryControlEventVendorParameters":{"title":"BatteryControlEventVendorParameters","discriminator":{"propertyName":"vendor","mapping":{"enphasevpp":"#/components/schemas/EnphaseVPPBatteryControlEventParameters","franklinwh":"#/components/schemas/FranklinWHBatteryControlEventParameters","solis":"#/components/schemas/SolisBatteryControlEventParameters","eg4":"#/components/schemas/EG4BatteryControlEventParameters"}},"oneOf":[{"$ref":"#/components/schemas/EnphaseVPPBatteryControlEventParameters"},{"$ref":"#/components/schemas/FranklinWHBatteryControlEventParameters"},{"$ref":"#/components/schemas/SolisBatteryControlEventParameters"},{"$ref":"#/components/schemas/EG4BatteryControlEventParameters"}]},"CreateBatteryControlEventRequest":{"title":"CreateBatteryControlEventRequest","type":"object","properties":{"type":{"$ref":"#/components/schemas/ControlEventType"},"command":{"$ref":"#/components/schemas/BatteryCommand"},"powerKw":{"$ref":"#/components/schemas/BatteryPowerKw"},"powerPercent":{"$ref":"#/components/schemas/BatteryPowerPercent"},"start":{"type":"string","description":"Interval start in ISO-8601 format","format":"date-time","examples":["2025-07-01T16:00:00+00:00"]},"end":{"type":"string","description":"Interval end in ISO-8601 format","format":"date-time","examples":["2025-07-01T19:00:00+00:00"]},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ControlEventTarget"},"minItems":1},"vendorParameters":{"type":"array","items":{"$ref":"#/components/schemas/BatteryControlEventVendorParameters"}},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"example":{"type":"batterysystem","command":"discharge","start":"2025-07-01T19:00:10+00:00","end":"2025-07-01T19:00:30+00:00","targets":[{"type":"vendorprogram","vendor":"enphasevpp","programID":"an enphase vpp program name"},{"type":"site","siteID":"site-dfj02i43fj4"}]},"required":["type","command","start","end","targets"]},"CreateThermostatControlEventRequest":{"title":"CreateThermostatControlEventRequest","type":"object","properties":{"type":{"$ref":"#/components/schemas/ControlEventType"},"command":{"$ref":"#/components/schemas/ThermostatCommand"},"offsetDegreesF":{"$ref":"#/components/schemas/ThermostatOffsetDegreesF"},"start":{"type":"string","description":"Interval start in ISO-8601 format","format":"date-time","examples":["2025-07-01T16:00:00+00:00"]},"end":{"type":"string","description":"Interval end in ISO-8601 format","format":"date-time","examples":["2025-07-01T19:00:00+00:00"]},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ControlEventTarget"},"minItems":1},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"example":{"type":"thermostats","command":"cooloffset","offsetDegreesF":2,"start":"2025-07-01T19:00:10+00:00","end":"2025-07-01T19:00:30+00:00","targets":[{"type":"site","siteID":"site-dfj02i43fj4"}]},"required":["type","command","start","end","targets"]},"CreateControlEventRequest":{"title":"CreateControlEventRequest","oneOf":[{"$ref":"#/components/schemas/CreateBatteryControlEventRequest"},{"$ref":"#/components/schemas/CreateThermostatControlEventRequest"}],"discriminator":{"propertyName":"type","mapping":{"batterysystem":"#/components/schemas/CreateBatteryControlEventRequest","thermostats":"#/components/schemas/CreateThermostatControlEventRequest"}},"description":"Describes a control event"},"CreateControlEventResponse":{"title":"CreateControlEventResponse","allOf":[{"$ref":"#/components/schemas/ControlEventSummary"}]},"ConflictingEventsProblem":{"type":"object","title":"ConflictingEventsProblem","description":"A ConflictingEventsProblem is returned when a request cannot be processed\ndue to conflicting control events. It contains a list of conflicting event IDs.\n\nRemedy it by canceling the listed conflicting events, or adjusting the start and end times of the submitted event to avoid the conflicts.\n","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#conflicting-events","description":"A URI reference that identifies the problem type.","example":"https://docs.derapi.com/reference/errors#conflicting-events","default":"https://docs.derapi.com/reference/errors#conflicting-events"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Conflicting events","example":"Conflicting events","default":"Conflicting events"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","example":"The requested control event conflicts with existing events."},"conflictingEventIDs":{"type":"array","items":{"type":"string"},"description":"A list of conflicting control event IDs","example":["ctrl-1234","ctrl-5678"]}},"required":["type","title","detail","conflictingEventIDs"],"additionalProperties":false},"ControlEventSiteStatus":{"title":"ControlEventSiteStatus","description":"Summarizes the state of a Site's participation in a control event.","type":"string","enum":["pending","delivered","inprogress","completed","optedout","canceling","canceled","finalizing","failed","stormoverridden"],"example":"pending","x-enumDescriptions":{"pending":"The event is scheduled, but has not yet been delivered to the vendor API.","delivered":"The event was successfully delivered to the vendor API, delivery to the device has not yet been confirmed.","inprogress":"The event is currently in progress. Note that Sites may only be counted here if the start time has elapsed.","completed":"The event has fully completed. Note that Sites may only be counted here if the end time has elapsed.","optedout":"The Site opted out of the event.","canceling":"The event is in the process of being canceled with the vendor API.","canceled":"The event was successfully canceled with the vendor API.","finalizing":"The event is in the process of being finalized with the vendor API, for APIs requiring an explicit finalization step.","failed":"The event either was not successfully delivered to the vendor API before the start, or was delivered to the vendor API, but not started by the device, or cancellation was requested but not completed before the event end time.","stormoverridden":"The event was completely overridden due to a storm mode condition on the Battery system. Some vendors permit events to be partially overridden; this status only applies when the entire event is overridden."}},"ControlEventSiteGroup":{"title":"ControlEventSiteGroup","type":"object","properties":{"status":{"$ref":"#/components/schemas/ControlEventSiteStatus"},"count":{"type":"integer","description":"The number of Sites targeted by this event which have this status for the event.","minimum":0,"example":5}},"additionalProperties":false,"required":["status","count"]},"BatteryControlEventDetails":{"title":"BatteryControlEventDetails","type":"object","properties":{"id":{"$ref":"#/components/schemas/ControlEventID"},"type":{"$ref":"#/components/schemas/ControlEventType"},"command":{"$ref":"#/components/schemas/BatteryCommand"},"powerKw":{"$ref":"#/components/schemas/BatteryPowerKw"},"powerPercent":{"$ref":"#/components/schemas/BatteryPowerPercent"},"start":{"$ref":"#/components/schemas/ControlEventStart"},"end":{"$ref":"#/components/schemas/ControlEventEnd"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ControlEventTarget"}},"eventStatus":{"$ref":"#/components/schemas/ControlEventStatus"},"sitesByStatus":{"description":"A breakdown of the Sites targeted by this event, grouped by their current status with respect to this event.\nNote that this field may not be populated until the event is delivered to the vendor API in some cases.\n","type":"array","items":{"$ref":"#/components/schemas/ControlEventSiteGroup"}},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"example":{"id":"ctrl-asdlkfj3498","type":"batterysystem","command":"discharge","powerPercent":100,"start":"2025-07-01T17:00:00+00:00","end":"2025-07-01T19:00:00+00:00","eventStatus":"pending","targets":[{"type":"vendorprogram","vendor":"enphasevpp","programID":"an enphase vpp program name"},{"type":"site","siteID":"site-dfj02i43fj4"}],"vendorParameters":[{"vendor":"enphasevpp","dischargePriority":"battery","allowGridExport":true,"stateOfChargeLimitPercent":20}],"tags":{}},"required":["id","type","command","start","end","targets","eventStatus","vendorParameters","tags"]},"ThermostatControlEventDetails":{"title":"ThermostatControlEventDetails","type":"object","properties":{"id":{"$ref":"#/components/schemas/ControlEventID"},"type":{"$ref":"#/components/schemas/ControlEventType"},"command":{"$ref":"#/components/schemas/ThermostatCommand"},"offsetDegreesF":{"$ref":"#/components/schemas/ThermostatOffsetDegreesF"},"start":{"$ref":"#/components/schemas/ControlEventStart"},"end":{"$ref":"#/components/schemas/ControlEventEnd"},"targets":{"type":"array","items":{"$ref":"#/components/schemas/ControlEventTarget"}},"eventStatus":{"$ref":"#/components/schemas/ControlEventStatus"},"sitesByStatus":{"description":"A breakdown of the Sites targeted by this event, grouped by their current status with respect to this event.\nNote that this field may not be populated until the event is delivered to the vendor API in some cases.\n","type":"array","items":{"$ref":"#/components/schemas/ControlEventSiteGroup"}},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"example":{"id":"ctrl-asdlkfj3498","type":"thermostats","command":"cooloffset","offsetDegreesF":2,"start":"2025-07-01T17:00:00+00:00","end":"2025-07-01T19:00:00+00:00","eventStatus":"pending","targets":[{"type":"site","siteID":"site-dfj02i43fj4"}],"tags":{}},"required":["id","type","command","start","end","targets","eventStatus","tags"]},"ControlEventDetails":{"title":"ControlEventDetails","discriminator":{"propertyName":"type","mapping":{"batterysystem":"#/components/schemas/BatteryControlEventDetails","thermostats":"#/components/schemas/ThermostatControlEventDetails"}},"oneOf":[{"$ref":"#/components/schemas/BatteryControlEventDetails"},{"$ref":"#/components/schemas/ThermostatControlEventDetails"}],"description":"Detailed information about a control event"},"GetControlEventResponse":{"title":"GetControlEventResponse","allOf":[{"$ref":"#/components/schemas/ControlEventDetails"}]},"InvalidEventStatusProblem":{"title":"InvalidEventStatusProblem","type":"object","description":"An InvalidEventStatusProblem is returned when a control event has an invalid status\nfor the requested operation. It contains details about the conflicting status.\n\nRemedy it by ensuring the control event is in a valid state for the requested operation.\n","properties":{"type":{"type":"string","format":"uri-reference","const":"https://docs.derapi.com/reference/errors#invalid-event-status","description":"A URI reference that identifies the problem type.","examples":["https://docs.derapi.com/reference/errors#invalid-event-status"],"default":"https://docs.derapi.com/reference/errors#invalid-event-status"},"title":{"type":"string","description":"A short, human-readable summary of the problem type.","const":"Invalid Event Status","examples":["Invalid Event Status"],"default":"Invalid Event Status"},"detail":{"type":"string","description":"A human-readable explanation specific to this occurrence of the problem.","examples":["The control event has an invalid status for the requested operation"]},"status":{"type":"string","description":"The conflicting status","examples":["ended"]}},"required":["type","title","detail","status"],"additionalProperties":false},"ControlEventSiteSummary":{"title":"ControlEventSiteSummary","description":"A summary of the status of a control event for a single Site.","type":"object","properties":{"siteID":{"$ref":"#/components/schemas/SiteID"},"vendor":{"description":"The vendor of the Site.","$ref":"#/components/schemas/Vendor"},"status":{"description":"The status of this event for this Site.","$ref":"#/components/schemas/ControlEventSiteStatus"}},"required":["siteID","vendor","status"],"additionalProperties":false},"GetControlEventSitesResponse":{"title":"GetControlEventSitesResponse","description":"Describes Site-level status of a control event","properties":{"type":{"$ref":"#/components/schemas/ControlEventType"},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"sites":{"type":"array","description":"Paginated list of Sites targeted by this control event.","items":{"$ref":"#/components/schemas/ControlEventSiteSummary"}}},"required":["type","sites"]},"ControlEventHistoryEventCreated":{"title":"ControlEventHistoryEventCreated","description":"The control event was created via the Derapi API.","properties":{"type":{"const":"created","default":"created","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]}},"required":["type","at"],"additionalProperties":false},"ControlEventHistoryEventDeliveryAttempted":{"title":"ControlEventHistoryEventDeliveryAttempted","description":"Derapi attempted delivery of the control event to the vendor API.","properties":{"type":{"const":"deliveryattempted","default":"deliveryattempted","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"success":{"type":"boolean","description":"Indicates whether the delivery attempt to the vendor API was successful.","example":true}},"required":["type","at","success"],"additionalProperties":false},"ControlEventHistoryEventAcknowledged":{"title":"ControlEventHistoryEventAcknowledged","description":"The vendor API has reported positive acknowledgement of the control event to the device at this Site.\nNote that not all vendors support reporting on device acknowledgement status, so absence of this entry does not necessarily imply a failure to deliver to the targeted device.\n","properties":{"type":{"const":"acknowledged","default":"acknowledged","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]}},"required":["type","at"],"additionalProperties":false},"ControlEventHistoryEventCancellationRequested":{"title":"ControlEventHistoryEventCancellationRequested","description":"Cancellation of the parent control event was requested via the Derapi API.","properties":{"type":{"const":"cancellationrequested","default":"cancellationrequested","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]}},"required":["type","at"],"additionalProperties":false},"ControlEventHistoryEventCancellationAttempted":{"title":"ControlEventHistoryEventCancellationAttempted","description":"Derapi attempted to cancel the this control event for this Site via the vendor API.","properties":{"type":{"const":"cancellationattempted","default":"cancellationattempted","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"success":{"description":"Indicates whether the cancellation attempt was successful.","type":"boolean","example":true}},"required":["type","at","success"],"additionalProperties":false},"ControlEventHistoryEventOptedOut":{"title":"ControlEventHistoryEventOptedOut","description":"The Site owner opted out of the control event.","properties":{"type":{"const":"optedout","default":"optedout","type":"string"},"at":{"type":"string","format":"date-time","description":"The time at which the opt-out became known to Derapi.\nNote that this may differ from the exact timing of when the opt-out was triggered by the Site owner.\n","examples":["2025-07-01T12:00:00Z"]}},"required":["type","at"],"additionalProperties":false},"ControlEventHistoryEventStarted":{"title":"ControlEventHistoryEventStarted","description":"The Site began executing the control event.","properties":{"type":{"const":"started","default":"started","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]}},"required":["type","at"],"additionalProperties":false},"ControlEventHistoryEventEnded":{"title":"ControlEventHistoryEventEnded","description":"The Site's participation in the control event ended.\n","properties":{"type":{"const":"ended","default":"ended","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]},"reason":{"type":"string","title":"ControlEventEndedReason","description":"The reason for the end of the Site's participation in the event.","enum":["completed","canceled","optedout"],"example":"completed"}},"required":["type","at","reason"],"additionalProperties":false},"ControlEventHistoryEventStormOverrideStarted":{"title":"ControlEventHistoryEventStormOverrideStarted","description":"A storm override began overriding the behavior of this control event.\nThis event is only applicable to `batterysystem` control events.\n","properties":{"type":{"const":"stormoverridestarted","default":"stormoverridestarted","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]}},"required":["type","at"],"additionalProperties":false},"ControlEventHistoryEventStormOverrideEnded":{"title":"ControlEventHistoryEventStormOverrideEnded","description":"Storm override for this control event has ended, permitting normal control event behavior to resume.\nThis event is only applicable to `batterysystem` control events.\n","properties":{"type":{"const":"stormoverrideended","default":"stormoverrideended","type":"string"},"at":{"type":"string","format":"date-time","examples":["2025-07-01T12:00:00Z"]}},"required":["type","at"],"additionalProperties":false},"ControlEventHistoryEvent":{"title":"ControlEventHistoryEvent","discriminator":{"propertyName":"type","mapping":{"created":"#/components/schemas/ControlEventHistoryEventCreated","deliveryattempted":"#/components/schemas/ControlEventHistoryEventDeliveryAttempted","acknowledged":"#/components/schemas/ControlEventHistoryEventAcknowledged","cancellationrequested":"#/components/schemas/ControlEventHistoryEventCancellationRequested","cancellationattempted":"#/components/schemas/ControlEventHistoryEventCancellationAttempted","optedout":"#/components/schemas/ControlEventHistoryEventOptedOut","started":"#/components/schemas/ControlEventHistoryEventStarted","ended":"#/components/schemas/ControlEventHistoryEventEnded","stormoverridestarted":"#/components/schemas/ControlEventHistoryEventStormOverrideStarted","stormoverrideended":"#/components/schemas/ControlEventHistoryEventStormOverrideEnded"}},"oneOf":[{"$ref":"#/components/schemas/ControlEventHistoryEventCreated"},{"$ref":"#/components/schemas/ControlEventHistoryEventDeliveryAttempted"},{"$ref":"#/components/schemas/ControlEventHistoryEventAcknowledged"},{"$ref":"#/components/schemas/ControlEventHistoryEventCancellationRequested"},{"$ref":"#/components/schemas/ControlEventHistoryEventCancellationAttempted"},{"$ref":"#/components/schemas/ControlEventHistoryEventOptedOut"},{"$ref":"#/components/schemas/ControlEventHistoryEventStarted"},{"$ref":"#/components/schemas/ControlEventHistoryEventEnded"},{"$ref":"#/components/schemas/ControlEventHistoryEventStormOverrideStarted"},{"$ref":"#/components/schemas/ControlEventHistoryEventStormOverrideEnded"}]},"GetControlEventSiteDetailsResponse":{"title":"GetControlEventSiteDetailsResponse","description":"Details about the participation of a Site in a control event.","properties":{"type":{"$ref":"#/components/schemas/ControlEventType"},"siteID":{"$ref":"#/components/schemas/SiteID"},"vendor":{"$ref":"#/components/schemas/Vendor"},"status":{"$ref":"#/components/schemas/ControlEventSiteStatus"},"history":{"description":"A chronological log of events pertaining to this Site's participation in the control event.","type":"array","items":{"$ref":"#/components/schemas/ControlEventHistoryEvent"}}},"required":["type","siteID","vendor","status","history"]},"UpdateControlEventTagsRequest":{"title":"UpdateControlEventTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]},"ChargerSummary":{"title":"ChargerSummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/ChargerID"},"vendor":{"$ref":"#/components/schemas/ChargerVendor"},"vendorID":{"type":"string","description":"The corresponding ID of the Charger in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["id","vendor","vendorID","tags"]},"ListChargersResponse":{"title":"ListChargersResponse","type":"object","properties":{"chargers":{"description":"List of EV Chargers","type":"array","items":{"$ref":"#/components/schemas/ChargerSummary"},"examples":[[{"id":"chrg-ae02fl39bgdd8tmx","vendor":"chargepoint","vendorID":"123456","tags":{"location":"SF","environment":"production"}}]]},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of EV Chargers available.","examples":[42]}},"required":["chargers","totalCount"],"additionalProperties":false},"Charger":{"title":"Charger","type":"object","properties":{"id":{"$ref":"#/components/schemas/ChargerID"},"vendor":{"$ref":"#/components/schemas/ChargerVendor","description":"vendor providing this Charger"},"vendorID":{"type":"string","description":"The corresponding ID of the Charger in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"serialNumber":{"$ref":"#/components/schemas/ChargerSerialNumber"},"portIdentifier":{"$ref":"#/components/schemas/ChargerPortIdentifier"},"model":{"$ref":"#/components/schemas/ChargerModel"},"name":{"$ref":"#/components/schemas/ChargerName"},"status":{"$ref":"#/components/schemas/ChargerStatus"},"siteID":{"$ref":"#/components/schemas/ChargerSiteID"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"},"tags":{"$ref":"#/components/schemas/Tags"}},"required":["id","vendor","vendorID","serialNumber","model","name","status","siteID"],"additionalProperties":false},"GetChargerResponse":{"title":"GetChargerResponse","allOf":[{"$ref":"#/components/schemas/Charger"}]},"UpdateChargerTagsRequest":{"title":"UpdateChargerTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]},"SyncChargerResponse":{"type":"object","title":"SyncChargerResponse","properties":{},"required":[],"additionalProperties":false},"ChargingSessionCustomer":{"title":"ChargingSessionCustomer","type":"object","properties":{"vendor":{"$ref":"#/components/schemas/ChargerVendor"},"userID":{"type":"string","description":"Unique identifier of the driver in the ChargePoint system. Only populated if `vendor=chargepoint`.","examples":["123456"]}},"required":["vendor"],"examples":[{"vendor":"chargepoint","userID":"123456"}],"additionalProperties":false},"ChargingSession":{"title":"ChargingSession","type":"object","properties":{"chargerID":{"$ref":"#/components/schemas/ChargerID"},"vendor":{"$ref":"#/components/schemas/ChargerVendor"},"customer":{"$ref":"#/components/schemas/ChargingSessionCustomer"},"start":{"type":"string","description":"Session start in ISO-8601 format","format":"date-time","examples":["2025-07-01T12:00:00+00:00"]},"end":{"type":"string","description":"Session end in ISO-8601 format","format":"date-time","examples":["2025-07-01T13:59:59+00:00"]},"chargingDurationSeconds":{"type":"integer","format":"int32","minimum":0,"description":"Total duration (in seconds) for which the current was flowing during a session\n","examples":[2525]},"idleDurationSeconds":{"type":"integer","format":"int32","minimum":0,"description":"Remaining duration (in seconds) for which current was not flowing\n","examples":[190]},"kwh":{"type":"number","description":"Energy consumed (kWh)","examples":[25.036]}},"required":["chargerID","vendor","start","end","chargingDurationSeconds","idleDurationSeconds","kwh"],"additionalProperties":false},"GetChargingSessionsResponse":{"title":"GetChargingSessionsResponse","type":"object","properties":{"chargingSessions":{"type":"array","items":{"$ref":"#/components/schemas/ChargingSession","examples":[[{"chargerID":"chrg-ae02fl39bgdd8tmx","vendor":"chargepoint","customer":{"vendor":"chargepoint","accountNumber":"12345"},"start":"2025-01-01T16:00:00+00:00","end":"2025-01-01T16:45:15+00:00","chargingDurationSeconds":2525,"idleDurationSeconds":190,"kwh":25.036},{"chargerID":"chrg-fs2516l2alww9tbd","vendor":"chargepoint","customer":{"vendor":"chargepoint","accountNumber":"23456"},"start":"2025-01-01T16:15:00+00:00","end":"2025-01-01T17:05:15+00:00","chargingDurationSeconds":2885,"idleDurationSeconds":130,"kwh":28.021}]]}},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"}},"required":["chargingSessions"],"additionalProperties":false},"ThermostatSummary":{"title":"ThermostatSummary","type":"object","properties":{"id":{"$ref":"#/components/schemas/ThermostatID"},"vendor":{"$ref":"#/components/schemas/ThermostatVendor"},"vendorID":{"type":"string","description":"The corresponding ID of the Thermostat in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"tags":{"$ref":"#/components/schemas/Tags"}},"additionalProperties":false,"required":["id","vendor","vendorID","tags"]},"ListThermostatsResponse":{"title":"ListThermostatsResponse","type":"object","properties":{"thermostats":{"description":"List of Thermostats","type":"array","items":{"$ref":"#/components/schemas/ThermostatSummary"},"examples":[[{"id":"tstat-ae02fl39bgdd8tmx","vendor":"virtual","vendorID":"123456","tags":{"location":"SF","environment":"production"}}]]},"nextPageToken":{"$ref":"#/components/schemas/NextPageToken"},"totalCount":{"type":"integer","description":"Total number of Thermostats available.","examples":[42]}},"required":["thermostats","totalCount"],"additionalProperties":false},"Thermostat":{"title":"Thermostat","type":"object","properties":{"id":{"$ref":"#/components/schemas/ThermostatID"},"vendor":{"$ref":"#/components/schemas/ThermostatVendor","description":"vendor providing this Thermostat"},"vendorID":{"type":"string","description":"The corresponding ID of the Thermostat in the vendor's system. Always a string; if the remote type is an integer, this will be a decimal representation of it.\n","examples":["123456"]},"serialNumber":{"$ref":"#/components/schemas/ThermostatSerialNumber"},"model":{"$ref":"#/components/schemas/ThermostatModel"},"name":{"$ref":"#/components/schemas/ThermostatName"},"siteID":{"$ref":"#/components/schemas/ThermostatSiteID"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"},"tags":{"$ref":"#/components/schemas/Tags"}},"required":["id","vendor","vendorID","serialNumber","model","name","siteID","tags"],"additionalProperties":false},"GetThermostatResponse":{"title":"GetThermostatResponse","allOf":[{"$ref":"#/components/schemas/Thermostat"}]},"SyncThermostatResponse":{"type":"object","title":"SyncThermostatResponse","properties":{},"required":[],"additionalProperties":false},"ThermostatState":{"title":"ThermostatState","type":"object","properties":{"id":{"$ref":"#/components/schemas/ThermostatID"},"ambientF":{"$ref":"#/components/schemas/ThermostatAmbientF"},"coolTargetF":{"$ref":"#/components/schemas/ThermostatCoolTargetF"},"heatTargetF":{"$ref":"#/components/schemas/ThermostatHeatTargetF"},"mode":{"$ref":"#/components/schemas/ThermostatMode"},"operatingState":{"$ref":"#/components/schemas/ThermostatOperatingState"},"fanMode":{"$ref":"#/components/schemas/ThermostatFanMode"},"lastSyncedAt":{"$ref":"#/components/schemas/LastSyncedAt"}},"required":["id","ambientF","coolTargetF","heatTargetF","mode","operatingState","fanMode"],"additionalProperties":false},"GetThermostatStateResponse":{"title":"GetThermostatStateResponse","allOf":[{"$ref":"#/components/schemas/ThermostatState"}]},"SyncThermostatStateResponse":{"type":"object","title":"SyncThermostatStateResponse","properties":{},"required":[],"additionalProperties":false},"ThermostatInterval":{"title":"ThermostatInterval","type":"object","description":"A single interval of Thermostat runtime data.\n\nIf `missing` is present and `true`, the interval data is missing and value fields are omitted;\notherwise, values will be populated.\n","properties":{"coolingMinutes":{"type":"integer","description":"Minutes spent actively cooling during the interval.","examples":[15]},"heatingMinutes":{"type":"integer","description":"Minutes spent actively heating during the interval.","examples":[30]},"idleMinutes":{"type":"integer","description":"Minutes spent idle during the interval.","examples":[15]},"kwh":{"type":"number","description":"Energy consumed (if available).","examples":[3.4]},"ambientF":{"type":"number","description":"Average ambient temperature in Fahrenheit across the interval.","examples":[75.5]},"coolTargetF":{"type":"number","description":"Average cool target temperature in Fahrenheit across the interval.","examples":[76]},"heatTargetF":{"type":"number","description":"Average heat target temperature in Fahrenheit across the interval.","examples":[68]},"start":{"$ref":"#/components/schemas/IntervalStart"},"end":{"$ref":"#/components/schemas/IntervalEnd"},"missing":{"$ref":"#/components/schemas/IntervalMissing"}},"required":["start","end"],"additionalProperties":false},"GetThermostatIntervalsResponse":{"title":"GetThermostatIntervalsResponse","type":"object","properties":{"id":{"$ref":"#/components/schemas/ThermostatID"},"summaryLevel":{"$ref":"#/components/schemas/SummaryLevel","description":"Historical Thermostat data is available summarized to `month`, `day`, `hour`,\n`15mins`.\n"},"start":{"$ref":"#/components/schemas/IntervalResponseStart"},"end":{"$ref":"#/components/schemas/IntervalResponseEnd"},"intervals":{"type":"array","items":{"$ref":"#/components/schemas/ThermostatInterval"},"examples":[[{"coolingMinutes":45,"heatingMinutes":0,"idleMinutes":15,"kwh":3.4,"ambientF":78,"coolTargetF":76,"heatTargetF":68,"start":"2025-07-01T00:00:00+00:00","end":"2025-07-01T01:00:00+00:00"},{"coolingMinutes":30,"heatingMinutes":0,"idleMinutes":30,"kwh":3.4,"ambientF":75.5,"coolTargetF":76,"heatTargetF":68,"start":"2025-07-01T01:00:00+00:00","end":"2025-07-01T02:00:00+00:00"}]]}},"required":["id","summaryLevel","start","end","intervals"],"additionalProperties":false},"UpdateThermostatTagsRequest":{"title":"UpdateThermostatTagsRequest","allOf":[{"$ref":"#/components/schemas/TagsPatch"}]}},"parameters":{"Vendor":{"name":"vendor","description":"A vendor to filter for.","in":"query","schema":{"$ref":"#/components/schemas/Vendor"}},"VendorID":{"name":"vendorID","description":"A vendor ID to filter for. Only valid if `vendor` also present.","in":"query","schema":{"type":"string"}},"PageSize":{"name":"pageSize","in":"query","schema":{"type":"integer","format":"int32","default":50,"minimum":1,"maximum":100,"examples":[50]}},"PageToken":{"name":"pageToken","in":"query","schema":{"type":"string","examples":["dGhpc2lzYW5vcGFxdWV0b2tlbgo="]}},"Tags":{"name":"tags","description":"Tags to filter for.","in":"query","style":"deepObject","schema":{"$ref":"#/components/schemas/Tags"}},"HasTag":{"name":"hasTag","description":"Tag keys to filter for.","in":"query","style":"form","explode":true,"schema":{"$ref":"#/components/schemas/HasTag"}},"SummaryLevel":{"name":"summaryLevel","in":"query","description":"Interval data is available summarized to `month`, `day`, `hour`, `15mins`.\n","schema":{"$ref":"#/components/schemas/SummaryLevel"}},"Start":{"name":"start","in":"query","description":"The earliest date for which data should be returned. It cannot be earlier than the\n`operationalSince` value for the corresponding Site. See the\n[interval data overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor details about the defaulting behavior when this parameter is not provided.\n\nIf provided, it's recommended that start date align with the requested summary level;\notherwise, it will be rounded up to the next appropriate interval boundary.  For example, a request\nwith a summary level of `day` and a start date of `2025-08-01T23:59:00Z` will return data beginning\n`2025-08-02T00:00:00Z`.\n\nThe value can be an RFC3339 timestamp, an unambiguous prefix of a RFC3339 timestamp (if offset omitted, UTC is assumed),\nseconds since unix epoch, or milliseconds since unix epoch.\n\nThe value is treated as inclusive, meaning that data for the specified start date is included in the response.\n","schema":{"type":"string","examples":["2025-08-01T23:59:00+00:00","2025","2025-08","2025-08-01","2025-08-01T00:00","2025-08-01T00:00Z"],"format":"date-time-like"}},"End":{"name":"end","in":"query","description":"The latest date for which data should be returned. It cannot be later than now. See the\n[interval data overview](https://docs.derapi.com/reference/overview#interval-data-endpoints)\nfor details about the defaulting behavior when this parameter is not provided.\n\nIf provided, it's recommended that end date align with the requested summary level;\notherwise, it will be rounded down to the next appropriate interval boundary.  For example, a request\nwith a summary level of `day` and an end date of `2025-09-01T00:01:00Z` will return data beginning\n`2025-09-01T00:00:00Z`.\n\nThe value can be an RFC3339 timestamp, an unambiguous prefix of a RFC3339 timestamp (if offset omitted, UTC is assumed),\nseconds since unix epoch, or milliseconds since unix epoch.\n\nThe value is treated as exclusive, meaning that data up until (but not through) the specified end is\nincluded in the response; i.e., this models a standard right-open interval.\n","schema":{"type":"string","examples":["2025-09-01T23:59:00+00:00","2025","2025-09","2025-09-01","2025-09-01T00:00","2025-09-01T00:00Z"],"format":"date-time-like"}},"Missing":{"name":"missing","in":"query","description":"How to handle missing interval data.\n\nBy default, intervals with missing data will be included and explicitly marked missing.\n","schema":{"$ref":"#/components/schemas/Missing"}},"SolarInverterVendor":{"name":"vendor","description":"A SolarInverter vendor to filter for.","in":"query","schema":{"$ref":"#/components/schemas/SolarInverterVendor"}},"BatteryVendor":{"name":"vendor","description":"A Battery vendor to filter for.","in":"query","schema":{"$ref":"#/components/schemas/BatteryVendor"}},"IdempotencyKey":{"name":"Idempotency-Key","in":"header","description":"A unique key that allows the client to make the request idempotent.\nIf a request with the same key has already been processed, the server\nwill return the original response without performing the operation again.\n\n**Do not include PII (Personally Identifiable Information) in this value.**\nUse a random or opaque identifier such as a UUID or secure hash.\n\nSee https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Idempotency-Key\nand https://datatracker.ietf.org/doc/draft-ietf-httpapi-idempotency-key-header/\n","required":false,"schema":{"type":"string","example":"9c7d2b4a0e1f6c835a2d1b0f4e3c5a7d"}},"EnrollmentID":{"name":"id","description":"The ID of the Enrollment which you're addressing","in":"path","required":true,"schema":{"$ref":"#/components/schemas/EnrollmentID"}},"IncludePII":{"name":"includePII","in":"query","description":"Controls whether or not personally-identifying information will be included in the response.","schema":{"type":"boolean","default":false,"examples":[true,false]}},"IncludeSecrets":{"name":"includeSecrets","in":"query","description":"Controls whether or not secrets will be present in the response.","schema":{"type":"boolean","default":false,"examples":[true,false]}},"ChargerVendor":{"name":"vendor","description":"A Charger vendor to filter for.","in":"query","schema":{"$ref":"#/components/schemas/ChargerVendor"}}},"responses":{"ValidationProblemResponse":{"description":"A validation error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblem"}}}},"NotFoundProblemResponse":{"description":"A resource wasn't found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblem"}}}},"IncorrectModeProblemResponse":{"description":"The request used incorrect mode credentials for this endpoint","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/IncorrectModeProblem"}}}},"NotFoundProblemOrErrorPage":{"description":"A resource wasn't found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundProblem"}},"text/html":{}}},"ValidationProblemOrErrorPage":{"description":"A validation error, or generic HTML error page","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ValidationProblem"}},"text/html":{}}},"TooManyVirtualResourcesProblemResponse":{"description":"Too many virtual resources","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyVirtualResourcesProblem"}}}}}},"x-default-target-integration":"goapi"}