# Deals

| Attribut           | Typ     | Beschreibung                                                                                          |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------- |
| broker\_id         | integer | Besitzer des Deals                                                                                    |
| client\_id         | integer | ID zum Interessenten (Kontakt)                                                                        |
| property\_id       | integer | ID zum Objekt                                                                                         |
| project\_id        | integer | ID zum Projekt (muss nicht selber gesetzt werden, wird über das Objekt automatisch gesetzt)           |
| deal\_stage\_id    | integer | ID zur Deal-Phase                                                                                     |
| deal\_pipeline\_id | integer | ID zur Deal-Pipeline (muss nicht selber gesetzt werden, wird über die Deal-Phase automatisch gesetzt) |
| date               | date    | Datum des Deals                                                                                       |
| price              | float   | (voraussichtlicher) realisierter Preis des Deals                                                      |
| note               | string  | Interne Notiz zum Deal                                                                                |

## Deals lesen

<mark style="color:blue;">`GET`</mark> `https://api.propstack.de/v1/client_properties`

#### Query Parameters

| Name                       | Type    | Description                                                                                                                                  |
| -------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| include                    | string  | Liste von möglichen Assoziationen, die in der Antwort mit übergeben werden (kommagetrennt). Kann den Wert `client` und/oder `property` haben |
| sort\_by                   | string  | <p>Sortierkriterium<br>Standard: created\_at</p>                                                                                             |
| order                      | string  | Aufsteigend oder absteigend sortieren. Entweder `asc` oder `desc`                                                                            |
| reservation\_reason\_ids   | array   | Array aus Absagegründen (dessen IDs), um nur verlorene Deals mit bestimmten Absagegründen aufzurufen                                         |
| category                   | string  | Art des Deals. Kann eines von `qualified`, `unqualified`, `lost` sein                                                                        |
| deal\_stage\_ids           | array   | Array aus IDs, um nur Deals in bestimmten Phasen aufzurufen.                                                                                 |
| deal\_pipeline\_id         | integer | Nur Deals aus einer bestimmten Pipeline aufrufen                                                                                             |
| project\_id                | integer | ID eines Projektes, um nur Deals mit Objekten, die zu dem Projekt gehören, aufzurufen                                                        |
| broker\_id                 | integer | ID eines Nutzers, um nur Deals, wo er der Besitzer ist aufzurufen                                                                            |
| client\_id                 | integer | ID des Interessenten (Kontakt), um nur die Deals eines bestimmten Kontaktes aufzurufen                                                       |
| property\_id               | integer | ID des Objektes, um nur dessen Interessenten aufzurufen                                                                                      |
| client\_source\_id         | integer | ID der Anfrage-Quelle                                                                                                                        |
| team\_id                   | integer | ID der Abteilung                                                                                                                             |
| property\_broker\_ids      | array   | IDs der Objektbetreuer                                                                                                                       |
| client\_broker\_ids        | array   | IDs der Kontakt Betreuer                                                                                                                     |
| feeling\_from              | integer | Mindestwert des Bauchgefühls                                                                                                                 |
| feeling\_to                | integer | Höchstwert des Bauchgefühls                                                                                                                  |
| created\_at\_from          | string  | Format: 2022-12-07T10:00:00+01:00                                                                                                            |
| created\_at\_to            | string  | Format: 2022-12-07T23:59:59+01:00                                                                                                            |
| start\_date\_from          | string  | Format: 2022-12-07T10:00:00+01:00                                                                                                            |
| start\_date\_to            | string  | Format: 2022-12-07T10:00:00+01:00                                                                                                            |
| show\_archived\_clients    | boolean | Archivierte Kontakte anzeigen                                                                                                                |
| hide\_archived\_properties | boolean | Archivierte Eigenschaften ausblenden                                                                                                         |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "data": [
        {
            "id": 8145,
            "sold_price": null,
            "note": "",
            "created_at": "2019-02-04T10:37:46.060+01:00",
            "start_date": "2019-02-04T10:37:36.360+01:00",
            "broker_id": 1,
            "client_id": 29934,
            "property_id": 9884,
            "project_id": null,
            "deal_pipeline_id": 2,
            "deal_stage_id": 3,
            "reservation_reason_id": null
        }
    ],
    "meta": {
        "total_count": 120
    }
}
```

{% endtab %}
{% endtabs %}

## Deal anlegen

<mark style="color:green;">`POST`</mark> `https://api.propstack.de/v1/client_properties`

#### Path Parameters

| Name             | Type   | Description                                                                           |
| ---------------- | ------ | ------------------------------------------------------------------------------------- |
| client\_property | object | das Deal-Objekt mit 3 Pflicht-Feldern: `client_id`, `property_id` und `deal_stage_id` |

#### Anfrageformat

```json
{
   "client_property": {
       "property_id": 123,
       "client_id": 456,
       "note" : "some note"
   }
}
```

## Deal aktualisieren

<mark style="color:blue;">`PUT`</mark> `https://api.propstack.de/v1/client_properties/:id`

#### Anfrageformat

```json
{
   "client_property": {
       "property_id": 123,
       "client_id": 456,
       "note" : "updated note"
   }
}
```

## Absage erfassen

<mark style="color:blue;">`POST`</mark> `https://api.propstack.de/v1/tasks`

#### Anfrageformat

<pre class="language-json"><code class="lang-json">{
  "task": {
    "title": "Absage",
    "<a data-footnote-ref href="#user-content-fn-1">reservation_reason_id</a>": 1,
    "client_ids": [123],
    "property_ids": [456],
    "body": "Das ist ein Test"
  }
}
</code></pre>

[^1]: Absagegrund


---

# 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://docs.propstack.de/reference/deals.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.
