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": "[email protected]"
}
Once this is send, system gives the error of UNSUPPORTED HTTP METHOD. below is the error responce:
{
"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?
Your endpoint needs to include the employee ID to identify the record you want to modify. Without this, only
GET
(returns a list) orPOST
(creates new record) are valid.GET /employee (Get list of records.)
POST /employee (Insert record.)
PUT /employee/{id} (Insert or update record.)
More information in the NetSuite REST API Browser documentation