Skip to content

Contact

Works with a single contact.

Note: To associate a contact with an entity (client, vendor, etc.), use the Contact Associations endpoint.

Base URL

https://{{accountid}}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=customscript_prac_api_contact&deploy=customdeploy_prac_api_contact_v1

HTTP: GET

Gets the contact record for a given internal id.

Required Parameters

Name Value Notes
script customscript_prac_api_contact
deploy customdeploy_prac_api_contact_v1
custparam_id {{integer}} The internal id of the contact you are retrieving.

HTTP: POST

Creates a new contact based on data in JSON payload.

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.

{
    "firstname": "Bill",
    "lastname": "Bender",
    "subsidiary": 2,    
    "email": "billbender.test12@test.com",
    "entityid": "Bill Bender",
    "entityaddress": [
        {
            "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
        },
        {            
            "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.

Note: to update addresses, use Contact Associations endpoint.

Payload

{
    "id": 2966,
    "email": "test1@test.com"
}