# Sales Invoice

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

This API is used to create Sale Bill in LOGIC

### **Authorization Detail**

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

### **Request**

```
               
  {
      "DeliveryAt": "",
      "Remarks1": "",
      "Remarks2": "",
      "Remarks3": "",
      "Insurance_Policy_No": "",
      "Sale_BillNo": "",
      "CreditDays": 0.0,
      "Sale_Bill_Date": "",
      "Declaration_No": "",
      "DeliveryAdd1": "",
      "DeliveryAdd2": "",
      "Cases": null,
      "OrderNo": "1011",
      "OrderDate": "22/06/23",
      "AgentName": "",
      "CostCenter": "",
      "PVTMark": "",
      "Order_Id": "",
      "Tax_Form_Name": "",
      "Gst_State_Code": "",
      "GRNo": "",
      "GRDate": "",
      "BillSeries": "WSL",
      "Bill_Number": 0,
      "Bill_Date": "22/06/2023",
      "WayBillNo": "",
      "CurrencyName": null,
      "ExchangeRate": 0.0,
      "PartyUserCode": "99004477",
      "ActEntryPartyUserCode": "",
      "BranchCode": 2,
      "BranchShortName": "",
      "Godown_Name": "",
      "TransporterName": "",
      "TransportMode": "",
      "RCU_Mem_Prefix": "",
      "RCU_Mem_Number": 0,
      "RCU_Mobile_No": "",
      "RCU_Email": "",
      "RCU_First_Name": "",
      "RCU_Last_Name": "",
      "RCU_State": "",
      "RCU_PinCode": "",
      "RCU_Country": "",
      "RCU_City": "",
      "Billing_Address1": "",
      "Billing_Address2": "",
      "Challan_No": "",
      "Challan_Date": "",
      "CD_P": 0.0,
      "SpCD_P": 0.0,
      "TD_P": 0.0,
      "Freight": 0.0,
      "SpDiscountRs": 0.0,
      "Adjustment_Rs": 0.0,
      "Handling": 0.0,
      "Token_No": "",
      "PaymentMode": "",
      "Tax_Region": "",
      "BillingAddress":{
          "Mobile_No": "9898989898",
          "Contact_Person_Name": "",
          "Company_Name": "",
          "Country_Name": "",
          "City_Name": "",
          "Pin_Code": "",
          "Address_1": "",
          "Address_2": "",
          "State_Name": "",
          "Location_Name": "",
          "Email_Id": "",
          "Phone_Number": ""
      },
      "ShippingAddress":{
          "Mobile_No": "9898989898",
          "Contact_Person_Name": "",
          "Company_Name":"",
          "Country_Name": "",
          "City_Name": "",
          "Pin_Code": "",
          "Address_1": "",
          "Address_2": "",
          "State_Name": "",
          "Location_Name": "",
          "Email_Id": "",
          "Phone_Number": ""
      },
      "LstItems": [
          {
              "LogicUserCode": "TESTITEM101",
              "AddlItemCode": "",
              "Quantity": 5.0,
              "Lot_No": "",
              "Production_Unit": "",
              "Rate": 1200.0,
              "Mrp": 0.0,
              "CD_P": 0.0,
              "TD_P": 0.0,
              "Scheme_Rs": 0.0,
              "AdjustItem_Rs": 0.0,
              "ItemDescription": "",
              "SchemePerUnit": "",
              "LabourPerUnit": "",
              "AdjustmentPerUnit": "",
              "AdjustmentRs": ""
          },
          {
              "LogicUserCode": "TESTITEM102",
              "AddlItemCode": "",
              "Quantity": 5.0,
              "Lot_No": "",
              "Production_Unit": "",
              "Rate": 1500.0,
              "Mrp": 0.0,
              "CD_P": 0.0,
              "TD_P": 0.0,
              "Scheme_Rs": 0.0,
              "AdjustItem_Rs": 0.0,
              "ItemDescription": "",
              "SchemePerUnit": "",
              "LabourPerUnit": "",
              "AdjustmentPerUnit": "",
              "AdjustmentRs": ""
          }  
      ],
      "TenderDetails": [
          {
              "TenderType": "CREDIT",
              "CardName": "",
              "CardNo": "",
              "GiftVoucherNo": "",
              "Amount": 0.0
          }  
      ]    
  }
  
```

| Name                          | Type      | Length | Mandatory     |
| ----------------------------- | --------- | ------ | ------------- |
| Doc\_Code                     | num       | -      | -             |
| DeliveryAt                    | nvarchar  | 30     | -             |
| Remarks1                      | nvarchar  | 150    | -             |
| Remarks2                      | nvarchar  | 150    | -             |
| Remarks3                      | nvarchar  | 150    | -             |
| Insurance\_Policy\_No         | nvarchar  | 25     | -             |
| Sale\_BillNo                  | nvarchar  | 25     | -             |
| CreditDays                    | num       | 25     | -             |
| Sale\_Bill\_Date              | nvarchar  | 25     | -             |
| Declaration\_No               | nvarchar  | 25     | -             |
| DeliveryAdd1                  | nvarchar  | 30     |               |
| DeliveryAdd2                  | nvarchar  | 30     | -             |
| Cases                         | nvarchar  | 6      | -             |
| OrderNo                       | num       | 50     | yes           |
| OrderDate                     | date/time | 50     | -             |
| AgentName                     | nvarchar  | 50     | -             |
| CostCenter                    | nvarchar  | 50     | -             |
| PVTMark                       | nvarchar  | 20     | -             |
| Order\_Id                     | nvarchar  | 50     | -             |
| Gst\_State\_Code              | nvarchar  | 50     | -             |
| GRNo                          | nvarchar  | 50     | -             |
| GRDate                        | date/time | 50     | -             |
| BillSeries                    | nvarchar  | 50     | yes           |
| Bill\_Number                  | nvarchar  | 50     | -             |
| Bill\_Date                    | nvarchar  | 50     | -             |
| WayBillNo                     | nvarchar  | 50     | -             |
| CurrencyName                  | nvarchar  | 50     | -             |
| ExchangeRate                  | nvarchar  | 50     | -             |
| PartyUserCode                 | nvarchar  | 50     | yes           |
| BranchCode                    | num       | 50     | yes           |
| BranchShortName               | nvarchar  | 50     | -             |
| TransporterName               | nvarchar  | 50     | -             |
| TransportMode                 | nvarchar  | 50     | -             |
| RCU\_Mem\_Prefix              | nvarchar  | 80     | -             |
| 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\_Address1             | nvarchar  | 200    | -             |
| Billing\_Address2             | nvarchar  | 200    | -             |
| Challan\_No                   | num       | 8      | -             |
| Challan\_Date                 | date/time | -      | -             |
| CD\_P                         | date/time | -      | -             |
| SpCD\_P                       | date/time | -      | -             |
| TD\_P                         | date/time | -      | -             |
| Freight                       | date/time | -      | -             |
| SpDiscountRs                  | money     | -      | -             |
| Adjustment\_Rs                | money     | -      | -             |
| LogicUserCode \| AddlItemCode | nvarchar  | -      | Yes (Any one) |
| Quantity                      | num       | -      | yes           |

### **Response**

```
 
  {
      "PrintFile": "",
      "Invoice_No": "WSL-58",
      "Order_No": "",
      "Status": true,
      "Message":"Saved Doc No.-WSL-58\r\n Doc Date-22/06/2023",
      "LastSavedCode": 177
  }
  
```


---

# 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/sale/push/sales-invoice.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.
