REST API for transform an Invoice to Return Authorization

Scenario: If the user wants to create the Return Authorization for an invoice but for a particular line item. In this case, we can use the ‘!transform’ method to convert an invoice to an RMA. Here with the endpoint URL, if we provide the value ‘replace=item’, and provide needed line details in the request body.

The API type: POST

Endpoint URL: https://[Account Id].suitetalk.api.netsuite.com/services/rest/record/v1/invoice/[Invoice Id]/!transform/returnAuthorization?replace=item

Request body:

{
    "custbody40": {
        "id": "3",
        "refName": "No Packaging"
    },
    "custbody_jj_type_of_delivery": {
        "id": "7",
        "refName": "Customer Pick Up Warehouse  "
    },
    "item": {
        "items": [
            {
                "quantity": 2,
                "amount": 1539.00,
                "item": {"id": "40474"},
                "location": {
                    "id": "26"
                }
            },
            {
                "quantity": 3,
                "amount": 1539.00,
                "item": {"id": "40474"},
                "location": {
                    "id": "26"
                }
            }
        ]
    }
}


Leave a comment

Your email address will not be published. Required fields are marked *