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
{
action=updatePurchaseOrder,
timestamp=1682676021859,
validRequest=true,
version=1.0,
responseJSON={
"status": "200",
"errors": [],
"purchaseOrders": [
{
"tranId": "14669",
"tranDate": 1682650800,
"trackingNumbers": null,
"total": 999.0,
"terms": null,
"taxTotal": 0.0,
"subTotal": 999.0,
"subsidiary": {
"type": null,
"name": "Parent Company",
"internalId": "1",
"externalId": null
},
"status": "Pending Receipt",
"source": "Web Services",
"shipTo": null,
"shippingAddress": null,
"shipMethod": null,
"shipDate": null,
"salesforceID": "a0V1e000003bajtEAA",
"otherRefNum": "4343399",
"nullFieldList": null,
"memo": "PO 30",
"location": null,
"lastModifiedDate": 1682676018,
"itemList": {
"replaceAll": null,
"item": [
{
"unitsDisplay": null,
"taxRate1": "0.0",
"taxCode": {
"type": null,
"name": "VAT_IN:UNDEF-IN",
"internalId": "5",
"externalId": null
},
"tax1Amt": 0.0,
"shipMethod": null,
"shipGroup": null,
"serialNumbers": null,
"revRecStartDate": null,
"revRecSchedule": null,
"revRecEndDate": null,
"rate": "999.00",
"quantityRemaining": null,
"quantityReceived": 0.0,
"quantityPicked": null,
"quantityPacked": null,
"quantityOnHand": null,
"quantityFulfilled": null,
"quantityCommitted": null,
"quantityBilled": 0.0,
"quantityBackOrdered": null,
"quantityAvailable": null,
"quantity": 1.0,
"price": null,
"poNum": null,
"percentComplete": null,
"orderLine": null,
"onHand": null,
"location": null,
"line": 4,
"jobName": null,
"itemReceive": null,
"itemName": null,
"itemIsFulfilled": null,
"item": {
"type": null,
"name": "Blue Jeans",
"internalId": "8823",
"externalId": null
},
"isClosed": false,
"grossAmt": 999.0,
"expectedReceiptDate": 1682650800,
"description": "A weapon for shooting arrows",
"department": null,
"customFieldList": {
"customField": [
{
"valueLookup": null,
"value": "1",
"scriptId": "custcol_gh_line_no",
"internalId": "175",
"fieldType": null
},
{
"valueLookup": null,
"value": "false",
"scriptId": "custcol_checkbox",
"internalId": "443",
"fieldType": null
},
{
"valueLookup": null,
"value": "ERROR: Field 'custcol7' Not Found",
"scriptId": "custcol11",
"internalId": "656",
"fieldType": null
}
]
},
"createPo": null,
"costEstimateType": null,
"costEstimate": null,
"classification": null,
"billingSchedule": null,
"amount": 999.0
}
]
},
"internalId": "120761",
"fax": null,
"externalId": null,
"expenseList": null,
"exchangeRate": 23.0,
"entity": {
"type": null,
"name": "Edge Communications-1",
"internalId": "108018",
"externalId": null
},
"employee": null,
"email": null,
"dueDate": null,
"department": {
"type": null,
"name": "Space Exploratory",
"internalId": "11",
"externalId": null
},
"customForm": {
"type": null,
"name": "Standard Purchase Order",
"internalId": "98",
"externalId": null
},
"customFieldList": {
"customField": [
{
"valueLookup": null,
"value": "false",
"scriptId": "custbody34",
"internalId": "558",
"fieldType": null
},
{
"valueLookup": null,
"value": " - ",
"scriptId": "custbody_breadwinner_pc_internal_id",
"internalId": "588",
"fieldType": null
},
{
"valueLookup": {
"type": null,
"name": "C",
"internalId": "3",
"externalId": null
},
"value": null,
"scriptId": "custbody_customlist",
"internalId": "458",
"fieldType": null
},
{
"valueLookup": null,
"value": "false",
"scriptId": "custbody_checkbox",
"internalId": "272",
"fieldType": null
},
{
"valueLookup": null,
"value": "false",
"scriptId": "custbody_enableimport",
"internalId": "691",
"fieldType": null
}
]
},
"currencyRecord": {
"type": null,
"name": "US Dollars",
"internalId": "2",
"externalId": null
},
"currencyName": "US Dollars",
"createdFrom": null,
"createdDate": 1681902033,
"classification": {
"type": null,
"name": "Rocket Science",
"internalId": "9",
"externalId": null
},
"billingAddress": {
"zip": null,
"state": "TX",
"internalId": null,
"country": "_india",
"city": "Austin",
"attention": null,
"addrPhone": null,
"addressee": "Edge Communications-1",
"addr3": null,
"addr2": null,
"addr1": "312 Constitution Place Austin, TX 78767 USA"
}
}
]
}
}
Updated 25 Mar 2024
Did this page help you?