Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The NetSuite Pro

The NetSuite Pro Logo The NetSuite Pro Logo

The NetSuite Pro Navigation

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us
Home/ NetSuite RESTlet & REST API Tutorials/NetSuite REST Record API: CRUD Operations with Real Examples

NetSuite REST Record API: CRUD Operations with Real Examples

The NetSuite REST Record API is a built-in REST interface that lets you Create, Read, Update, and Delete standard NetSuite records β€” without writing any SuiteScript. It’s ideal for external systems that need to interact with NetSuite records directly.

What Is the REST Record API?

Unlike RESTlets (which require custom scripts), the REST Record API is a native NetSuite endpoint available for all standard record types including customers, sales orders, invoices, items, and more.

Base URL format:

https://[account-id].suitetalk.api.netsuite.com/services/rest/record/v1/[recordtype]

Authentication

The REST Record API supports both TBA (OAuth 1.0a) and OAuth 2.0. For examples in this tutorial, we’ll use TBA headers.

1. CREATE a Record (POST)

Create a new Customer record:

POST https://[account-id].suitetalk.api.netsuite.com/services/rest/record/v1/customer

Headers:
  Authorization: OAuth realm="[account-id]", ...TBA headers...
  Content-Type: application/json

Body:
{
  "companyName": "Acme Corporation",
  "email": "contact@acme.com",
  "phone": "555-1234",
  "subsidiary": { "id": "1" }
}

On success, NetSuite returns HTTP 204 with a Location header containing the new record’s ID:

Location: /services/rest/record/v1/customer/12345

2. READ a Record (GET)

Retrieve a Customer by internal ID:

GET https://[account-id].suitetalk.api.netsuite.com/services/rest/record/v1/customer/12345

Response example:

{
  "id": "12345",
  "companyName": "Acme Corporation",
  "email": "contact@acme.com",
  "phone": "555-1234",
  "links": [{ "rel": "self", "href": "/services/rest/record/v1/customer/12345" }]
}

GET with Field Selection

Use the fields parameter to limit which fields are returned:

GET /services/rest/record/v1/customer/12345?fields=companyName,email,phone

3. UPDATE a Record (PATCH)

Use PATCH to update specific fields without replacing the whole record:

PATCH https://[account-id].suitetalk.api.netsuite.com/services/rest/record/v1/customer/12345

Body:
{
  "phone": "555-9999",
  "email": "newcontact@acme.com"
}

Returns HTTP 204 on success.

Full Replace with PUT

Use PUT if you want to replace the entire record (omitted fields may be cleared):

PUT https://[account-id].suitetalk.api.netsuite.com/services/rest/record/v1/customer/12345

Body: { full record JSON }

4. DELETE a Record (DELETE)

DELETE https://[account-id].suitetalk.api.netsuite.com/services/rest/record/v1/customer/12345

Returns HTTP 204 on success. Note: some records may have dependencies that prevent deletion.

5. LIST Records (GET with Query)

Retrieve a paginated list of customers:

GET /services/rest/record/v1/customer?limit=10&offset=0

Response includes a links array for pagination and a count field.

Working with Sublists (Line Items)

To add line items to a Sales Order, use the sublist endpoint:

POST /services/rest/record/v1/salesOrder

Body:
{
  "entity": { "id": "12345" },
  "item": {
    "items": [
      {
        "item": { "id": "100" },
        "quantity": 5,
        "amount": 250.00
      }
    ]
  }
}

Error Handling

  • 400 Bad Request β€” Invalid field names or values. Check field IDs in the NetSuite record schema.
  • 401 Unauthorized β€” TBA or OAuth credentials invalid.
  • 404 Not Found β€” Record ID doesn’t exist or you lack permission to view it.
  • 409 Conflict β€” Record is locked by another user or process.

Supported Record Types

Common record types available via REST Record API include: customer, vendor, salesOrder, invoice, purchaseOrder, inventoryItem, employee, project, journalEntry, and many more. See the NetSuite REST API Browser for a full list.

Next Steps

To authenticate securely with the REST Record API, set up Token-Based Authentication (TBA) β€” covered in the next tutorial.

Share
  • Facebook

Sidebar

Ask A Question

Stats

  • Questions 6
  • Answers 6
  • Best Answers 0
  • Users 5
  • Popular
  • Answers
  • Rocky

    Issue in running a client script in NetSuite SuiteScript 2.0 ...

    • 1 Answer
  • admin

    How can I send an email with an attachment in ...

    • 1 Answer
  • admin

    How do I avoid SSS_USAGE_LIMIT_EXCEEDED in a Map/Reduce script?

    • 1 Answer
  • admin
    admin added an answer The issue is usually caused by following Wrong script file… September 14, 2025 at 10:33 pm
  • admin
    admin added an answer Steps to send an Invoice PDF by email: define(['N/email', 'N/render',… August 28, 2025 at 3:05 am
  • admin
    admin added an answer This error means your script hit NetSuite’s governance usage limit… August 28, 2025 at 3:02 am

Top Members

Rocky

Rocky

  • 1 Question
  • 22 Points
Begginer
Sophie1022

Sophie1022

  • 0 Questions
  • 20 Points
Begginer
jmargoli

jmargoli

  • 0 Questions
  • 20 Points
Begginer

Trending Tags

clientscript netsuite scripting suitescript
  • NetSuite Certifications in 2026: Complete Guide for Admins and DevelopersMay 13, 2026
  • N/runtime Module in NetSuite: Complete Guide to Script Context, User Info & Environment in SuiteScriptMay 12, 2026
  • N/email Module in NetSuite: Complete Guide to Sending Emails in SuiteScriptMay 10, 2026
  • Using AI to Write and Debug SuiteScript: A Complete Practical GuideMay 9, 2026
  • Top AI Prompts for NetSuite: Real-World Examples for Admins & DevelopersMay 8, 2026
  • Setting Up Claude AI with NetSuite Using MCP: A Step-by-Step Configuration GuideMay 7, 2026
  • How to Use Claude AI to Simplify Your NetSuite WorkflowMay 7, 2026
  • What No One Tells You About Being a NetSuite Consultant DeveloperMay 7, 2026
  • N/search Module in NetSuite: Complete Guide to Searching Records in SuiteScriptMay 7, 2026
  • N/record Module in NetSuite: Complete Guide to Creating, Loading, and Editing Records in SuiteScriptMay 6, 2026

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help

Footer

Menu

  • Home
  • About Us
  • Tutorials
    • NetSuite Scripting
    • NetSuite Customization
    • NetSuite Integration
    • NetSuite Advanced PDF Templates
    • NetSuite Reporting & Analytics Guide
    • Real-World NetSuite Examples
  • Blog
  • Contact Us

Quick Links

  • NetSuite Scripting
  • NetSuite Customization
  • NetSuite Advanced PDF Template
  • NetSuite Integration
  • NetSuite Reporting & Analytics

Subscribe for NetSuite Insights....

© 2025 The NetSuite Pro. All Rights Reserved