Greetings everyone!
I have a problem that seems to have started since Version 2018 Release 2.
We perform two rest calls. The first is a GET on...
https://rest.netsuite.com/rest/roles
...where we get the POST Customer endpoint
"restDomain": "https://9876543-sb1.restlets.api.netsuite.com"
where "9876543" is our account id.
Then we use that restDomain endpoint to perform a Post api call to insert a new customer. The raw body call is like
{
"recordtype": "customer",
"subsidiary": "1",
"parent": null,
"title": "-",
"url": null,
"companyname": "My Company",
"entityId": "Customer Name",
"phone": "2345123456",
"fax": "",
"startDate": null,
"email": "customer@test.gr",
"category": "1",
"currency": "1",
"addresses": [
{
"addressBook": {
"zip": "",
"addressee": "",
"addr1": "",
"addr2": "",
"country": "US",
"state": "TX",
"city": ""
},
"defaultbilling": "T",
"defaultshipping": "T"
}
],
"isperson": "F"
}
In both calls we provide the same, valid headers of "Content-Type" and of course "Authorization"
When we perform both of these calls using PostMan, everything works great.
When we perform these calls from our system, the first call works as it should be but the second returns and error:
{StatusCode: 500, ReasonPhrase: 'Internal Server Error', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
X-N-OperationId: 88c622ac-7f63-4f48-9446-c9d4dec94892
NS_RTIMER_COMPOSITE: 2107488568:706172746E6572733030332E70726F642E7376616C652E6E65746C65646765722E636F6D:80
Strict-Transport-Security: max-age=31536000
Vary: User-Agent
Connection: close
Date: Mon, 21 Jan 2019 14:44:25 GMT
P3P: CP="CAO PSAa OUR BUS PUR"
Set-Cookie: NS_ROUTING_VERSION=LAGGING; path=/
Content-Length: 61
Content-Type: application/json; charset=utf-8
}}
The returned content message is "UNEXPECTED_ERROR".
The same error occurs when from our system we make a GET call to retrieve a customer
https://9876543-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=268&deploy=1&recordtype=customer&id=199680
Again, the same call works fine using postman. The odd thing seems to be that these errors are not particularly related to the call verb (POST) but endpoint related, because our first GET call returns results but with the account-related endpoint, even GET returns the same error.
Nothing is recorded in the execution (or any other) log.
We use .NET technologies, and the Task<HttpResponseMessage> HttpClient.PostAsync method and this feature was working flawlessly.
Any ideas?