Skip to content



This function allows you to create an RMA (return) for one or more items (products) in an order.


Miva version 10.00.00 or later.

Request Body Parameters#

Type Description
Order_ID Number Order Id
line_ids Array Array of line ids to Return.

Response Parameters#

Type Description
id Number Id of newly created RMA
order_id Number Order ID
code String RMA Code auto-generated by Miva
status Number RMA Status: 500 - RMA issued or 600 - Returned
dt_issued Timestamp Unix Timestamp for when the RMA was created
dt_recvd Timestamp Unix Timestamp for when the Item was marked as returned. 0 means the item has not been returned.

Example Request#

    "Store_code": "beta",
    "Function": "OrderItemList_CreateReturn",
    "Order_Id": "200292",
    "line_ids": [141, 142]

Example Response#

    "success": 1,
    "data": {
        "id": 5,
        "order_id": 200292,
        "code": "200292-20200713-00005",
        "status": 500,
        "dt_issued": 1594666197,
        "dt_recvd": 0

Error Responses#

Error Code Error Message Error Description
MER-JSN-ORD-00025 Order number not found. Order number not found.
MER-JSN-ORD-00059 No valid order items specified. The line_ids passed don’t match up to any line_ids on the order.
MER-JSN-00023 One or more parameters are invalid Missing line_ids parameter.