PUT https://app.alaaqat.com/api/contacts/{_id}
_id هو معرف الاتصال
Accept: application/json
نقطة النهاية هذه تقبل الخصائص المخصصة في محتوى الطلب، إقرأ الخصائص.
الصيغة هي 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
}
إذا كانت إحدى الخصائص التي ترسلها مفتاحاً فريداً، فيجب ألا تكون قيمتها لجهة اتصال أخرى، وإلا فلن يُحدَّث شيء ويُرفض الطلب بالرمز 422 مع خطأ على ذلك الحقل. الخصائص email وphone وwhatsapp_number مفاتيح فريدة لجهات الاتصال افتراضياً.
الإستجابة تكون دائماً بصيغة 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"
}