# Properties

### Listing of all properties with information pagination

<mark style="color:blue;">`GET`</mark> `/v1/property/properties`

List the properties that a company has registered in elyssa app; To improve performance, the information is paginated, the amount of data to be returned in each query is established<br>

&#x20;:thinking: Each query returns a maximum of 20 properties &#x20;

#### Query Parameters

| Name                                       | Type   | Description                                               |
| ------------------------------------------ | ------ | --------------------------------------------------------- |
| page<mark style="color:red;">\*</mark>     | number | Number of the page to display information.  Default 1     |
| pageSize<mark style="color:red;">\*</mark> | number | Number of records to display per page. Default: 20.       |
| code                                       | string | Internal ID for the property, as registered by the agent. |
| address                                    | string | Address of the property to search                         |
| city                                       | string | Property City or State to search                          |
| sortBy                                     | string | Default: createdAt                                        |
| sortOder                                   | string | Values: asc, desc. Desfault: desc                         |

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

```json
{
  "success": true,
  "timestamp": "2026-02-06T18:36:21.556Z",
  "data": {
    "data": [
      {
        "propertyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "code": "string",
        "address": "string",
        "city": "string",
        "neighborhood": "string",
        "isRented": true,
        "builtArea": 0,
        "lotArea": 0,
        "levels": 0,
        "propertyType": {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "name": "string"
        },
        "hasInventories": true,
        "createdAt": "2026-02-06T18:36:21.556Z",
        "modifiedAt": "2026-02-06T18:36:21.556Z"
      }
    ],
    "page": 0,
    "pageSize": 0,
    "totalRecords": 0,
    "totalPages": 0,
    "hasPreviousPage": true,
    "hasNextPage": true
  }
}
```

{% 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 %}

### Detail of a property&#x20;

<mark style="color:blue;">`GET`</mark> `/v1/property/details`

#### Query Parameters

| Name                                         | Type | Description           |
| -------------------------------------------- | ---- | --------------------- |
| PropertyId<mark style="color:red;">\*</mark> | uuid | Unique id of property |

{% tabs %}
{% tab title="200: OK Detail property" %}

```javascript
{
  "success": true,
  "timestamp": "2026-02-06T18:47:35.492Z",
  "data": {
    "propertyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "code": "string",
    "address": "string",
    "city": "string",
    "country": "string",
    "neighborhood": "string",
    "isRented": true,
    "builtArea": 0,
    "lotArea": 0,
    "levels": 0,
    "detail": "string",
    "location": {
      "latitude": 0,
      "longitude": 0
    },
    "propertyType": {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "string"
    },
    "stats": {
      "totalEnvironments": 0,
      "totalInventories": 0
    },
    "createdAt": "2026-02-06T18:47:35.492Z",
    "modifiedAt": "2026-02-06T18:47:35.492Z"
  }
}
```

{% endtab %}

{% tab title="401: Unauthorized Permission denied" %}

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

{% endtab %}

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

{% endtab %}

{% tab title="500: Internal Server Error Server error" %}

{% endtab %}
{% endtabs %}

### Response

{% hint style="warning" %}
Read the documentation for the  [**inventoryType** ](/api-docs/inventories.md) attribute to understand the type of inventory present in the properties.
{% endhint %}

{% hint style="info" %}
In the response for listing of all properties with information pagination, return the newOffset attribute, with this new value, can paginated the next properties. if the newOffset attribute is -1, is the last request can do to get data.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://elyssa-app.gitbook.io/api-docs/properties.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
