> For the complete documentation index, see [llms.txt](https://elyssa-app.gitbook.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elyssa-app.gitbook.io/api-docs/environments.md).

# Environments

### Environments by inventory id

<mark style="color:blue;">`GET`</mark> `{{url_base}}/environments/by-inventory`

Retrieve all inventory items and rooms grouped by level.

**Query params**

| Name                                           | Type | Description                 |
| ---------------------------------------------- | ---- | --------------------------- |
| inventoryId                                    | uuid | InventoryId for get details |
| x-company-id<mark style="color:red;">\*</mark> | uuid | Company Id                  |

{% tabs %}
{% tab title="200: OK Properties" %}

```json
{
  "data": {
    "levels": [
      {
        "level": 1,
        "levelName": "Nivel 1",
        "environments": [
          {
            "environmentId": "03cab7cc-f209-49f0-900b-218ec22006f4",
            "environmentName": "Penthouse",
            "description": "",
            "environmentType": {
              "id": "1108ae3d-43a1-4ebe-a524-8c6f8119e523",
              "name": "Penthouse"
            },
            "order": 0,
            "items": [],
            "totalItems": 0
          },
          {
            "environmentId": "0489030a-8ba1-4851-a7f7-9b58377e05df",
            "environmentName": "Lavadero",
            "description": null,
            "environmentType": {
              "id": "0347c5ec-838f-4cda-86f1-4ebb55999672",
              "name": "Lavadero"
            },
            "order": 0,
            "items": [
              {
                "itemDiagnosticId": "446760da-800c-4a78-b74b-a34f9a0ca133",
                "itemName": "LLAVES",
                "description": null,
                "rating": null,
                "isNew": false,
                "toRepair": false,
                "amount": 0,
                "photosCount": 2,
                "order": 0
              },
              {
                "itemDiagnosticId": "4858b840-c157-4b3f-8d41-8ab344b406c5",
                "itemName": "TECHO",
                "description": null,
                "rating": null,
                "isNew": false,
                "toRepair": false,
                "amount": 0,
                "photosCount": 3,
                "order": 0
              },
              {
                "itemDiagnosticId": "5acf8945-c51e-4719-8e7d-5abf6b839f16",
                "itemName": "GUARDAESCOBAS",
                "description": null,
                "rating": null,
                "isNew": false,
                "toRepair": false,
                "amount": 0,
                "photosCount": 3,
                "order": 0
              },
              {
                "itemDiagnosticId": "70b80917-7927-4b41-87a8-db1cb43cf9dd",
                "itemName": "PAREDES",
                "description": null,
                "rating": null,
                "isNew": false,
                "toRepair": false,
                "amount": 0,
                "photosCount": 3,
                "order": 0
              },
              {
                "itemDiagnosticId": "d8ff79b5-842c-4f46-8672-c6c82cb0092e",
                "itemName": "TOALLERO",
                "description": null,
                "rating": null,
                "isNew": false,
                "toRepair": false,
                "amount": 0,
                "photosCount": 1,
                "order": 0
              },
              {
                "itemDiagnosticId": "deb34a58-f0a0-45a2-a76d-26848540be36",
                "itemName": "LAVADERO",
                "description": null,
                "rating": null,
                "isNew": false,
                "toRepair": false,
                "amount": 0,
                "photosCount": 3,
                "order": 0
              },
              {
                "itemDiagnosticId": "fad4c926-60e9-4886-8ecd-f5ec187c98a1",
                "itemName": "GRIFERIA LAVADORA",
                "description": null,
                "rating": null,
                "isNew": false,
                "toRepair": false,
                "amount": 0,
                "photosCount": 1,
                "order": 0
              }
            ],
            "totalItems": 7
          }
        ],
        "totalEnvironments": 2
      }
    ],
    "summary": {
      "totalLevels": 1,
      "totalEnvironments": 10,
      "totalItems": 10,
      "totalPhotos": 29
    }
  },
  "success": true,
  "timestamp": "2026-02-06T19:12:30.4901063Z"
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```json
{
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "field": "string"
  },
  "timestamp": "2026-02-06T18:36:21.561Z"
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```json
 {
  "success": false,
  "error": {
    "code": "string",
    "message": "string",
    "details": "string",
    "field": "string"
  },
  "timestamp": "2026-02-06T18:36:21.561Z"
}
```

{% endtab %}
{% endtabs %}
