Michael Barney
01/26/2023, 2:59 PMMichael Barney
01/26/2023, 2:59 PMPOST <https://xxxxxxx-sb1.suitetalk.api.netsuite.com/services/rest/record/v1/salesOrder/><sales-order-id>/!transform/returnAuthorization
{
"item": {
"items": [
{
"item": {
"id": "<item-id>"
}
}
]
}
}
According to the REST API browser, that's how the request should look, but I'm getting back this error:
{
"type": "<https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.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"
}
]
}
If I don't specify a request body, it creates a return authorization on every item in the sales order, which isn't exactly what I need. I've verified that the requested sales order ID and item ID exists, and that the item exists on the order. I've also done a GET
on other return authorizations and the json response is formatted the same as the request body I'm sending