REST Web Services: create-form Operation for Previewing Record State Before Submission
The create-form operation lets REST API consumers preview a fully prepopulated record (including default field values and sublist line IDs) before committing the POST or PATCH, mirroring the way the NetSuite UI initializes records during transformations.
This article documents the create-form operation available in NetSuite's REST Web Services (/services/rest/record/v1/). No specific release version is stated in the source; the feature may have been introduced silently or across multiple releases. Verify availability in your target account before relying on it.
What it does
The create-form operation returns a record payload with every field prepopulated to its default value—including sourced/defaulted line-level data—without actually saving the record. This lets a REST client inspect exactly what NetSuite would set before the integration commits the write.
Key mechanics
- Media type header: Trigger the operation by setting
Accept: application/vnd.oracle.resource+json; type=create-formon aPOSTrequest. - Edit-form variant: For existing records, use
Accept: application/vnd.oracle.resource+json; type=edit-formon aPATCHrequest to preview changes without saving. - Query parameters: Supports the same parameters as a standard
GET:expand,expandSubResources, andfields. Sublists and subrecords are not expanded by default. - Transformation support: Works with the
!transformendpoint. For example,POST /record/v1/salesorder/{id}/!transform/itemfulfillmentwith the create-form header returns a prefilled item fulfillment sourced from the sales order—analogous to clicking "Fulfill" in the UI.
Response structure
The response includes HATEOAS links that tell the client how to proceed:
- Create flow: A
rel: "create"link pointing to a standardPOSTendpoint for final submission. - Transform flow: A
rel: "transform"link pointing to the transformationPOSTendpoint. - Edit flow: A
rel: "edit"link for committing thePATCH.
The body contains the full record JSON with all fields populated by NetSuite's sourcing and defaulting logic.
Example: transform a sales order into an item fulfillment
POST /services/rest/record/v1/salesorder/1/!transform/itemfulfillment with header Accept: application/vnd.oracle.resource+json; type=create-form and an empty body {}. The response returns all item fulfillment fields sourced from sales order 1, including line items and their IDs, without creating the fulfillment record.
Example: preview a new sales order
POST /services/rest/record/v1/salesorder with the create-form header and a partial body such as {"entity":{"id":107},"discountitem":{"id":1}}. NetSuite returns the full sales order with all defaults applied on top of the supplied values.
Metadata
The OpenAPI/Swagger metadata at /services/rest/record/v1/metadata-catalog exposes every transformation endpoint that supports create-form. Look for operations whose requestBody.content includes the application/vnd.oracle.resource+json; type=create-form media type.
What to do
- Audit existing integration code that creates or transforms records via REST. If you currently guess at default values or perform a separate
GETafter creation to discover defaults, the create-form operation can replace that pattern and reduce round-trips. - Use create-form for transformations (e.g., sales order → invoice, sales order → item fulfillment) to replicate UI sourcing logic. This avoids hard-coding field values that NetSuite would normally populate automatically.
- Use edit-form for updates when you need to preview the effect of a
PATCHbefore committing. Send aPATCHwith theedit-formheader, inspect the response, then follow therel: "edit"link to submit. - Expand sublists explicitly — they are collapsed by default. Add
expandSubResources=trueor use theexpandparameter to include line-level detail. - Note: The source does not specify the NetSuite release in which this operation was introduced. Confirm support in your account's REST API metadata catalog before deploying to production.
Source: Oracle NetSuite Release Notes