Cancel Order
HTTP Request
POST https://zylkerfashionstore.zohostore.com/portaluser/orders/returns
JSON Parameters
Parameter | Description |
line_items* | JSONArray: List of line items to be returned |
salesorder_id* | string: Order ID of line items. |
reason* | string: Reason for returning an item. |
Request Example
Copiedcurl -i -X POST \
-H "Cookie:_iamadt_client_portalId= *****;_iambdt_client_portalId= *****;" \
-d \
'{"line_items":[{"item_id":"1787495000000363001","salesorder_item_id":"1787495000000454021","quantity":1}],"reason":"Ordered it by mistake","salesorder_i
'https://zylkerfashionstore.zohostore.com/portaluser/orders/returns'
Success Response
Copied{
"status_code": "0",
"status_message": "success",
"api_kind": "kind#returnOrder",
"payload": {
"JSONString_order_params": "{\"reason\":\"Ordered it bymistake\",\"line_items\":\"[{\\\"salesorder_item_id\\\":1787495000000454021,\\\"quantity\\\
"return_order_zos_response": {
"code": 0,
"message": "Sales Return created successfully",
"salesreturn": {
"date": "2020-02-11",
"reason": "Ordered it by mistake",
"refund_status": "",
"comments": [
{
"date": "2020-02-11",
"transaction_id": "",
"commented_by": "",
"operation_type": "Added",
"purchaseorder_id": "1787495000000456002",
"description": "Sales Cancel Order CAN-00002 created.",
"comment_id": "1787495000000456012",
"transaction_type": "salescancel",
"comment_type": "system",
"date_formatted": "11/02/2020 07:02 PM",
"date_description": "few seconds ago",
"time": "7:02 PM",
"commented_by_id": ""
}
],
"shipped_status": "",
"discount": 0,
"salesreturn_number": "CAN-00002",
"salesreturn_id": "1787495000000456002",
"line_items": [
{
"salesorder_item_id": "1787495000000454021",
"unit": "",
"line_item_id": "1787495000000456010",
"account_id": "1787495000000000388",
"quantity": 1,
"item_id": "1787495000000363001",
"rate": 0,
"name": "Test_prod",
"description": "",
"item_order": 1
}
],
"salesreturn_status": "pending",
"refunded_amount": 0,
"total": 0,
"date_formatted": "11/02/2020",
"refund_status_formatted": "",
"total_formatted": "Rs.0.00",
"salesreturn_type": "return_refund"
}
},
"salesorder_id": "1787495000000454013",
"order_params": {
"reason": "Ordered it by mistake",
"line_items": "[{\"salesorder_item_id\":1787495000000454021,\"quantity\":1,\"item_id\":1787495000000363001}]"
}
}
}
Show full
Show less
Failure Response
Copied{
"status_code": "1",
"status_message": "failure",
"api_kind": "kind#returnOrder",
"error": {
"code": 37014,
"message": "Invalid entries"
},
"developer_message": "Invalid entries"
}
Use this API to cancel an order from user account in portal.