NetSuite REST icon

NetSuite REST

Call NetSuite SuiteTalk REST operations.

Actions979

Coupon Code → Insert record

AI-generated

Summary

Create a new Coupon Code record in NetSuite via a POST call.

Inputs

  • isDebugMode — Include full HTTP request and response details in the output.
  • additionalFields — Key fields for the coupon code such as code, date sent, promotion, recipient, usage status, etc.
  • customFields — User‑defined custom fields to apply to the coupon record.

Output shape

a single record containing the created Coupon Code data (plus optional request/response info when debug mode is enabled).

If debug mode is enabled, the output contains the raw HTTP request and response objects alongside the created record. No pagination is applicable for this operation.

Examples

Example 1: Insert a one‑time coupon that can be used just once.

isDebugMode: false | additionalFields: {code: "SAVE10", dateSent: '2024-08-01T00:00:00Z', used: false, promotion: {id: '1'} } | customFields: []

Example 2: Create a multi‑use coupon with a custom discount field.

isDebugMode: true | additionalFields: {code: "MULTI5", dateSent: '2024-08-15T12:00:00Z', promotion: {id: '2'} } | customFields: [{fieldName: 'discountPercent', fieldType: 'number', value: 5}]

Discussion