Entity Address
NetSuite uses a special "subrecord" for client, contact, and employee (or any entity record) addresses. When creating a new entity, address data can be submitted in the initial payload. If you need to add an address after entity creation, you can use this endpoint.
Note: You can use the NetSuite Records Browser to find the ID of the entity type. In PracticeERP, the display name of the customer record has been changed to "Client," but the internal ID of the record type remains "customer."
Entity type examples
- Client = "customer"
- Contact = "contact"
- Employee = "employee"
- Vendor = "vendor"
Base URL
https://{{accountid}}.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=customscript_prac_api_entityaddress&deploy=customdeploy_prac_api_entityaddress_v1
HTTP: POST
Creates a new entity address based on data in JSON payload.
{
"label": "POST Test Address 1",
"country": "US",
"attention": "Ms. Test",
"addressee": "Ms. Fake",
"addrphone": "6082387643",
"addr1": "321 Fake St.",
"addr2": "Apt. 5",
"zip": "53717",
"city": "Madison",
"state": "WI",
"addrtext": "",
"override": false,
"entity_typeid": "customer",
"entity_internalid": 3382
}
- entity_typeid: The internal ID (string) of the entity type.
- entity_internalid: The internal ID of the client, employee, etc.
HTTP: PUT
Updates an existing record based on data in JSON payload. Only the data included in the request will be updated. The payload must include entity_typeid, entity_internalid, and address_internalid, in addition to the fields you want to update.
{
"entity_typeid": "customer",
"entity_internalid": 3382,
"address_internalid": 2629,
"label": "Example Address Label"
}
HTTP: DELETE
Deletes a single address subrecord.
Required Parameters
| Name | Value | Notes |
|---|---|---|
| script | customscript_prac_api_entityaddress | |
| deploy | customdeploy_prac_api_entityaddress_v1 | |
| custparam_entity_typeid | {{string}} | The internal id of entity type. |
| custparam_entity_internalid | {{string}} | The internal id of entity. |
| custparam_address_internalid | {{string}} | The internal id of address subrecord. |