I have a sales order in Netsuite and I'm trying to invoice a part of the sales order to have to possibility to invoice multiple time the customer.
I tried differents ways but each time I'm getting an error.
The Sales order have 3 item for the first line and 2 for the second line
URL: {{REST_SERVICES}}/record/v1/salesorder/18657/!transform/invoice
{
"trandate":"2023-11-21",
"startdate":"2023-11-21",
"duedate":"2023-12-31",
"memo": "This is apostman test!",
"externalid":"PO000093",
"salesrep":"209",
"tranId": "T2023000024",
"item":{
"items" : [
{
"item": {
"id" : "578"
},
"quantity" : 1.00
},
{
"item": {
"id" : "578"
},
"quantity" : 1.00
}
]
}
}
=> return:
{
"type": "https://www.rfc-editor.org/rfc/rfc9110.html#section-15.5.1",
"title": "Bad Request",
"status": 400,
"o:errorDetails": [
{
"detail": "Error while accessing a resource. Please choose an item to add.",
"o:errorPath": "item.items[0]",
"o:errorCode": "USER_ERROR"
}
]
}
The ways as per the documentation:
{
"trandate":"2023-11-21",
"startdate":"2023-11-21",
"duedate":"2023-12-31",
"memo": "This is apostman test!",
"externalid":"PO000093",
"salesrep":"209",
"tranId": "T2023000024",
"item":{
"items" : [
{
"orderLine" : 1,
"quantity" : 1.00
},
{
"orderLine" : 2,
"quantity" : 1.00
}
]
}
}
Return:
{
"type": "https://www.rfc-editor.org/rfc/rfc9110.html#section-15.6.1",
"title": "Internal Server Error",
"status": 500,
"o:errorDetails": [
{
"detail": "An unexpected error occurred. Error ID: lod29zoc1fx69m8xhmt5i",
"o:errorCode": "UNEXPECTED_ERROR"
}
]
}
I raised a case at Netsuite and I'm waiting for an answer.
The alternative will be to create a stand alone invoice and link the line to the sales order.
Here is an example: