# Sale Order

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

This API is used to create Sale Order in LOGIC

### **Authorization Detail**

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

### **Request**

```

{
   "Branch_Short_Name": "",
   "Branch_Code": 2,
   "Order_Prefix": "SO",
   "Order_Date": "21/06/2023",
   "Party_User_code": "2721",
   "Party_Order_No": "SOTESTAPI111",
   "External_Order_ID": "",
   "Remarks": "",
   "Tax_Region": "",
   "RCU_Mem_Prefix": "",
   "RCU_Mem_Number": "",
   "RCU_Mobile_No": "",
   "RCU_Email": "",
   "RCU_First_Name": "",
   "RCU_Last_Name": "",
   "RCU_State": "",
   "RCU_PinCode": "",
   "RCU_Country": "",
   "RCU_City": "",
   "Billing_FirstName": "",
   "Billing_MiddleName": "",
   "Billing_LastName": "",
   "Billing_MobileNo": "",
   "Billing_EmailID": "",
   "Billing_Address1": "",
   "Billing_Address2": "",
   "Billing_Country": "",
   "Billing_State": "",
   "Billing_City": "",
   "Billing_PinCode": "",
   "Billing_ContactPerson": "",
   "Billing_Location": "",
   "Shipping_FirstName": "",
   "Shipping_MiddleName": "",
   "Shipping_LastName": "",
   "Shipping_MobileNo": "",
   "Shipping_EmailID": "",
   "Shipping_Address1": "",
   "Shipping_Address2": "",
   "Shipping_Country": "",
   "Shipping_State": "",
   "Shipping_City": "",
   "Shipping_PinCode": "",
   "Shipping_ContactPerson": "",
   "Shipping_Location": "",
   "Payment_Method": "",
   "Exfactory_Date": "",
   "Delivery_Date": "",
   "Delivery_Time": "",
   "Total_Other_Val_1": 0.0,
   "Total_Other_Val_2": 0.0,
   "Total_Other_Val_3": 0.0,
   "Total_Other_Val_4": 0.0,
   "Total_Other_Val_5": 0.0,
   "Total_Other_Val_6": 0.0,
   "Total_Other_Val_7": 0.0,
   "Indirect_Customer_User_Code": "",
   "Agent_Name": "",
   "Company_Name": "",
   "Transport_Name": "",
   "Indirect_Order_No": "",
   "Indirect_Order_Date": "",
   "Order_Type": "",
   "Party_Order_Date": "",
   "Doc_Through": "",
   "Branch_Order_Date": "",
   "Delv_Vessel_Fight_No": "",
   "AdvanceEntry": {                                       
       "CashAmount": 350.0,
       "CreditCardAmount": 0.0,
       "CreditCardNo": null,
       "ChequeAmount": 0.0,
       "ChequeNo": null,
       "ChequeDate": null,
       "CreditNoteAmount": 0.0
   },
   "ListItems": [
       {
           "LogicUser_Code": "TESTITEM101",
           "AddlItemCode": "",
           "Order_Qty": 5.0,
           "Rate": 1200.0,
           "CD_P": 0.0,
           "TD_P": 0.0,
           "SPCD_P": 0.0,
           "CD_Rs": 0.0,
           "Scheme_Item": 0.0,
           "Adjust_Item": 0.0,
           "Tax_Amount": 0.0,
           "Remarks": "",
           "User_Column_1": "",
           "User_Column_2": "",
           "User_Column_3": "",
           "User_Column_4": "",
           "User_Column_5": "",
           "Item_Order_ID": "",
           "Exfactory_Date": "",
           "Delivery_Date": "",
           "ItemDetCode": "",
           "Lot_Number": ""
       }   
   ]
}

```

| Name                            | Type      | Length | Mandatory     |
| ------------------------------- | --------- | ------ | ------------- |
| Branch\_Code                    | num       |        | yes           |
| Order\_Prefix                   | nvarchar  | 15     | yes           |
| Order\_Date                     | date/time | -      | -             |
| Party\_User\_code               | num       | -      | yes           |
| Party\_Order\_No                | nvarchar  | 100    | yes           |
| External\_Order\_ID             | nvarchar  | -      | -             |
| Remarks                         | nvarchar  | -      | -             |
| RCU\_Mem\_Prefix                | nvarchar  | 8      | -             |
| RCU\_Mem\_Number                | nvarchar  | -      | -             |
| RCU\_Mobile\_No                 | num       | 10     | -             |
| RCU\_Email                      | nvarchar  | 50     | -             |
| RCU\_First\_Name                | nvarchar  | 50     | -             |
| RCU\_Last\_Name                 | nvarchar  | 50     | -             |
| RCU\_State                      | nvarchar  | 50     | -             |
| RCU\_PinCode                    | num       | 10     | -             |
| RCU\_Country                    | nvarchar  | 50     | -             |
| RCU\_City                       | nvarchar  | 50     | -             |
| Billing\_FirstName              | nvarchar  | 50     | -             |
| Billing\_MiddleName             | nvarchar  | 50     | -             |
| Billing\_LastName               | nvarchar  | 50     | -             |
| Billing\_MobileNo               | num       | 10     | -             |
| Billing\_EmailID                | nvarchar  | 50     | -             |
| Billing\_Address1               | nvarchar  | 200    | -             |
| Billing\_Address2               | nvarchar  | 200    | -             |
| Billing\_Country                | nvarchar  | 60     | -             |
| Billing\_State                  | nvarchar  | 60     | -             |
| Billing\_City                   | nvarchar  | 60     | -             |
| Billing\_PinCode                | num       | 60     | -             |
| Billing\_ContactPerson          | nvarchar  | 80     | -             |
| Shipping\_FirstName             | nvarchar  | 50     | -             |
| Shipping\_MiddleName            | nvarchar  | 50     | -             |
| Shipping\_LastName              | nvarchar  | 50     | -             |
| Shipping\_MobileNo              | num       | 10     | -             |
| Shipping\_EmailID               | nvarchar  | 50     | -             |
| Shipping\_Address1              | nvarchar  | 200    | -             |
| Shipping\_Address2              | nvarchar  | 200    | -             |
| Shipping\_Country               | nvarchar  | 50     | -             |
| Shipping\_State                 | nvarchar  | 50     | -             |
| Shipping\_City                  | nvarchar  | 50     | -             |
| Shipping\_PinCode               | num       | 60     | -             |
| Shipping\_ContactPerson         | nvarchar  | 100    | -             |
| Payment\_Method                 | num       | -      | -             |
| Exfactory\_Date                 | date/time | -      | -             |
| Delivery\_Date                  | date/time | -      | -             |
| Total\_Other\_Val\_1            | money     | -      | -             |
| Total\_Other\_Val\_2            | money     | -      | -             |
| Total\_Other\_Val\_3            | money     | -      | -             |
| Total\_Other\_Val\_4            | money     | -      | -             |
| Total\_Other\_Val\_5            | money     | -      | -             |
| Total\_Other\_Val\_6            | money     | -      | -             |
| Total\_Other\_Val\_7            | money     | -      | -             |
| Transport\_Name                 | nvarchar  | -      | -             |
| LogicUser\_Code \| AddlItemCode | nvarchar  | -      | Yes (Any one) |
| Order\_Qty                      | num       | -      | yes           |

### **Response**

```

{
   "LastSavedDocNo": "SO-1456",
   "Order_No": "SO-1456",
   "PrintFile": null,
   "Status": true,
   "Message": "",
   "LastSavedCode": 5022
}

```


---

# 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/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.
