From a third-party app, I'm trying to report an order as a sales order to NetSuite via the API.
Basic sales order creation can be done through the following API URL
https://{{\_.app_id}}.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder
I want to be able to supply the taxTotal and total fields found in the documentation, but when I include them in the POST json they are not applied to the sales order. I need the tax to be applied at the order level and not on a per item basis.
Documentation https://system.netsuite.com/help/helpcenter/en_US/APIs/REST_API_Browser/record/v1/2023.2/index.html#/definitions/salesOrder
I've tried to format the JSON for the POST request like so
{
"department": {
"id": "9"
},
"custbody_cta_shipping_status": {
"id": "1"
},
"entity": {
"id": "1234",
"refName": "test"
},
"item": {
"items": [
{
"amount": 20,
"item": {
"id": "5576"
},
"quantity": 3
}
]
},
"billingAddress" : {
"addr1": "test address 1",
"addr2": "test unit",
"addrPhone": "123-4567",
"addressee": "test testperson",
"city": "test city",
"country" : {
"id": "US"
},
"state": "NC",
"zip": "12345"
},
"shippingAddress" : {
"addr1": "test address 1",
"addr2": "test unit",
"addrPhone": "123-4567",
"addressee": "test testperson",
"city": "test city",
"country" : {
"id": "US"
},
"state": "NC",
"zip": "28203"
},
"total": 200,
"taxTotal": 10
}
I was expecting the the total to be 200 and a taxTotal field when I run the get response for the order but what I get is the following
"subtotal": 20.0,
"suppressUserEventsAndEmails": "F",
"toBeEmailed": false,
"toBeFaxed": false,
"toBePrinted": false,
"total": 20.0,
"totalCostEstimate": 18.0,
"tranDate": ****,
"tranId": ****,
"updateDropshipOrderQty": "T",
"webStore": "F"
the total seems to be ignoring the value I passed in for total and there is no taxTotal in the response.