Update Deal

PUT https://app.alaaqat.com/api/deals/{_id}

Where _id is the deal's identifier.

Header

Accept: application/json

Body

This endpoint accepts custom properties in the body, read properties.

syntax is property_internal_name: value

{
  "firstname": "test",
  "lastname": "test",
  "middlename": "test",
  "birthdate": "1997-08-21T21:00:00Z",
  "phone": "+962790000000",
  "gender": "male",
  "languages": "arabic",
  "annual_revenue": 50.5
}

Unique keys

If a property you send is a unique key, its value must not already belong to another deal. Otherwise nothing is updated, and the request is refused with 422 with the error reported on that field.

Response

The return type will always be Contact.

{
    "data": {
        "properties": {
            "_id": "66552c5bf8309b0cae098994",
            "deal_name": "test",
            "amount": 50,
            "deal_stage": "closed_lost",
            "updated_at": "2024-05-28T01:22:05.561000Z",
            "created_at": "2024-05-28T00:59:07.325000Z",
            "close_date": {
                "$date": {
                    "$numberLong": "1714510800000"
                }
            },
            "forcast_amount": 20,
            "next_steps": "test",
            "forecast_amount": 20
        }
    },
    "message": "Entity was modified Successfully"
}