Client
Works with a single client.
Notes on Subsidiary / Primary Office
The list options for the field Primary Office are filtered based on the user's subsidiary. In the case of this API, the user is associated with the access token being used to authenticate. In order to create (POST) clients across multiple subsidiaries, a user and access token for each subsidiary will need to exist. Multiple additional users with different subsidiaries can be created using the same email address. This does not require additional NetSuite licenses.
Base URL
https://{{accountid}}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=customscript_prac_api_client&deploy=customdeploy_prac_api_client_v{{versionnumber}}
HTTP: GET
Gets the client record for a given internal id.
Version 1
Required Parameters
| Name | Value | Notes |
|---|---|---|
| script | customscript_prac_api_client | |
| deploy | customdeploy_prac_api_client_v{{versionnumber}} | |
| custparam_id | {{integer}} | The internal id of the client you are retrieving. |
Version 2
- In version 2, the response now includes an array of related contacts.
- It is possible to return account-specific custom fields using a script parameter on the relevant script deployment. We can set this up for you.
Required Parameters
| Name | Value | Notes |
|---|---|---|
| script | customscript_prac_api_client | |
| deploy | customdeploy_prac_api_client_v{{versionnumber}} | |
| custparam_id | {{integer}} | The internal id of the client you are retrieving. |
HTTP: POST
Creates a new client based on data in JSON payload.
Version 1
Payload
The payload passed in the POST request should be JSON format. It must contain at least one key-value pair of fields to update. You may pass multiple fields to update. Keys are internal IDs of the fields unless otherwise noted here. Some fields are mandatory and not all fields are allowed. Any invalid fields will be specified in the response.
Address data uses an array at key entityaddress.
{
"customform": 365,
"entityid": "1755100939182",
"companyname": "BillTest13",
"subsidiary": 2,
"custentity_gvcpa_location": 1,
"entitystatus": 13,
"email": "test13@test.com",
"entityaddress": [
{
"defaultbilling": true,
"defaultshipping": false,
"label": "Test Address 1",
"country": "US",
"attention": "Mr. Test",
"addressee": "Mr. Fake",
"addrphone": "6082387643",
"addr1": "123 Fake St.",
"addr2": "Apt. 0",
"zip": "53717",
"city": "Madison",
"state": "WI",
"addrtext": "",
"override": false
},
{
"defaultbilling": false,
"defaultshipping": true,
"label": "Test Address 2",
"country": "US",
"attention": "Mr. Test",
"addressee": "Mr. Fake",
"addrphone": "6082387643",
"addr1": "444 Fake St.",
"addr2": "Apt. 0",
"zip": "53717",
"city": "Madison",
"state": "WI",
"addrtext": "",
"override": false
}
]
}
HTTP: PUT
Updates an existing record based on data in JSON payload. Only the data included in the request will be updated. The internal ID of the record must be included in the request, specified as id. Some fields are mandatory (meaning they cannot be cleared) and not all fields are allowed. Any invalid fields will be specified in the response.
Version 1
Updating addresses is not supported at this time. Please use the UI.
Payload
{
"id": 2966,
"email": "test1@test.com"
}