NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Charge → Insert or update record

AI-generated

Summary

Insert or update a NetSuite Charge record, identified by its external ID.

Inputs

  • Id (required) — The external identifier of the Charge record to be inserted or updated. This ID is used in the request URL.
  • Additional Fields — Specify standard fields to set or update on the Charge record, such as Amount, Bill Date, Description, Quantity, Rate, or references to related records like Bill To, Billing Item, and Sales Order. This includes options for setting the record's Internal ID or External ID within the record body itself.
  • Custom Fields — Provide values for any custom fields defined on the Charge record, specifying the field name, type (Boolean, Date Time, Multi Select, Number, Select, String), and the corresponding value.
  • Prefer — Controls the server's execution behavior. Choose 'respond-async' to execute the request asynchronously.
  • Replace — A comma-separated list of sublist names whose lines should be entirely replaced by the lines specified in the request body.
  • Replace Selected Fields — If true, fields intended for deletion in the update request, including body fields, must be explicitly listed in the 'Replace' parameter.
  • X - Net Suite - Idempotency - Key — A unique UUID to ensure that asynchronous requests are executed only once. This value is ignored for synchronous requests.
  • X - Net Suite - Property Name Validation — Sets the strictness of property name validation (Error, Warning, or Ignore).
  • X - Net Suite - Property Value Validation — Sets the strictness of property value validation (Error, Warning, or Ignore).

Output shape

A single NetSuite Charge record object.

If 'Debug Mode' is enabled, the output will include the full request and response information. For asynchronous requests (using 'Prefer: respond-async'), the initial output will indicate the request has been accepted for processing, rather than the final record details.

Examples

Example 1: Update the amount and description of an existing Charge record.

Set 'Id' to the existing external identifier. In 'Additional Fields', set 'Amount' and 'Description'.

Example 2: Create a new Charge record with a specific external ID and related entities.

Set 'Id' to the desired new external identifier. In 'Additional Fields', specify the 'Bill To' (by ID or external ID) and 'Billing Item' (by ID or external ID).

Example 3: Asynchronously update a Charge record while ensuring idempotency.

Set 'Id' to the charge's external identifier. In 'Additional Fields', provide fields to update. Set 'Prefer' to 'respond-async' and provide a UUID for 'X - Net Suite - Idempotency - Key'.

Discussion