SuiteTalk Web ServicesReference

New Attach and Detach Operations in REST Web Services NetSuite

NetSuite 2026.1 introduces new attach and detach operations in REST web services to manage record relationships efficiently.

·2 min read·NetSuite 2026.1·View Oracle Docs

TL;DR Opening

Starting in NetSuite 2026.1, new attach and detach operations in REST web services allow you to define or remove relationships between two record instances, enhancing data connectivity and integration capabilities.

What’s New

The latest update introduces attach and detach operations within the NetSuite REST web services framework. This feature enables developers and administrators to efficiently associate two records, such as linking a contact with a partner or attaching a file to an opportunity. Currently, these operations support only contact and file records.

How It Works

To perform an attach or detach operation, you will need to use the appropriate record types and instance IDs in the URL. The basic structure of the HTTP request for attaching a record looks like this:

/services/rest/record/v1/{recordType}/{recordId}/!attach/{relatedRecordType}/{relatedRecordId}

Examples:

  • Attach a Contact to a Customer:
    POST /services/rest/record/v1/customer/660/!attach/contact/106
    Content-Type: application/json
    {
      "role": { "id": "-10" }
    }
    
  • Attach a File to an Opportunity:
    POST /services/rest/record/v1/opportunity/379/!attach/file/398
    Content-Type: application/json
    {}
    

These requests utilize the POST HTTP method, and the request body permits the inclusion of optional attributes such as the role for contacts. If no attributes are needed, an empty body ({}) can be submitted.

Detach Operations

The detach operations follow a similar structure:

/services/rest/record/v1/{recordType}/{recordId}/!detach/{relatedRecordType}/{relatedRecordId}

External IDs Support

The attach and detach operations also support using external IDs, providing flexibility for developers integrating with external systems.

Who This Affects

  • Developers: Need to implement new integrations using the REST API.
  • Administrators: Responsible for configuring the integrations and ensuring compliance with data management practices.
  • CRM Users: Might utilize this functionality for managing records effectively within the system.

Key Takeaways

  • New attach and detach operations in REST web services enable better record management.
  • Currently, only contact and file records can be attached or detached.
  • These operations support the use of external IDs for enhanced integration capabilities.
  • Request bodies can include optional attributes to customize the attachment, improving flexibility in administration.
  • The HTTP method for these operations is POST, with clear URL structures for execution.

Frequently Asked Questions (4)

Do I need specific permissions to use the new attach and detach operations in NetSuite REST web services?
The article does not specify the exact permissions required for using the new attach and detach operations. It's advisable for administrators to ensure that users have appropriate permissions for the records they are trying to attach or detach.
Are the new attach and detach operations available for all record types in NetSuite?
No, currently these operations are only supported for contact and file records.
Can I use external IDs for the attach and detach operations in REST web services?
Yes, the attach and detach operations support the use of external IDs, which provides flexibility for developers integrating NetSuite with external systems.
What HTTP method is used for the new attach and detach operations?
The attach and detach operations utilize the POST HTTP method.

Weekly Update History (1)

SuiteTalk Web Servicesupdated

Updated SOAP Web Services Version 2025.2 with the information that the 2025.2 WSDL is now available.

View Oracle Docs
Source: New Attach and Detach Operations in REST Web Services Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?