We have an external system hitting a RESTlet endpo...
# suitescript
e
We have an external system hitting a RESTlet endpoint to create a sales order from a PO Number. We have validation that checks to see if the PO already exists and if it does the external system wants an HTTP status code that is not 200. My understanding is that status code 200 indicates a successful connection to the RESTlet endpoint and there's no way to return to the external application a different HTTP status code if the connection was successful. Has anyone tried to return an HTTP status code other than 200 for a successful connection but invalid operation after connecting?
c
You don't control the status codes for returns. You could send data back in a json object that they can read.
e
Thanks @creece that's what I am sending but apparently they think that Netsuite should be able to return a status code other than 200 if the operation they attempted via the RESTlet errored out.
c
200 just means the request was successful. It doesn't indicate if the code did what it was supposed to. Thats just how it works in netsuite. You can point them to SA: 50994.
👍 1
e
Thanks again @creece