Derek E
Derek E

Reputation: 11

Can't assign Role "contactRole" to new contact using the SuiteTalk API

I am having trouble figuring out how to assign the contact role on a contact when using the SuiteTalk API.

I can create the contact and successfully connect it to the correct customer, but I can't get the contactRole to be assigned.

I saw that there is a second API call for contactRoles but that just creates a new role, doesn't add a role to an existing / new contact.

URL:
https://XXXXXX.suitetalk.api.netsuite.com/services/rest/record/v1/contact
Body:
`{
    "entityId": "John Doe",
    "company": {
        "id": "567",                     
        "type": "customer"               
    },
    "contactRole": {
        "id": "12",                      
        "name": "Sales Manager"          
    },
    "email": "[email protected]",    
    "phone": "123-456-7890"             
}
`

I've also tried

`{
    "entityId": "John Doe",
    "company": {
        "id": "567",                     
        "type": "customer"               
    },
    "contactRole":"12",
    "email": "[email protected]",    
    "phone": "123-456-7890"             
}
`

and

`{
    "entityId": "John Doe",
    "company": {
        "id": "567",                     
        "type": "customer"               
    },
    "contactRole": {
        "id": "12"
   }
    "email": "[email protected]",    
    "phone": "123-456-7890"             
}
`

I am just trying to assign a contactRole to the new contacts.

Upvotes: 0

Views: 61

Answers (0)

Related Questions