# Cancel Sale Order

## Cancel Sale Order :- LOGIC API PUSH - CANCEL SALE ORDER <a href="#heading" id="heading"></a>

This API is used to Cancel Sale Order from LOGIC

### **Authorization Detail**

| Name          | Detail                                         |
| ------------- | ---------------------------------------------- |
| End Point     | <http://demo.logicerp.com/api/CancelSaleOrder> |
| Request Type  | POST                                           |
| Authorization | Basic Auth                                     |
| Username      | Demo                                           |
| Password      | 1                                              |

### **Request**

```
{
    "Branch_Code": "2",
    "BranchShortName": "2",
    "PartyOrderNo": "PSO11211",
    "SaleOrderCode": 1121,
    "OrderItemCodes": 1121,
    "Cancel_Reason": "cancelled By Customer",
    "ListItems": [
        {
            "ItemCode": "1001",
            "CancelQty": 5.0,
            "User_Col_2": 5.0,
            "Item_Order_ID": "1011-2aa21-aw111-23u1ss2"
        },
        {
            "ItemCode": "1002",
            "CancelQty": 2.0,
            "User_Col_2": 5.0,
            "Item_Order_ID": "2011-2aa21-aw111-23uuss2"
        }
    ]
}

```

### **Response**

```
{
    "LastSavedCode": 0,
    "Status": true,
    "Message": "Sale Order Cancelled Sucessfully..."
}

```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/orders/push/cancel-sale-order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
