Global API
...
Requests
Cash Sale
Create
1min
To create a Cash Refund in NetSuite, use action as "createCashSale" and pass the Cash Sale data in the requestJSON under "cashSales".
Note: You can only create one record at a time.
The following is an example of create CashSale where we are setting every possible field (See Cash Sale for the available fields). The response will return the response back from NetSuite, which includes the new NetSuite Cash Sale Id (internalId), plus the newly created Salesforce Cash Sale Id (salesforceID)
Request
Response
1{
2 action=createCashSale,
3 timestamp=1639549899627,
4 validRequest=true,
5 version=1.0,
6 responseJSON={
7 "errors":[],
8 "status":"200",
9 "CashSales":[
10 {
11 "undepFunds":true,
12 "tranId":"11",
13 "tranDate":1601956800,
14 "total":16.0,
15 "terms":null,
16 "taxTotal":0.0,
17 "subTotal":16.0,
18 "subsidiary":{
19 "type":null,
20 "name":"Parent Company",
21 "internalId":"1",
22 "externalId":null
23 },
24 "status":"Not Deposited",
25 "shippingCost":null,
26 "shippingAddress":null,
27 "salesRep":{
28 "type":null,
29 "name":"Navaneeth.D",
30 "internalId":"4",
31 "externalId":null
32 },
33 "salesforceID":"a0B0l00000AvFRGEA3",
34 "otherRefNum":"4343400",
35 "nullFieldList":null,
36 "memo":"Cash Sale 300",
37 "location":{
38 "type":null,
39 "name":"test : Atlanta west",
40 "internalId":"1",
41 "externalId":null
42 },
43 "lastModifiedDate":1639549869,
44 "itemList":{
45 "replaceAll":null,
46 "item":[
47 {
48 "unitsDisplay":null,
49 "taxRate1":"0.0",
50 "taxCode":{
51 "type":null,
52 "name":"VAT_IN:UNDEF-IN",
53 "internalId":"5",
54 "externalId":null
55 },
56 "tax1Amt":0.0,
57 "shipMethod":null,
58 "shipGroup":null,
59 "serialNumbers":null,
60 "revRecStartDate":null,
61 "revRecSchedule":null,
62 "revRecEndDate":null,
63 "rate":"2.00",
64 "quantityRemaining":null,
65 "quantityReceived":null,
66 "quantityBilled":null,
67 "quantity":4.0,
68 "price":{
69 "type":null,
70 "name":"Base Price",
71 "internalId":"1",
72 "externalId":null
73 },
74 "poNum":null,
75 "orderLine":null,
76 "onHand":null,
77 "location":null,
78 "line":2,
79 "jobName":null,
80 "itemReceive":null,
81 "itemName":null,
82 "itemIsFulfilled":null,
83 "item":{
84 "type":null,
85 "name":"Bow",
86 "internalId":"239",
87 "externalId":null
88 },
89 "grossAmt":8.0,
90 "expectedReceiptDate":null,
91 "description":null,
92 "department":null,
93 "customFieldList":{
94 "customField":[
95 {
96 "valueLookup":null,
97 "value":"false",
98 "scriptId":"custcol_checkbox",
99 "internalId":"443",
100 "fieldType":null
101 }
102 ]
103 },
104 "createPo":null,
105 "costEstimateType":null,
106 "costEstimate":null,
107 "classification":null,
108 "amount":8.0
109 }
110 ]
111 },
112 "internalId":"91603",
113 "handlingCost":null,
114 "externalId":null,
115 "exchangeRate":1.0,
116 "entity":{
117 "type":null,
118 "name":"21 Atherton Grocery",
119 "internalId":"362",
120 "externalId":null
121 },
122 "dueDate":null,
123 "discountTotal":0.0,
124 "discountRate":null,
125 "discountItem":null,
126 "department":{
127 "type":null,
128 "name":"PR Department",
129 "internalId":"1",
130 "externalId":null
131 },
132 "customForm":null,
133 "customFieldList":{
134 "customField":[
135 {
136 "valueLookup":null,
137 "value":" - ",
138 "scriptId":"custbody_breadwinner_pc_internal_id",
139 "internalId":"588",
140 "fieldType":null
141 },
142 {
143 "valueLookup":null,
144 "value":"true",
145 "scriptId":"custbody_checkbox",
146 "internalId":"272",
147 "fieldType":null
148 }
149 ]
150 },
151 "currencyRecord":{
152 "type":null,
153 "name":"US Dollars",
154 "internalId":"2",
155 "externalId":null
156 },
157 "currencyName":"US Dollars",
158 "createdFrom":null,
159 "createdDate":1639549869,
160 "classification":{
161 "type":null,
162 "name":"Corporate Sales",
163 "internalId":"5",
164 "externalId":null
165 },
166 "billingAddress":{
167 "zip":"94567",
168 "state":"CA",
169 "internalId":null,
170 "country":"_unitedStates",
171 "city":"Pope Valley",
172 "attention":null,
173 "addrPhone":null,
174 "addressee":null,
175 "addr3":null,
176 "addr2":"Palo Alto",
177 "addr1":null
178 },
179 "account":null
180 }
181 ]
182 }
183}