The current response JSON for the DeleteContact.php and UpdateContact.php APIs is extremely minimal and lacks some useful information for the user. To improve the experience and provide more context in the response, we should enhance the response JSON to include additional parameters.
Suggested Enhancements:
DeleteContact.php:
Include the ID, Name, and possibly UserID of the deleted contact.
Include a timestamp of the deletion.
Provide a confirmation status (success or failure).
UpdateContact.php:
Return the updated contact details (Name, Phone, Email, UserID).
Include the ID that was updated.
Provide a confirmation status (success or failure).
Include a timestamp of the update.
Additional Context:
Adding these parameters will help our team better understand the outcome of their API requests and will provide more information for logging, auditing, and/or confirmation purposes.
Description
The current response JSON for the
DeleteContact.php
andUpdateContact.php
APIs is extremely minimal and lacks some useful information for the user. To improve the experience and provide more context in the response, we should enhance the response JSON to include additional parameters.Suggested Enhancements:
DeleteContact.php:
ID
,Name
, and possiblyUserID
of the deleted contact.success
orfailure
).UpdateContact.php:
Name
,Phone
,Email
,UserID
).ID
that was updated.success
orfailure
).Additional Context:
Adding these parameters will help our team better understand the outcome of their API requests and will provide more information for logging, auditing, and/or confirmation purposes.