NetSuite REST Azerion icon

NetSuite REST Azerion

Call NetSuite SuiteTalk REST operations.

Actions981

Coupon Code → Insert record

AI-generated

Summary

Insert a new Coupon Code record into NetSuite.

Inputs

  • code — The coupon code entered on a sales transaction to apply the promotion. Coupon codes can be multiple-use or single-use.
  • dateSent — The date the coupon code was sent to the recipient.
  • externalId — External ID for the coupon code.
  • id — Internal ID for the coupon code.
  • Prefer — Server behavior requested by the client. Use 'respond-async' to execute the request asynchronously.
  • promotion — Coupon code promotion reference. Contains internal identifier (id) and external identifier (externalId).
  • recipient — Coupon code recipient reference. Contains internal identifier (id) and external identifier (externalId).
  • refName — Reference name for the coupon code.
  • replace — Names of sublists on this record. All sublist lines will be replaced with lines specified in the request, delimited by comma.
  • used — The coupon has been used by the recipient when checked. Defaults to false.
  • useCount — Used count for the coupon code.
  • X-NetSuite-Idempotency-Key — A user-defined unique idempotency key for asynchronous requests (RFC 4122 UUID format). Only one request executes per unique key; synchronous requests ignore this value.
  • X-NetSuite-PropertyNameValidation — Sets the strictness of property name validation. Options: '' (none), 'Error', 'Warning', 'Ignore'.
  • X-NetSuite-PropertyValueValidation — Sets the strictness of property value validation. Options: '' (none), 'Error', 'Warning', 'Ignore'.
  • authMethod — Authentication method for the NetSuite REST API request. Defaults to OAuth1. Options: OAuth1, OAuth2.
  • isDebugMode — Whether to include full request and response information in the output. Defaults to false.
  • customFields — List of custom fields to attach to the coupon code record. Multiple values allowed; each entry specifies a field name (loaded via loadCustomFields), field type, and a typed value (boolean, dateTime, number, string, or collection for multiSelect/select).

Output shape

The created Coupon Code record response from the NetSuite REST API, containing the record's internal and external identifiers along with submitted field values.

Authentication defaults to OAuth1; switch to OAuth2 if preferred. The operation maps to POST /couponCode. Debug mode includes full request/response details. Idempotency keys ensure asynchronous requests execute only once. Custom fields support standard NetSuite field types.

Links

Discussion