I'm looking to transform a sales order into a retu...
# suitetalkapi
m
I'm looking to transform a sales order into a return authorization via the SuiteTalk REST API, but am having trouble with the API. I'll thread with more details:
This is the API call I'm trying to make:
Copy code
POST <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:
Copy code
{
  "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
207 Views