Global API
...
Requests
Purchase Order
Update
1min
The following is an example of updating a Purchase Order where we are changing some of the fields. (See Purchase Order for all available fields). The NetSuite Purchase Order Id (internalId) is required to update a Purchase Order.
Note: You can only update one record at a time.
The response returns the complete Purchase Order information but we have shortened the response in our example for ease of reading.
Request
Response
1{
2 action=updatePurchaseOrder,
3 timestamp=1682676021859,
4 validRequest=true,
5 version=1.0,
6 responseJSON={
7 "status": "200",
8 "errors": [],
9 "purchaseOrders": [
10 {
11 "tranId": "14669",
12 "tranDate": 1682650800,
13 "trackingNumbers": null,
14 "total": 999.0,
15 "terms": null,
16 "taxTotal": 0.0,
17 "subTotal": 999.0,
18 "subsidiary": {
19 "type": null,
20 "name": "Parent Company",
21 "internalId": "1",
22 "externalId": null
23 },
24 "status": "Pending Receipt",
25 "source": "Web Services",
26 "shipTo": null,
27 "shippingAddress": null,
28 "shipMethod": null,
29 "shipDate": null,
30 "salesforceID": "a0V1e000003bajtEAA",
31 "otherRefNum": "4343399",
32 "nullFieldList": null,
33 "memo": "PO 30",
34 "location": null,
35 "lastModifiedDate": 1682676018,
36 "itemList": {
37 "replaceAll": null,
38 "item": [
39 {
40 "unitsDisplay": null,
41 "taxRate1": "0.0",
42 "taxCode": {
43 "type": null,
44 "name": "VAT_IN:UNDEF-IN",
45 "internalId": "5",
46 "externalId": null
47 },
48 "tax1Amt": 0.0,
49 "shipMethod": null,
50 "shipGroup": null,
51 "serialNumbers": null,
52 "revRecStartDate": null,
53 "revRecSchedule": null,
54 "revRecEndDate": null,
55 "rate": "999.00",
56 "quantityRemaining": null,
57 "quantityReceived": 0.0,
58 "quantityPicked": null,
59 "quantityPacked": null,
60 "quantityOnHand": null,
61 "quantityFulfilled": null,
62 "quantityCommitted": null,
63 "quantityBilled": 0.0,
64 "quantityBackOrdered": null,
65 "quantityAvailable": null,
66 "quantity": 1.0,
67 "price": null,
68 "poNum": null,
69 "percentComplete": null,
70 "orderLine": null,
71 "onHand": null,
72 "location": null,
73 "line": 4,
74 "jobName": null,
75 "itemReceive": null,
76 "itemName": null,
77 "itemIsFulfilled": null,
78 "item": {
79 "type": null,
80 "name": "Blue Jeans",
81 "internalId": "8823",
82 "externalId": null
83 },
84 "isClosed": false,
85 "grossAmt": 999.0,
86 "expectedReceiptDate": 1682650800,
87 "description": "A weapon for shooting arrows",
88 "department": null,
89 "customFieldList": {
90 "customField": [
91 {
92 "valueLookup": null,
93 "value": "1",
94 "scriptId": "custcol_gh_line_no",
95 "internalId": "175",
96 "fieldType": null
97 },
98 {
99 "valueLookup": null,
100 "value": "false",
101 "scriptId": "custcol_checkbox",
102 "internalId": "443",
103 "fieldType": null
104 },
105 {
106 "valueLookup": null,
107 "value": "ERROR: Field 'custcol7' Not Found",
108 "scriptId": "custcol11",
109 "internalId": "656",
110 "fieldType": null
111 }
112 ]
113 },
114 "createPo": null,
115 "costEstimateType": null,
116 "costEstimate": null,
117 "classification": null,
118 "billingSchedule": null,
119 "amount": 999.0
120 }
121 ]
122 },
123 "internalId": "120761",
124 "fax": null,
125 "externalId": null,
126 "expenseList": null,
127 "exchangeRate": 23.0,
128 "entity": {
129 "type": null,
130 "name": "Edge Communications-1",
131 "internalId": "108018",
132 "externalId": null
133 },
134 "employee": null,
135 "email": null,
136 "dueDate": null,
137 "department": {
138 "type": null,
139 "name": "Space Exploratory",
140 "internalId": "11",
141 "externalId": null
142 },
143 "customForm": {
144 "type": null,
145 "name": "Standard Purchase Order",
146 "internalId": "98",
147 "externalId": null
148 },
149 "customFieldList": {
150 "customField": [
151 {
152 "valueLookup": null,
153 "value": "false",
154 "scriptId": "custbody34",
155 "internalId": "558",
156 "fieldType": null
157 },
158 {
159 "valueLookup": null,
160 "value": " - ",
161 "scriptId": "custbody_breadwinner_pc_internal_id",
162 "internalId": "588",
163 "fieldType": null
164 },
165 {
166 "valueLookup": {
167 "type": null,
168 "name": "C",
169 "internalId": "3",
170 "externalId": null
171 },
172 "value": null,
173 "scriptId": "custbody_customlist",
174 "internalId": "458",
175 "fieldType": null
176 },
177 {
178 "valueLookup": null,
179 "value": "false",
180 "scriptId": "custbody_checkbox",
181 "internalId": "272",
182 "fieldType": null
183 },
184 {
185 "valueLookup": null,
186 "value": "false",
187 "scriptId": "custbody_enableimport",
188 "internalId": "691",
189 "fieldType": null
190 }
191 ]
192 },
193 "currencyRecord": {
194 "type": null,
195 "name": "US Dollars",
196 "internalId": "2",
197 "externalId": null
198 },
199 "currencyName": "US Dollars",
200 "createdFrom": null,
201 "createdDate": 1681902033,
202 "classification": {
203 "type": null,
204 "name": "Rocket Science",
205 "internalId": "9",
206 "externalId": null
207 },
208 "billingAddress": {
209 "zip": null,
210 "state": "TX",
211 "internalId": null,
212 "country": "_india",
213 "city": "Austin",
214 "attention": null,
215 "addrPhone": null,
216 "addressee": "Edge Communications-1",
217 "addr3": null,
218 "addr2": null,
219 "addr1": "312 Constitution Place Austin, TX 78767 USA"
220 }
221 }
222 ]
223 }
224}


Updated 26 Jul 2023
Did this page help you?