Update Contact

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

_id it is ID for contact

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 contact. Otherwise nothing is updated, and the request is refused with 422 with the error reported on that field. For contacts, email, phone and whatsapp_number are unique keys by default.

Response

The return type will always be Contact.

{
    "data": {
        "properties": {
            "_id": "663e09362a3faf06c50d0172",
            "account_id": 1,
            "firstname": "test",
            "lastname": "test",
            "email": "layla.nasser@example.com",
            "updated_at": "2024-05-27T22:12:42.175000Z",
            "created_at": "2024-05-10T11:47:02.680000Z",
            "annual_revenue": 50.5,
            "birthdate": {
                "$date": {
                    "$numberLong": "872197200000"
                }
            },
            "gender": "male",
            "languages": "arabic",
            "middlename": "test",
            "phone": "+962790000000",
            "test": null,
            "fullname": "test test",
            "image": null
        },
        "channels": []
    },
    "message": "Entity was modified Successfully"
}