Skip to content

Magento 2 : Update tables on custom rest API calls

API URL :

http://website.local.com/rest/V1/rma/rma/:100000008

Method : PUT
Request :

{
"rma": {
    "status":"approved",
    "reply": "Your Package will be ",
    "rma_id": 8
}

}

When this API is called, I need to update “status” in table1 and “reply” in table2.
Even I don’t have column “Status”, I will update that by status_id based on status lable passed here.

Can someone please help me how can I do this ?