New Attach and Detach Operations in REST Web Services - NetSuite

New attach and detach operations in NetSuite 2026.1 allow record relationships with REST Web Services, enhancing data integration.

·2 min read·NetSuite 2026.1·View Oracle Docs

Starting in NetSuite 2026.1, new attach and detach operations have been introduced in the REST Web Services framework. This capability enables users to establish or remove relationships between different record instances within NetSuite, significantly enhancing the efficiency and flexibility of data management.

Key Features of Attach and Detach Operations

The attach and detach operations are pivotal for managing relationships between records. Key aspects include:

  • Record Types Supported: Currently, you can use these operations specifically for contact and file records.

  • URL Structure: To execute an operation, you incorporate the record type and IDs directly into the URL. For example:

    /services/rest/record/v1/customer/660/!attach/contact/106
    

    This URL structure indicates that you are attaching a contact record (ID 106) to a customer record (ID 660).

  • HTTP Method: These operations require the POST HTTP method.

  • Optional Parameters: When attaching a contact record, it’s possible to specify optional attributes such as the role assigned to the contact. The request body can be empty if no attributes are set, and it should be formatted as application/json.

Example Usage

Attaching a Contact Record

To attach a contact record to a customer, use the following:

POST .../services/rest/record/v1/customer/660/!attach/contact/106
Content-Type: application/json
{
  "role": {
    "id": "-10"
  }
}

You can also perform this operation with an empty body:

POST .../services/rest/record/v1/customer/660/!attach/contact/106
Content-Type: application/json
{}

Attaching a File Record

Similarly, to attach a file record to an opportunity, you can use:

POST .../services/rest/record/v1/opportunity/379/!attach/file/398

In this scenario, you can also use an empty body since no additional parameters are required.

Detach Operation

The detach operation follows the same URL structure but uses the !detach command. For example:

POST .../services/rest/record/v1/customer/660/!detach/contact/106

Who This Affects

  • Developers: Enhancements in integration capabilities, allowing for more dynamic record management.
  • Administrators: Improved data structure and relationship management, making administration tasks more efficient.
  • Users: Overall, users will benefit from better-defined data relationships, leading to streamlined processes and accuracy in reporting.

Key Takeaways

  • New attach and detach operations enable flexible relationships between record instances in NetSuite.
  • Supports contact and file records, facilitating enhanced integration and data management.
  • Configured via REST Web Services using clear URL structures and POST requests.
  • Optional attributes can be defined during attach operations for tailored data management.
  • This release enhances user interactions and data visibility across NetSuite’s platform.

Frequently Asked Questions (4)

Which record types support the new attach and detach operations in NetSuite 2026.1?
The new attach and detach operations specifically support contact and file records.
How can I attach a contact to a customer using REST Web Services?
You can attach a contact to a customer by executing a POST request, utilizing a URL in the format: /services/rest/record/v1/customer/{customerID}/!attach/contact/{contactID}. You can also specify optional attributes like the role in the JSON formatted request body.
What HTTP method is used for the attach and detach operations?
The POST HTTP method is required for both attach and detach operations within the REST Web Services.
Are there optional parameters available when performing attach operations in NetSuite?
Yes, when attaching a contact record, optional attributes such as the role assigned to the contact can be specified in the request body, formatted as application/json. If no attributes are needed, the body can be left empty.

Weekly Update History (1)

SuiteTalk Web Servicesupdated

Updated Araxis Merge Diff File for the 2025.2 Endpoint with the information that the Araxis diff file for endpoints 2025.1 and 2025.2 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?