Global API
...
Requests
Cash Refund
Create
1min
To create a Cash Refund in NetSuite, use action as "createCashRefund" and pass the Cash Refund data in the requestJSON under "cashRefunds".
Note: You can only create one record at a time.
The following is an example of creating a Cash Refund where we are setting every possible field (see Cash Refund for the available fields). The response will return the response back from NetSuite, which includes NetSuite Cash Refund Id (internalId), plus the newly created Salesforce Cash Refund Id (salesforceID)
Request
Response
1{
2 action=createCashRefund,
3 timestamp= 1682496292136,
4 validRequest=true,
5 version=1.0,
6 responseJSON={
7 "errors": [],
8 "status": "200",
9 "CashRefunds": [{
10 "tranId": "16",
11 "tranDate": 1682478000,
12 "total": 500.0,
13 "taxTotal": 0.0,
14 "subTotal": 500.0,
15 "subsidiary": {
16 "type": null,
17 "name": "Parent Company",
18 "internalId": "1",
19 "externalId": null
20 },
21 "status": null,
22 "shippingCost": 0.0,
23 "salesRep": null,
24 "salesforceID": "a061e000003Ux0KAAS",
25 "refundCheck": false,
26 "otherRefNum": "4343400",
27 "memo": "Cash Refund 300",
28 "location": {
29 "type": null,
30 "name": "Hyderabad : Hi-Tech City",
31 "internalId": "10",
32 "externalId": null
33 },
34 "lastModifiedDate": 1682496289,
35 "job": null,
36 "itemList": {
37 "replaceAll": null,
38 "item": [{
39 "unitsDisplay": null,
40 "taxRate1": "0.0%",
41 "taxCode": {
42 "type": null,
43 "name": "VAT_IN:UNDEF-IN",
44 "internalId": "5",
45 "externalId": null
46 },
47 "tax1Amt": 0.0,
48 "shipMethod": null,
49 "shipGroup": null,
50 "serialNumbers": null,
51 "revRecStartDate": null,
52 "revRecSchedule": null,
53 "revRecEndDate": null,
54 "rate": null,
55 "quantityRemaining": null,
56 "quantityReceived": null,
57 "quantityPicked": null,
58 "quantityPacked": null,
59 "quantityOnHand": null,
60 "quantityFulfilled": null,
61 "quantityCommitted": null,
62 "quantityBilled": null,
63 "quantityBackOrdered": null,
64 "quantityAvailable": null,
65 "quantity": 4.0,
66 "price": {
67 "type": null,
68 "name": null,
69 "internalId": "-1",
70 "externalId": null
71 },
72 "poNum": null,
73 "percentComplete": null,
74 "orderLine": null,
75 "onHand": null,
76 "location": null,
77 "line": 1,
78 "jobName": null,
79 "itemReceive": null,
80 "itemName": null,
81 "itemIsFulfilled": null,
82 "item": {
83 "type": null,
84 "name": "Blue Jeans",
85 "internalId": "8823",
86 "externalId": null
87 },
88 "isClosed": null,
89 "grossAmt": 500.0,
90 "expectedReceiptDate": null,
91 "description": "Anything",
92 "department": null,
93 "customFieldList": {
94 "customField": [{
95 "valueLookup": null,
96 "value": "false",
97 "scriptId": "custcol_checkbox",
98 "internalId": "443",
99 "fieldType": null
100 }]
101 },
102 "createPo": null,
103 "costEstimateType": "_lastPurchasePrice",
104 "costEstimate": 0.0,
105 "classification": null,
106 "billingSchedule": null,
107 "amount": 500.0
108 }]
109 },
110 "internalId": "121459",
111 "handlingCost": 0.0,
112 "externalId": null,
113 "exchangeRate": 1.0,
114 "entity": {
115 "type": null,
116 "name": "CUST1402AT Blue Origin",
117 "internalId": "109118",
118 "externalId": null
119 },
120 "discountTotal": 0.0,
121 "discountRate": null,
122 "discountItem": null,
123 "department": {
124 "type": null,
125 "name": "PR Department",
126 "internalId": "1",
127 "externalId": null
128 },
129 "customForm": {
130 "type": null,
131 "name": "Custom Cash Refund",
132 "internalId": "128",
133 "externalId": null
134 },
135 "customFieldList": {
136 "customField": [{
137 "valueLookup": null,
138 "value": "500",
139 "scriptId": "custbody42",
140 "internalId": "869",
141 "fieldType": null
142 },
143 {
144 "valueLookup": null,
145 "value": " - ",
146 "scriptId": "custbody_breadwinner_pc_internal_id",
147 "internalId": "588",
148 "fieldType": null
149 },
150 {
151 "valueLookup": null,
152 "value": "true",
153 "scriptId": "custbody_enableimport",
154 "internalId": "691",
155 "fieldType": null
156 }
157 ]
158 },
159 "currencyRecord": {
160 "type": null,
161 "name": "INR",
162 "internalId": "1",
163 "externalId": null
164 },
165 "currencyName": "INR",
166 "createdFrom": null,
167 "createdDate": 1682496289,
168 "classification": {
169 "type": null,
170 "name": "Corporate Sales",
171 "internalId": "5",
172 "externalId": null
173 },
174 "applyList": null,
175 "applied": null,
176 "account": {
177 "type": null,
178 "name": "Cheque Account",
179 "internalId": "1",
180 "externalId": null
181 }
182 }]
183}
184}