Add new comment
Use this api to add an ops comment to a transfer order.
Flow: When call the api, tf service will create new comment record in db.
URL : /api/ops-comments/add-comment
Method : POST
Validate Rule
"transfer_order_id" => ['required', 'exists:transfer_orders,id'],
"note" => ['required', "string", "max:2000"],
"employee_id" => ['required', "string"],
Input
{
"transfer_order_id": "40",
"note": "ABCD",
"employee_id": "817993"
}
Success Response
Code : 200 OK
Content example
{
"success": true,
"errors": null,
"errorCode": null,
"data": {
"id": 3,
"transfer_order_id": "40",
"employee_name": "Lê Bá Tiến",
"employee_id": "817993",
"note": "ABCD",
"created_at": "2023-06-12T04:37:58.000000Z"
}
}
Error Response
Code : 400 BAD REQUEST
Content :
{
"success": false,
"errors": {
"transfer_order_id": [
"The selected transfer order id is invalid."
]
},
"errorCode": "INVALID_INPUT",
"data": null
}