Confirm Request Order
Vendor will send the confirmation of request order to pmc service.
Flow: When calling the API, the service will check the Request order, and return errors if the order was too old or the order had the confirmation status before.
URL : /api/vendor/order/confirm
Method : POST
Content-Type : json
Validate Rule :
"prescriptCode" => ['required_without:requestOrderNumber', 'string', 'exists:request_orders,prescript_code'],
"requestOrderNumber" => ['required_without:prescriptCode', 'string', 'exists:request_orders,request_order_number'],
"action" => ['required', 'string', Rule::in(['CONFIRMED', 'CANCELED'])],
"reason" => ['nullable', 'string', 'max:2000'],
Body :
{
"prescriptCode": "ISOFH202306291057686",
"action": "CANCELED",
"reason": "Khách hàng hủy đơn"
}
Success Response
Code : 200 OK
Content example
{
"success": true,
"errors": null,
"errorCode": null,
"data": true
}
Error Response
Code : 400 BAD REQUEST
Content :
{
"success": false,
"errors": {
"prescriptCode": [
"Giá trị của trường prescript code không tìm thấy."
],
"action": [
"Giá trị đã chọn trong trường action không hợp lệ."
]
},
"errorCode": "INVALID_INPUT",
"data": null
}