# NetSuite Metadata

## List record types for a NetSuite connection

> Returns an array of all record types available via SuiteScript for the given\
> NetSuite connection. The response typically contains \~539 record type descriptors.\
> \
> Pass \`?refreshCache=true\` to bypass the server-side cache and fetch fresh\
> metadata from NetSuite.<br>

```json
{"openapi":"3.1.0","info":{"title":"NetSuite Metadata","version":"1.0.0"},"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"RecordType":{"type":"object","description":"A NetSuite SuiteScript record type descriptor.","properties":{"scriptId":{"type":"string","description":"The SuiteScript identifier for the record type (e.g. `salesorder`)."},"name":{"type":"string","description":"Human-readable display name (e.g. `Sales Order`)."},"permissionId":{"type":"string","description":"NetSuite permission token required to access this record type."},"scriptable":{"type":"boolean","description":"Whether this record type can be scripted via SuiteScript."},"url":{"type":"string","description":"Relative URL path to the record type in NetSuite."},"id":{"type":"string","description":"Internal numeric identifier for the record type."},"userPermission":{"type":"string","description":"The current user's effective permission level for this record type."},"doesNotSupportCreate":{"type":"boolean","description":"When `true`, the record type does not support record creation."},"doesNotSupportDelete":{"type":"boolean","description":"When `true`, the record type does not support record deletion."},"doesNotSupportRTExport":{"type":"boolean","description":"When `true`, the record type does not support real-time export."},"doesNotSupportSearch":{"type":"boolean","description":"When `true`, the record type does not support saved-search-based queries."},"doesNotSupportUpdate":{"type":"boolean","description":"When `true`, the record type does not support record updates."},"hasSubRecord":{"type":"boolean","description":"When `true`, the record type has associated sub-records."},"isSuperType":{"type":"boolean","description":"When `true`, this is a super type that encompasses multiple concrete record types."},"subRecordConfig":{"type":"object","description":"Configuration details for sub-record relationships, if applicable."},"urlparams":{"type":"string","description":"Additional URL parameters appended when accessing this record type."}},"required":["scriptId","name","scriptable","url","id"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/netsuite/metadata/suitescript/connections/{_id}/recordTypes":{"get":{"summary":"List record types for a NetSuite connection","description":"Returns an array of all record types available via SuiteScript for the given\nNetSuite connection. The response typically contains ~539 record type descriptors.\n\nPass `?refreshCache=true` to bypass the server-side cache and fetch fresh\nmetadata from NetSuite.\n","operationId":"listNetSuiteRecordTypes","tags":["NetSuite Metadata"],"parameters":[{"name":"_id","in":"path","description":"The unique identifier of the NetSuite connection","required":true,"schema":{"type":"string","format":"objectId"}},{"name":"refreshCache","in":"query","description":"When `true`, bypasses the server-side metadata cache and fetches fresh\nrecord type data from NetSuite.\n","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successfully retrieved record types","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecordType"}}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"description":"Unprocessable entity. The connection ID does not match a valid NetSuite connection.\n","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}},"required":["errors"]}}}}}}}}}
```

## List fields for a NetSuite record type

> Returns an array of field descriptors for the specified record type on the\
> given NetSuite connection. Fields are grouped by category (e.g. \`Body Field\`)\
> and include their data types.<br>

```json
{"openapi":"3.1.0","info":{"title":"NetSuite Metadata","version":"1.0.0"},"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"RecordTypeField":{"type":"object","description":"A field descriptor for a NetSuite record type.","properties":{"group":{"type":"string","description":"The field group this field belongs to (e.g. `Body Field`, `Address`).\n"},"id":{"type":"string","description":"The internal field identifier (e.g. `entity`, `trandate`)."},"name":{"type":"string","description":"Human-readable field label (e.g. `Customer`, `Date`)."},"type":{"type":"string","description":"The field data type. Common values: `checkbox`, `select`, `text`,\n`currency`, `date`, `datetime`, `email`, `integer`, `multiselect`,\n`percent`, `phone`, `textarea`, `url`.\n"}},"required":["group","id","name","type"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/netsuite/metadata/suitescript/connections/{_id}/recordTypes/{recordType}":{"get":{"summary":"List fields for a NetSuite record type","description":"Returns an array of field descriptors for the specified record type on the\ngiven NetSuite connection. Fields are grouped by category (e.g. `Body Field`)\nand include their data types.\n","operationId":"listNetSuiteRecordTypeFields","tags":["NetSuite Metadata"],"parameters":[{"name":"_id","in":"path","description":"The unique identifier of the NetSuite connection","required":true,"schema":{"type":"string","format":"objectId"}},{"name":"recordType","in":"path","description":"The SuiteScript record type identifier (e.g. `salesorder`, `customer`).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved record type fields","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RecordTypeField"}}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"description":"Unprocessable entity. The record type is invalid or not accessible via\nSuiteScript on this connection. The error includes a `js_exception` code\nand the NetSuite error message.\n","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"]}}},"required":["errors"]}}}}}}}}}
```

## List sublists for a NetSuite record type

> Returns an array of sublists (line-item groups) available on the specified\
> record type for the given NetSuite connection.<br>

```json
{"openapi":"3.1.0","info":{"title":"NetSuite Metadata","version":"1.0.0"},"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Sublist":{"type":"object","description":"A sublist (line-item group) on a NetSuite record type.","properties":{"id":{"type":"string","description":"The internal identifier for the sublist (e.g. `contact`, `item`)."},"name":{"type":"string","description":"Human-readable display name (e.g. `Contacts`, `Items`)."}},"required":["id","name"]},"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"422-unprocessable-entity":{"description":"Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/netsuite/metadata/suitescript/connections/{_id}/recordTypes/{recordType}/sublists":{"get":{"summary":"List sublists for a NetSuite record type","description":"Returns an array of sublists (line-item groups) available on the specified\nrecord type for the given NetSuite connection.\n","operationId":"listNetSuiteRecordTypeSublists","tags":["NetSuite Metadata"],"parameters":[{"name":"_id","in":"path","description":"The unique identifier of the NetSuite connection","required":true,"schema":{"type":"string","format":"objectId"}},{"name":"recordType","in":"path","description":"The SuiteScript record type identifier (e.g. `salesorder`, `customer`).","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved sublists","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Sublist"}}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"$ref":"#/components/responses/422-unprocessable-entity"}}}}}}
```

## List saved searches for a NetSuite connection

> Returns an array of saved searches available on the given NetSuite connection.\
> \
> The \`recordType\` query parameter is accepted but silently ignored by the\
> server -- all saved searches are returned regardless.<br>

```json
{"openapi":"3.1.0","info":{"title":"NetSuite Metadata","version":"1.0.0"},"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"SavedSearch":{"type":"object","description":"A NetSuite saved search reference.","properties":{"id":{"type":"string","description":"The internal saved search ID (e.g. `1305`)."},"name":{"type":"string","description":"Human-readable saved search name (e.g. `AH : Contact Search`)."}},"required":["id","name"]},"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"422-unprocessable-entity":{"description":"Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/netsuite/metadata/suitescript/connections/{_id}/savedSearches":{"get":{"summary":"List saved searches for a NetSuite connection","description":"Returns an array of saved searches available on the given NetSuite connection.\n\nThe `recordType` query parameter is accepted but silently ignored by the\nserver -- all saved searches are returned regardless.\n","operationId":"listNetSuiteSavedSearches","tags":["NetSuite Metadata"],"parameters":[{"name":"_id","in":"path","description":"The unique identifier of the NetSuite connection","required":true,"schema":{"type":"string","format":"objectId"}},{"name":"recordType","in":"query","description":"Accepted but silently ignored. All saved searches are returned regardless\nof this parameter's value.\n","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved saved searches","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SavedSearch"}}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"$ref":"#/components/responses/422-unprocessable-entity"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.celigo.com/api/api-reference/netsuite-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
