Search code examples
netsuitenetsuite-rest-api

Netsuite insert phoneCall to supportcase not working


I want to add a phonecall to one of my supportcases.
When I use the following request, I get an error.

POST https://[CN].suitetalk.api.netsuite.com/services/rest/record/v1/phoneCall

The body:

{
  "title":"test",
  "message": "test call",
  "phone": "+3101234567",
  "supportcase": 555
} 

The error:

{
    "type": "https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1",
    "title": "Bad Request",
    "status": 400,
    "o:errorDetails": [
        {
            "detail": "Error while accessing a resource. You have entered an Invalid Field Value 555 for the following field: supportcase.",
            "o:errorCode": "USER_ERROR"
        }
    ]
}

The documentation isn't clear enough, does someone know what I should use as value for the supportCase property?
I tried the caseNumber and also the internal ID.
Documentation: https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2021.2/index.html#/definitions/phoneCall


Solution

  • When I try to add the related company as well, it works.

    {
      "title":"test 12",
      "message": "test note",
      "phone": "+31642937986",
      "supportCase": 555,
      "company": 12
    } 
    

    The property company has to be send too, also the supportCase should be linked to that company for it to work

    I had to use both internal Id's