RE: “Unsupported HTTP method” error response while using PUT method to update employee record through REST Webservices
We are using REST WebServices and I am testing to update an employee record’s email address via POSTMAN.
HTTP method: PUT
Endpoint: https://<accountid>.suitetalk.api.netsuite.com/services/rest/record/v1/employee
JSON body:
{ "email": "rest@xyz123.com" }
Once this is sent, the system gives the error of UNSUPPORTED HTTP METHOD. Below is the error response:
{
"type": "https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.6",
"title": "Method Not Allowed",
"status": 405,
"o:errorDetails": [
{
"detail": "Unsupported HTTP method for the requested resource.",
"o:errorCode": "INVALID_METHOD"
}
]
}
Although I’m able to update the employee record through PATCH method,(and I tried using PUT in RESTlets and it works there), I need to know if the PUT method is not supported in NetSuite REST Webservices or I m doing something wrong?
Uri needs to have an eid: key to validate the upsert. Patch to update otherwise since you it exist.