RE: POST/PATCH + REST API
Hey there- New to the NetSuite API here. I can perform a GET against an employee ID without issue, but I’m having a difficult time debugging why I cannot perform a POST/PATCH in my same script.
I can do a POST/PATCH using Postman (with the same credentials) which I find odd. Has anyone experienced this before? If anyone has I’d be happy to share more details.
I figured this out. The $body variable needs to be constructed in a very very specific way.

Could you share that very very specific way?
$body = "{ `n`"custentity_coupa_emp_id`": `"$employee_id`", `n`"email`": `"$email`", `n`"externalId`": `"$email`", `n`"firstname`": `"$first`", `n`"giveAccess`": false, `n`"hireDate`": `"$start_date`", `n`"lastname`": `"$last`", `n`"subsidiary`": 1, `n`"title`": `"$title`"`n}"
The above works, but I’m still trying to figure out how to construct the “roles” in that body.