REST Web Services URL Schema and Account-Specific URLs

You can only access REST web services using account-specific domains. Account-specific domains are unique to your account because they contain your account ID as part of the domain name. These domains do not change when your account is moved to a different data center.

When using account-specific domains, dynamic domain discovery is not needed.

The format of an account-specific domain name is the following: <account ID>.<service>.netsuite.com. For example, if your account ID is 123456, your account-specific domain for REST web services is: 123456.suitetalk.api.netsuite.com

You can find the service URL for SuiteTalk (SOAP and REST web services) at Setup > Company > Setup Tasks > Company Information, on the Company URLs subtab. When you build a client application, you must ensure that the service URL is a configurable parameter.

Important:

The examples in this document use demo123 as the account ID. Substitute this with your own account ID.

You can access NetSuite resources through REST web services by using URLs specific to either record or query service.

A URL for a REST resource looks like the following.

The URL structure of a REST request.

The URL consists of the following parts:

  1. Protocol

  2. The account ID of your NetSuite account

  3. The domain name for REST web services

  4. The complete REST API services endpoint

  5. The specific services that is being accessed, for example, record, query, or other service

  6. The service version, which specific to each service

  7. The optional sub-service, for example, metadata-catalog, suiteql, or dataset

  8. Query parameters

The following examples demonstrate the usage of the record and query services.

To use CRUD operations on records, you can use a URL similar to the following:

          PATCH https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/customer/42 

        

For information about CRUD operations, see Working with Records.

Metadata-catalog is a subservice of the record service. To access resource metadata, you can use a URL similar to the following:

          GET https://demo123.suitetalk.api.netsuite.com/services/rest/record/v1/metadata-catalog/?select=customer 

        

For information about using metadata, see Working with Resource Metadata.

dataset is a subservice of the query service. To execute saved datasets, you can use a URL similar to the following:

          GET https://demo123.suitetalk.api.netsuite.com/services/rest/query/v1/dataset/ExampleDataset1/result 

        

For information about saved datasets, see Working with SuiteAnalytics Datasets in REST Web Services.

Suiteql is a subservice of the query service. To execute SuiteQL queries, you can use a URL similar to the following:

          POST https://demo123.suitetalk.api.netsuite.com/services/rest/query/v1/suiteql?limit=10&offset=10 

        

For information about SuiteQL queries in REST web services, see Executing SuiteQL Queries Through REST Web Services.

Related Topics

General Notices