> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dalyenergy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Object Models

> Canonical request and response objects surfaced in the DalyAPI reference

# Object Models

This page marks the highest-signal API objects so you can quickly see which payloads are canonical and where they appear.

## Authentication Objects

| Object                      | Type          | Used By                        | Notes                                                                 |
| --------------------------- | ------------- | ------------------------------ | --------------------------------------------------------------------- |
| `TokenRequest`              | request body  | `POST /auth/token`             | Exchanges workspace and user API keys for a Daly JWT.                 |
| `TokenResponse`             | response body | `POST /auth/token`             | Returns `result` plus the issued JWT in `token`.                      |
| `SupabaseWorkspaceResponse` | response item | `GET /auth/workspaces`         | Lists the workspaces a Supabase-authenticated user can exchange into. |
| `SupabaseExchangeRequest`   | request body  | `POST /auth/exchange-supabase` | Supplies the selected Daly workspace ID after Supabase auth.          |

## Workspace and Organization Objects

| Object                               | Type         | Used By                                                | Notes                                                       |
| ------------------------------------ | ------------ | ------------------------------------------------------ | ----------------------------------------------------------- |
| `WorkspaceCreateRequest`             | request body | `POST /workspaces`                                     | Creates a workspace and returns its plaintext API key once. |
| `WorkspaceUpdateRequest`             | request body | `PUT /workspaces/{workspace_id}`                       | Replaces mutable workspace metadata.                        |
| `WorkspaceSettingsReplaceRequest`    | request body | `PUT /workspaces/{workspace_id}/settings`              | Replaces the full workspace settings document.              |
| `WorkspaceSettingsPatchRequest`      | request body | `PATCH /workspaces/{workspace_id}/settings`            | Deep-merges partial settings updates.                       |
| `OrganizationInviteCreateRequest`    | request body | `POST /organizations/{organization_id}/invites`        | Issues an invite token for an organization role.            |
| `OrganizationInviteAcceptRequest`    | request body | `POST /organizations/{organization_id}/invites/accept` | Accepts an invite token into the target organization.       |
| `OrganizationUpdateRequest`          | request body | `PATCH /organizations/{organization_id}`               | Updates mutable organization metadata.                      |
| `OrganizationWorkspaceCreateRequest` | request body | `POST /organizations/{organization_id}/workspaces`     | Creates a workspace directly under an organization.         |

## Modeling Resource Objects

| Object                         | Type          | Used By                                             | Notes                                                          |
| ------------------------------ | ------------- | --------------------------------------------------- | -------------------------------------------------------------- |
| `LocationCreateRequest`        | request body  | `POST /locations`                                   | Site metadata plus optional nested weather data.               |
| `WeatherDataCreateRequest`     | request body  | `POST /weatherdata`                                 | Inline weather arrays or provider-backed weather sourcing.     |
| `ModuleCreateRequest`          | request body  | `POST /modules/json`                                | JSON module creation when file upload is not used.             |
| `InverterCreateRequest`        | request body  | `POST /inverters/json`                              | JSON inverter creation when file upload is not used.           |
| `LayoutCreateRequest`          | request body  | `POST /layouts`                                     | Creates a layout resource and optional layout payload.         |
| `ShadingSceneCreateRequest`    | request body  | `POST /shadingscenes`                               | Canonical JSON shape for scene geometry and tracking metadata. |
| `ShadingSceneAcceptedResponse` | response body | `POST /shadingscenes`, `POST /shadingscenes/import` | Returns the queued scene resource and task context.            |

## Energy Model and Async Objects

| Object                             | Type          | Used By                                                                      | Notes                                                                                                                                                                                                                             |
| ---------------------------------- | ------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `EnergyModelInput`                 | request body  | `POST /energymodels`, `PUT /energymodels/{energy_model_id}`                  | Canonical model-run payload and saved-input update body, including `output.timeSeries`, `output.fullTimeSeries`, `output.blockResults`, `output.blockIndex`, `output.lossBreakdownTimestamps`, and `output.irradianceLossDetail`. |
| `EnergyModelDetailResponse`        | response body | `GET /energymodels/{energy_model_id}`, `PUT /energymodels/{energy_model_id}` | Detail payload with include-gated outputs plus saved inputs. Optional result sections include `timeSeries` and `blockTimeSeries`.                                                                                                 |
| `EnergyModelPostCompletedResponse` | response body | `POST /energymodels`, `POST /energymodels/{energy_model_id}/run`             | Returned when execution completes in request scope. Sync-completed responses can expose top-level `timeSeries`, `blockTimeSeries`, and additive `losses.irradianceLossDetail`.                                                    |
| `EnergyModelPostAcceptedResponse`  | response body | `POST /energymodels`, `POST /energymodels/{energy_model_id}/run`             | Returned when execution queues background processing.                                                                                                                                                                             |
| `EnergyModelTaskDetails`           | nested object | energy-model responses                                                       | Shared task metadata block for polling and warnings.                                                                                                                                                                              |
| `TaskStatus`                       | enum          | task and workflow responses                                                  | Terminal states include `completed`, `failed`, and `cancelled`.                                                                                                                                                                   |
| `TaskType`                         | enum          | task and workflow responses                                                  | Identifies the queued operation family.                                                                                                                                                                                           |

<Info>
  Some list/detail responses are currently surfaced as inline OpenAPI shapes instead of named components. Use the interactive endpoint pages for the exact response envelope when a named response object is not listed here.
</Info>
