Hello,
We have just enabled SuiteTax in our implementation and we are using the REST API to create sales order in Netsuite from an external system.
We are facing the following challenges trying to make the tax calculation works for us:
- When creating the sales order by using the API we are setting the taxdetailsoverride option to "true" in order to manually enter the tax details lines. However, we are getting an error message saying the the tax reference id is invalid. This is the payload we are sending to the sales order creation endpoint:
{
"entity":{
"id":852532
},
"salesRep":130296,
"cseg_cwgp_revstream":3,
"custbody_so_integration_id":"f1d61428-6bbf-1933-b6e7-516b8c7d0023",
"custbody_so_program":"CTP",
"custbody_so_attending":"Virtual",
"custbody_so_attending_country":null,
"custbody_so_currency":1,
"custbody_so_payment_type":8,
"subsidiary":1,
"custbody_so_payment_plan":"PIF",
"custbody_so_installments":"1 Payments",
"custbody_so_down_payment":0,
"custbody_so_vat_applies":"No VAT",
"custbody_so_vat_amount":0,
"custbody_so_total_tuition":11950,
"custbody_so_total_reductions":650,
"custbody_so_net_tuition":11300,
"memo":"TEST from postman 2",
"taxdetailsoverride": true,
"currency":1,
"item":{
"items":[
{
"item":{
"id":139,
"taxDetailsReference": "line_1",
"refName": "line_1"
}
]
},
"taxDetails": {
"items": [
{
"lineType": "Item",
"netAmount": 1.0,
"taxAmount": 10.0,
"taxBasis": 1.0,
"taxCode": {
"id": "9913"
},
"taxDetailsReference": {
"id": "line_1",
"refName": "line_1"
},
"taxRate": 0.0,
"taxType": "32"
}
]
}
2 Since the creation process failed, we tried to create the SO first and then modify the tax details. However, when we tried to update the tax details line and set a different tax code we get another line added to the tax details (we want the existing one to be updated). We understand that a single item may have multiple tax codes so I'm wondering if there is a way to execute the "Clear All Lines" action available at the Tax Details section in the UI by using the REST API.
Thank you in advance for your kind replies!