> For the complete documentation index, see [llms.txt](https://kb.logicerp.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-challans.md).

# Get Sale Challans

Returns your **sale challans** (delivery challans: goods sent to a party before or without an invoice) from Logic ERP, each with its header and item lines. Use it to copy new and changed challans into your own system — normally by asking only for challans **added or changed** since your last call — or to fetch particular challans by their internal number.

Challan **returns** (goods coming back against a challan) have their own endpoint, [Get Sale Challan Returns](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-challan-returns.md), with the same response layout.

### **Endpoint**

| Name          | Detail                                   |
| ------------- | ---------------------------------------- |
| Address       | `https://your-server/api/GetSaleChallan` |
| Method        | `POST`                                   |
| Authorization | Basic Auth                               |

The response and the common request fields are explained in [How Every API Call Works](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/how-every-api-call-works.md).

### **Request fields**

| Field                | Type   | Required | Default | Meaning                                                                                                                                                                                                                 |
| -------------------- | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GlobalModifyCode`   | number | No       | `0`     | Your bookmark in the change log, as described in How Every API Call Works: `0` = from the start (or a period, with `DateFrom`/`DateTo`), a number = only changes after it, `-1` = Logic ERP keeps the bookmark for you. |
| `DateFrom`, `DateTo` | date   | No       | empty   | With `GlobalModifyCode` `0`: a period of **changes** (the date a challan was saved or edited, not the challan date). Send both as `null` when you are not asking for a period. Write them as `yyyy-MM-dd`.              |
| `Doc_Codes`          | text   | No       | empty   | Logic ERP's internal challan numbers (`Vouch_Code` in the response), separated by commas, for example `"5210,5214"`. Returns exactly these challans; the bookmark and period are ignored. Numbers and commas only.      |
| `Branch_Codes_From`  | text   | No       | empty   | Branch codes separated by commas, for example `"2,5"`. Only challans of these branches are returned, in every kind of request. Numbers and commas only.                                                                 |
| `Doc_Num_Like`       | text   | No       | empty   | Only challans whose internal voucher number starts with this text: `CH` followed by the challan prefix, for example `"CHGCH"`. Used with the bookmark or a period.                                                      |

Field names are matched without regard to upper or lower case. Other fields in the request (such as the lookup fields of Get Sale Invoices) are ignored.

### **Rules Logic ERP applies**

* **Only the sale lines.** A challan line is either a sale line or a return line. This endpoint returns every challan that has sale lines, with **only its sale lines** in `LstItems`. A challan that has both kinds of lines is returned by both challan endpoints, each with its own lines; its header totals are always those of the whole challan.
* **One change log for both challan endpoints.** Sale challans and challan returns share one change log. With a bookmark, each call reads up to **200 change-log lines** and returns the challans among them that have sale lines, so a batch can hold none: you then get `"No Record Found."` with `Status: true` and a **higher** `LastGlobalModifyCode` – store it and call again. You have caught up when the message is `"No Pending Sale Challan found..."` and `LastGlobalModifyCode` is the value you sent. Keep a separate bookmark for each challan endpoint.
* **A challan can come back in a later batch.** Every save of a challan adds a line to the change log, so a challan edited after your bookmark is returned again with its current details. Update it in your system; do not add it a second time.
* Challans are **not split by financial year**: `Vouch_Code` is unique across all years, `Doc_Codes` finds a challan of any year, and `DateFrom`/`DateTo` never filter on the challan date.
* With `Doc_Codes` or a period, `LastGlobalModifyCode` comes back as `0` – do not store it as your bookmark.
* **Your Logic ERP team can limit this endpoint** to certain branches in the API site setup; challans of other branches are never returned. It can also **choose which fields are returned**: a field that is not chosen is left out of the response altogether. When no choice has been made – the usual case – every field below is returned.
* A line whose item is missing in Logic ERP is left out. Other links that cannot be found give empty values.
* Challans **deleted** in Logic ERP are not returned, so a deletion does not reach you through this endpoint.
* Challans are not returned in any guaranteed order.
* Dates in the response are text `dd/MM/yyyy`, and times `dd/MM/yyyy hh:mm AM/PM`; a date that is not filled is `""`.
* A link that is not set is shown as `(NIL)` or `NIL`. A challan without a retail customer has `Retail_Cust_Name` `"NIL NIL NIL"` and `Retail_Cust_Mobile_No` `"0"`.

### **Example request**

Next batch after your stored bookmark:

```json
{
  "GlobalModifyCode": 50210,
  "DateFrom": null,
  "DateTo": null,
  "Doc_Codes": "",
  "Branch_Codes_From": ""
}
```

Every challan saved or changed on two days, for branch 2:

```json
{
  "GlobalModifyCode": 0,
  "DateFrom": "2026-07-30",
  "DateTo": "2026-07-31",
  "Branch_Codes_From": "2"
}
```

### **Test it**

Send a request to the Logic ERP **sandbox** (a test company) from this page: open the block below, enter the sandbox user name and password (ask your Logic ERP support team), change the request if you like, and press **Test it**. The example asks for the first batch of the change log. Do not send `"GlobalModifyCode": -1` here – it changes what the sandbox has marked as already sent.

## Get Sale Challans

> Returns your sale challans (delivery challans: goods sent to a party before or without an invoice) from Logic ERP, each with its header and item lines. Use it to copy new and changed challans into your own system — normally by asking only for challans added or changed since your last call — or to fetch particular challans by their internal number.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Sale - Pull"}],"servers":[{"url":"https://demo.logicerp.com/api","description":"Logic ERP sandbox (test company)"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"The user name and password of your API site."}}},"paths":{"/GetSaleChallan":{"post":{"tags":["Sale - Pull"],"operationId":"GetSaleChallan","summary":"Get Sale Challans","description":"Returns your sale challans (delivery challans: goods sent to a party before or without an invoice) from Logic ERP, each with its header and item lines. Use it to copy new and changed challans into your own system — normally by asking only for challans added or changed since your last call — or to fetch particular challans by their internal number.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"GlobalModifyCode":{"type":"integer","description":"Your bookmark in the change log, as described in How Every API Call Works: `0` = from the start (or a period, with `DateFrom`/`DateTo`), a number = only changes after it, `-1` = Logic ERP keeps the bookmark for you."},"DateFrom":{"type":"string","nullable":true,"description":"With `GlobalModifyCode` `0`: a period of changes (the date a challan was saved or edited, not the challan date). Send both as `null` when you are not asking for a period. Write them as `yyyy-MM-dd`."},"DateTo":{"type":"string","nullable":true,"description":"With `GlobalModifyCode` `0`: a period of changes (the date a challan was saved or edited, not the challan date). Send both as `null` when you are not asking for a period. Write them as `yyyy-MM-dd`."},"Doc_Codes":{"type":"string","description":"Logic ERP's internal challan numbers (`Vouch_Code` in the response), separated by commas, for example `\"5210,5214\"`. Returns exactly these challans; the bookmark and period are ignored. Numbers and commas only."},"Branch_Codes_From":{"type":"string","description":"Branch codes separated by commas, for example `\"2,5\"`. Only challans of these branches are returned, in every kind of request. Numbers and commas only."},"Doc_Num_Like":{"type":"string","description":"Only challans whose internal voucher number starts with this text: `CH` followed by the challan prefix, for example `\"CHGCH\"`. Used with the bookmark or a period."}}}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status, Message and GetData.","content":{"application/json":{"schema":{"type":"object","properties":{"GetData":{"type":"array","items":{"type":"object","properties":{"Vouch_Code":{"type":"integer","description":"Logic ERP's internal challan number. Use it in `Doc_Codes`."},"Bill_No":{"type":"string","description":"Challan prefix and number, for example `GCH-154`. Use it as `Challan_No` in Get Sale Invoices to find the invoices made from this challan."},"Bill_Date":{"type":"string","description":"Challan date, `dd/MM/yyyy`."},"Bill_Time":{"type":"string","description":"Date and time the challan was saved, `dd/MM/yyyy hh:mm AM/PM`."},"Account_Code":{"type":"string","description":"Code and name of the account the challan is made to (for a cash challan, the cash account)."},"Account_Name":{"type":"string","description":"Code and name of the account the challan is made to (for a cash challan, the cash account)."},"Customer_Code":{"type":"string","description":"Code and name of the challan's customer party."},"Customer_Name":{"type":"string","description":"Code and name of the challan's customer party."},"Agent_Name":{"type":"string","description":"The challan's agent, or `NIL`."},"Quantity":{"type":"number","description":"Total quantity of the whole challan."},"Gross_Amount":{"type":"number","description":"Gross amount of the whole challan in ₹."},"Net_Amount":{"type":"number","description":"Total of the whole challan in ₹."},"Total_Tax":{"type":"string","description":"Total of the three tax amounts in ₹, written as text, for example `\"3600\"`."},"Branch_Name":{"type":"string","description":"The challan's branch."},"Branch_Code":{"type":"integer","description":"The challan's branch."},"Currency_Name":{"type":"string","description":"Currency, for example `INR`."},"Tax_Region_Name":{"type":"string","description":"The challan's tax region, for example `IGST`."},"Action_Code":{"type":"string","description":"The latest change: `N` = added, `M` = modified."},"Type":{"type":"string","description":"`CH` (sale challan)."},"Branch_Short_Name":{"type":"string","description":"The challan's branch."},"Doc_Prefix":{"type":"string","description":"Challan prefix."},"Doc_Number":{"type":"integer","description":"Challan number within the prefix."},"Retail_Cust_Name":{"type":"string","description":"Retail customer's first, middle and last name, separated by spaces."},"Retail_Cust_Mobile_No":{"type":"string","description":"Retail customer's mobile number and e-mail address."},"Retail_Cust_Email_ID":{"type":"string","description":"Retail customer's mobile number and e-mail address."},"SO_Party_Order_No":{"type":"string","description":"The party's own order number on the sale order the challan lines were made against (when lines come from different orders, the last line's order); empty when none."},"SO_Party_Order_Date":{"type":"string","description":"The party's order date on that same sale order, `dd/MM/yyyy`; empty when none."},"Gr_Number":{"type":"string","description":"Transport GR / LR number and date."},"Gr_Date":{"type":"string","description":"Transport GR / LR number and date."},"Order_No":{"type":"string","description":"Order number and date typed in the challan's other details."},"Order_Date":{"type":"string","description":"Order number and date typed in the challan's other details."},"Remarks1":{"type":"string","description":"Remarks typed on the challan."},"Cases":{"type":"string","description":"Number of cases or packages."},"Transport_Mode":{"type":"string","description":"Mode of transport, as typed."},"DNParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts, or `(NIL)`."},"CNParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts, or `(NIL)`."},"DISPParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts, or `(NIL)`."},"HANDParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts, or `(NIL)`."},"POSTParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts, or `(NIL)`."},"DN_Desc":{"type":"string","description":"Descriptions typed for those amounts."},"CN_Desc":{"type":"string","description":"Descriptions typed for those amounts."},"Display_Desc":{"type":"string","description":"Descriptions typed for those amounts."},"Challan_Date":{"type":"string","description":"Challan reference typed in the other details."},"Challan_no":{"type":"string","description":"Challan reference typed in the other details."},"DD_Chq":{"type":"string","description":"Demand draft / cheque indicator as stored, usually `\"0\"`."},"DD_Chq_No":{"type":"string","description":"Demand draft or cheque number and amount."},"DD_Chq_Amt":{"type":"number","description":"Demand draft or cheque number and amount."},"GR_Number_2":{"type":"string","description":"A second GR / LR number and date."},"GR_Date_2":{"type":"string","description":"A second GR / LR number and date."},"Issue_Time":{"type":"string","description":"Time of issue and time of removal of goods, `dd/MM/yyyy hh:mm AM/PM`; empty when not filled."},"Removal_Time":{"type":"string","description":"Time of issue and time of removal of goods, `dd/MM/yyyy hh:mm AM/PM`; empty when not filled."},"Trans_Name":{"type":"string","description":"Transporter, or `(NIL)`."},"Remarks2":{"type":"string","description":"Remarks typed on the challan."},"Remarks3":{"type":"string","description":"Remarks typed on the challan."},"Shipping_Addres":{"type":"object","properties":{"Code":{"type":"integer","description":"Logic ERP's internal address number; `0` when there is no address."},"Cust_Code":{"type":"integer","description":"Internal number of the customer the address belongs to; `0` when not linked."},"Contact_Person_Name":{"type":"string","description":"Contact person."},"Phone_Number":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Address_1":{"type":"string","description":"Address lines."},"Address_2":{"type":"string","description":"Address lines."},"Driving_Directions":{"type":"string","description":"Directions."},"City_Name":{"type":"string","description":"City, state, country and PIN code."},"Code_Type":{"type":"string","description":"Kind of address, as stored."},"Country_Name":{"type":"string","description":"City, state, country and PIN code."},"Email_Id":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Location_Code":{"type":"integer","description":"Location, when used."},"Mobile_No":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Pin_Code":{"type":"string","description":"City, state, country and PIN code."},"State_Name":{"type":"string","description":"City, state, country and PIN code."},"Company_Name":{"type":"string","description":"Company name at the address."},"Latitude":{"type":"string","description":"Map position, when kept."},"Longitude":{"type":"string","description":"Map position, when kept."},"Address_ID":{"type":"string","nullable":true,"description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Complete_Address":{"type":"string","description":"The full address in one text, when kept."},"External_Address_Id":{"type":"string","description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Location_Name":{"type":"string","nullable":true,"description":"Location, when used."},"State_Code":{"type":"integer","description":"Internal number of the state."},"Country_Code":{"type":"integer","description":"Always `0`."},"DisplayAddress":{"type":"string","description":"Mobile number and contact person joined with `-`."},"DeleteAddress":{"type":"boolean","description":"Always `false` here – ignore."},"SameAsShippingAddress":{"type":"boolean","description":"Always `false` here – ignore."},"Gst_No":{"type":"string","nullable":true,"description":"GSTIN at the address."}},"description":"The delivery address on the challan (the name is spelt this way). Same fields as on Get Sale Invoices; an empty object with `Code` `0` when there is none."},"Billing_Address":{"type":"object","properties":{"Code":{"type":"integer","description":"Logic ERP's internal address number; `0` when there is no address."},"Cust_Code":{"type":"integer","description":"Internal number of the customer the address belongs to; `0` when not linked."},"Contact_Person_Name":{"type":"string","description":"Contact person."},"Phone_Number":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Address_1":{"type":"string","description":"Address lines."},"Address_2":{"type":"string","description":"Address lines."},"Driving_Directions":{"type":"string","description":"Directions."},"City_Name":{"type":"string","description":"City, state, country and PIN code."},"Code_Type":{"type":"string","description":"Kind of address, as stored."},"Country_Name":{"type":"string","description":"City, state, country and PIN code."},"Email_Id":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Location_Code":{"type":"integer","description":"Location, when used."},"Mobile_No":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Pin_Code":{"type":"string","description":"City, state, country and PIN code."},"State_Name":{"type":"string","description":"City, state, country and PIN code."},"Company_Name":{"type":"string","description":"Company name at the address."},"Latitude":{"type":"string","description":"Map position, when kept."},"Longitude":{"type":"string","description":"Map position, when kept."},"Address_ID":{"type":"string","nullable":true,"description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Complete_Address":{"type":"string","description":"The full address in one text, when kept."},"External_Address_Id":{"type":"string","description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Location_Name":{"type":"string","nullable":true,"description":"Location, when used."},"State_Code":{"type":"integer","description":"Internal number of the state."},"Country_Code":{"type":"integer","description":"Always `0`."},"DisplayAddress":{"type":"string","description":"Mobile number and contact person joined with `-`."},"DeleteAddress":{"type":"boolean","description":"Always `false` here – ignore."},"SameAsShippingAddress":{"type":"boolean","description":"Always `false` here – ignore."},"Gst_No":{"type":"string","nullable":true,"description":"GSTIN at the address."}},"description":"The billing address on the challan; same fields."},"LstItems":{"type":"array","items":{"type":"object","properties":{"SL_Txn_Code":{"type":"integer","description":"Logic ERP's internal number of the challan line."},"Lot_Code":{"type":"integer","description":"Internal number and lot number of the lot (batch)."},"Lot_Number":{"type":"string","description":"Internal number and lot number of the lot (batch)."},"AddlItemCode":{"type":"string","description":"The item's additional code, for example a barcode."},"LogicUser_Code":{"type":"string","description":"Item code as shown in Logic ERP (`UserCode` in Get Item Master)."},"PackName":{"type":"string","description":"Pack (size) of the item."},"ItemHDName":{"type":"string","description":"Item name with its colour, as shown in the item master."},"ItemName":{"type":"string","description":"Item name, as on Get Sale Invoices."},"ItemDescription_1":{"type":"string","description":"Item description."},"CF_1":{"type":"number","description":"The item's conversion factors."},"CF_2":{"type":"number","description":"The item's conversion factors."},"CF_3":{"type":"number","description":"The item's conversion factors."},"Weight":{"type":"number","description":"Always `0`."},"Item_Sale_Rate":{"type":"number","description":"MRP, sale rate and purchase rate in the item master today."},"Item_Sp_Rate_1":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_2":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_3":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_4":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_5":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Pur_Rate":{"type":"number","description":"MRP, sale rate and purchase rate in the item master today."},"Item_MRP":{"type":"number","description":"MRP, sale rate and purchase rate in the item master today."},"HSN_Code":{"type":"string","description":"HSN code of the item, or `(NIL)`."},"Quantity":{"type":"number","description":"Total quantity of the whole challan."},"Lot_MRP":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Rate":{"type":"number","description":"Rate and net rate per unit."},"Tax_Amt_1":{"type":"number","description":"Tax amounts of the three tax slots, in ₹, as on Get Sale Invoices (`Tax_Amt_3` includes `Surcharge`)."},"Tax_Amt_3":{"type":"number","description":"Tax amounts of the three tax slots, in ₹, as on Get Sale Invoices (`Tax_Amt_3` includes `Surcharge`)."},"Gross_Amt":{"type":"number","description":"Quantity × rate, in ₹."},"Net_Amt":{"type":"number","description":"Line total, in ₹."},"Round_Amt":{"type":"number","description":"Rounding on the line."},"Net_Rate":{"type":"number","description":"Rate and net rate per unit."},"CD":{"type":"number","description":"Cash, trade and special cash discount amounts in ₹ (a discount is negative)."},"TD":{"type":"number","description":"Cash, trade and special cash discount amounts in ₹ (a discount is negative)."},"SP_CD":{"type":"number","description":"Cash, trade and special cash discount amounts in ₹ (a discount is negative)."},"Scheme_Unit":{"type":"number","description":"Scheme discount per unit and in rupees."},"Scheme_Rs":{"type":"number","description":"Scheme discount per unit and in rupees."},"CD_Per":{"type":"number","description":"The percentages of those discounts."},"Tax_1":{"type":"number","description":"Tax rates (%) of the three tax slots of the line."},"Tax_2":{"type":"number","description":"Tax rates (%) of the three tax slots of the line."},"Tax_3":{"type":"number","description":"Tax rates (%) of the three tax slots of the line."},"TD_Per":{"type":"number","description":"The percentages of those discounts."},"SP_CD_Per":{"type":"number","description":"The percentages of those discounts."},"Sale_Or_SR":{"type":"string","description":"`SL`."},"Lot_Sale_Rate":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Lot_Pur_Rate":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Lot_Basic_Rate":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Lot_SP_Rate1":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate2":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate3":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate4":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate5":{"type":"number","description":"Special rates 1–5 of the lot."},"SO_Item_Order_ID":{"type":"string","description":"The order-line ID of the sale order line this line was made from; empty when none."},"Tax_Amt_2":{"type":"number","description":"Tax amounts of the three tax slots, in ₹, as on Get Sale Invoices (`Tax_Amt_3` includes `Surcharge`)."},"Tax3WithoutSur":{"type":"number","description":"Tax of slot 3 without surcharge, and the surcharge."},"Surcharge":{"type":"number","description":"Tax of slot 3 without surcharge, and the surcharge."},"ExciseUnit":{"type":"number","description":"Charges added on the line, in ₹."},"AdjustPerUnit":{"type":"number","description":"Other adjustments and special discount on the line."},"AdjustItem":{"type":"number","description":"Other adjustments and special discount on the line."},"Freight":{"type":"number","description":"Charges added on the line, in ₹."},"AdjustmentRupees":{"type":"number","description":"Other adjustments and special discount on the line."},"SPDiscount":{"type":"number","description":"Other adjustments and special discount on the line."},"DebitNote":{"type":"number","description":"Charges added on the line, in ₹."},"CreditNote":{"type":"number","description":"Charges added on the line, in ₹."},"Display":{"type":"number","description":"Charges added on the line, in ₹."},"Handling":{"type":"number","description":"Charges added on the line, in ₹."},"Postage":{"type":"number","description":"Charges added on the line, in ₹."},"ExcisePercentage":{"type":"number","description":"Despite its name, an amount: the market-fee charge on the line."},"Labour":{"type":"number","description":"Charges added on the line, in ₹."}}},"description":"The sale lines. See below."}}},"nullable":true,"description":"The records found; null when the call failed or nothing was found - read Message."},"Status":{"type":"boolean","description":"See the Status rules on this page and on How Every API Call Works."},"Message":{"type":"string","description":"Why the call failed, or a note. The reason may be followed by technical detail - read the first line."},"LastGlobalModifyCode":{"type":"integer","description":"The change-log bookmark (see How Every API Call Works)."},"resultSize":{"type":"string","description":"Size of the answer, for example \"2 KB\"."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response fields**

Each item in `GetData` is one challan:

| Field                                                                                | Type               | Meaning                                                                                                                                                                                                                                                                                    |
| ------------------------------------------------------------------------------------ | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Vouch_Code`                                                                         | number             | Logic ERP's internal challan number. Use it in `Doc_Codes`.                                                                                                                                                                                                                                |
| `Bill_No`                                                                            | text               | Challan prefix and number, for example `GCH-154`. Use it as `Challan_No` in [Get Sale Invoices](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-invoices.md) to find the invoices made from this challan.                 |
| `Doc_Prefix`                                                                         | text               | Challan prefix.                                                                                                                                                                                                                                                                            |
| `Doc_Number`                                                                         | number             | Challan number within the prefix.                                                                                                                                                                                                                                                          |
| `Bill_Date`                                                                          | date               | Challan date, `dd/MM/yyyy`.                                                                                                                                                                                                                                                                |
| `Bill_Time`                                                                          | text               | Date and time the challan was saved, `dd/MM/yyyy hh:mm AM/PM`.                                                                                                                                                                                                                             |
| `Account_Code`, `Account_Name`                                                       | text               | Code and name of the account the challan is made to (for a cash challan, the cash account).                                                                                                                                                                                                |
| `Customer_Code`, `Customer_Name`                                                     | text               | Code and name of the challan's customer party.                                                                                                                                                                                                                                             |
| `Agent_Name`                                                                         | text               | The challan's agent, or `NIL`.                                                                                                                                                                                                                                                             |
| `Quantity`                                                                           | number             | Total quantity of the whole challan.                                                                                                                                                                                                                                                       |
| `Gross_Amount`                                                                       | number             | Gross amount of the whole challan in ₹.                                                                                                                                                                                                                                                    |
| `Net_Amount`                                                                         | number             | Total of the whole challan in ₹.                                                                                                                                                                                                                                                           |
| `Total_Tax`                                                                          | text               | Total of the three tax amounts in ₹, written as text, for example `"3600"`.                                                                                                                                                                                                                |
| `Branch_Code`, `Branch_Name`, `Branch_Short_Name`                                    | number, text, text | The challan's branch.                                                                                                                                                                                                                                                                      |
| `Currency_Name`                                                                      | text               | Currency, for example `INR`.                                                                                                                                                                                                                                                               |
| `Tax_Region_Name`                                                                    | text               | The challan's tax region, for example `IGST`.                                                                                                                                                                                                                                              |
| `Action_Code`                                                                        | text               | The latest change: `N` = added, `M` = modified.                                                                                                                                                                                                                                            |
| `Type`                                                                               | text               | `CH` (sale challan).                                                                                                                                                                                                                                                                       |
| `Retail_Cust_Name`                                                                   | text               | Retail customer's first, middle and last name, separated by spaces.                                                                                                                                                                                                                        |
| `Retail_Cust_Mobile_No`, `Retail_Cust_Email_ID`                                      | text               | Retail customer's mobile number and e-mail address.                                                                                                                                                                                                                                        |
| `SO_Party_Order_No`                                                                  | text               | The party's own order number on the sale order the challan lines were made against (when lines come from different orders, the last line's order); empty when none.                                                                                                                        |
| `SO_Party_Order_Date`                                                                | date               | The party's order date on that same sale order, `dd/MM/yyyy`; empty when none.                                                                                                                                                                                                             |
| `Order_No`, `Order_Date`                                                             | text, date         | Order number and date typed in the challan's other details.                                                                                                                                                                                                                                |
| `Challan_no`, `Challan_Date`                                                         | text, date         | Challan reference typed in the other details.                                                                                                                                                                                                                                              |
| `Gr_Number`, `Gr_Date`                                                               | text, date         | Transport GR / LR number and date.                                                                                                                                                                                                                                                         |
| `GR_Number_2`, `GR_Date_2`                                                           | text, date         | A second GR / LR number and date.                                                                                                                                                                                                                                                          |
| `Cases`                                                                              | text               | Number of cases or packages.                                                                                                                                                                                                                                                               |
| `Transport_Mode`                                                                     | text               | Mode of transport, as typed.                                                                                                                                                                                                                                                               |
| `Trans_Name`                                                                         | text               | Transporter, or `(NIL)`.                                                                                                                                                                                                                                                                   |
| `Issue_Time`, `Removal_Time`                                                         | text               | Time of issue and time of removal of goods, `dd/MM/yyyy hh:mm AM/PM`; empty when not filled.                                                                                                                                                                                               |
| `Remarks1`, `Remarks2`, `Remarks3`                                                   | text               | Remarks typed on the challan.                                                                                                                                                                                                                                                              |
| `DNParty_Name`, `CNParty_Name`, `DISPParty_Name`, `HANDParty_Name`, `POSTParty_Name` | text               | Accounts used for the debit note, credit note, display, handling and postage amounts, or `(NIL)`.                                                                                                                                                                                          |
| `DN_Desc`, `CN_Desc`, `Display_Desc`                                                 | text               | Descriptions typed for those amounts.                                                                                                                                                                                                                                                      |
| `DD_Chq`                                                                             | text               | Demand draft / cheque indicator as stored, usually `"0"`.                                                                                                                                                                                                                                  |
| `DD_Chq_No`, `DD_Chq_Amt`                                                            | text, number       | Demand draft or cheque number and amount.                                                                                                                                                                                                                                                  |
| `Shipping_Addres`                                                                    | object             | The delivery address on the challan (the name is spelt this way). Same fields as on [Get Sale Invoices](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-invoices.md); an empty object with `Code` `0` when there is none. |
| `Billing_Address`                                                                    | object             | The billing address on the challan; same fields.                                                                                                                                                                                                                                           |
| `LstItems`                                                                           | list               | The sale lines. See below.                                                                                                                                                                                                                                                                 |

**`LstItems`** — one entry per sale line of the challan:

| Field                                                                                          | Type         | Meaning                                                                                                                                                                                           |
| ---------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SL_Txn_Code`                                                                                  | number       | Logic ERP's internal number of the challan line.                                                                                                                                                  |
| `Lot_Code`, `Lot_Number`                                                                       | number, text | Internal number and lot number of the lot (batch).                                                                                                                                                |
| `LogicUser_Code`                                                                               | text         | Item code as shown in Logic ERP (`UserCode` in [Get Item Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md)). |
| `AddlItemCode`                                                                                 | text         | The item's additional code, for example a barcode.                                                                                                                                                |
| `PackName`                                                                                     | text         | Pack (size) of the item.                                                                                                                                                                          |
| `ItemName`                                                                                     | text         | Item name, as on Get Sale Invoices.                                                                                                                                                               |
| `ItemHDName`                                                                                   | text         | Item name with its colour, as shown in the item master.                                                                                                                                           |
| `ItemDescription_1`                                                                            | text         | Item description.                                                                                                                                                                                 |
| `CF_1`, `CF_2`, `CF_3`                                                                         | number       | The item's conversion factors.                                                                                                                                                                    |
| `Weight`                                                                                       | number       | Always `0`.                                                                                                                                                                                       |
| `HSN_Code`                                                                                     | text         | HSN code of the item, or `(NIL)`.                                                                                                                                                                 |
| `Quantity`                                                                                     | number       | Quantity on the line.                                                                                                                                                                             |
| `Rate`, `Net_Rate`                                                                             | number       | Rate and net rate per unit.                                                                                                                                                                       |
| `Gross_Amt`                                                                                    | number       | Quantity × rate, in ₹.                                                                                                                                                                            |
| `Net_Amt`                                                                                      | number       | Line total, in ₹.                                                                                                                                                                                 |
| `Round_Amt`                                                                                    | number       | Rounding on the line.                                                                                                                                                                             |
| `Tax_Amt_1`, `Tax_Amt_2`, `Tax_Amt_3`                                                          | number       | Tax amounts of the three tax slots, in ₹, as on Get Sale Invoices (`Tax_Amt_3` includes `Surcharge`).                                                                                             |
| `Tax_1`, `Tax_2`, `Tax_3`                                                                      | number       | Tax rates (%) of the three tax slots of the line.                                                                                                                                                 |
| `Tax3WithoutSur`, `Surcharge`                                                                  | number       | Tax of slot 3 without surcharge, and the surcharge.                                                                                                                                               |
| `CD`, `TD`, `SP_CD`                                                                            | number       | Cash, trade and special cash discount amounts in ₹ (a discount is negative).                                                                                                                      |
| `CD_Per`, `TD_Per`, `SP_CD_Per`                                                                | number       | The percentages of those discounts.                                                                                                                                                               |
| `Scheme_Unit`, `Scheme_Rs`                                                                     | number       | Scheme discount per unit and in rupees.                                                                                                                                                           |
| `AdjustPerUnit`, `AdjustItem`, `AdjustmentRupees`, `SPDiscount`                                | number       | Other adjustments and special discount on the line.                                                                                                                                               |
| `Freight`, `DebitNote`, `CreditNote`, `Display`, `Handling`, `Postage`, `Labour`, `ExciseUnit` | number       | Charges added on the line, in ₹.                                                                                                                                                                  |
| `ExcisePercentage`                                                                             | number       | Despite its name, an amount: the market-fee charge on the line.                                                                                                                                   |
| `Sale_Or_SR`                                                                                   | text         | `SL`.                                                                                                                                                                                             |
| `SO_Item_Order_ID`                                                                             | text         | The order-line ID of the sale order line this line was made from; empty when none.                                                                                                                |
| `Item_MRP`, `Item_Sale_Rate`, `Item_Pur_Rate`                                                  | number       | MRP, sale rate and purchase rate in the item master **today**.                                                                                                                                    |
| `Item_Sp_Rate_1` … `Item_Sp_Rate_5`                                                            | number       | Special rates 1–5 in the item master today.                                                                                                                                                       |
| `Lot_MRP`, `Lot_Sale_Rate`, `Lot_Pur_Rate`, `Lot_Basic_Rate`                                   | number       | MRP, sale, purchase and basic rate of the lot.                                                                                                                                                    |
| `Lot_SP_Rate1` … `Lot_SP_Rate5`                                                                | number       | Special rates 1–5 of the lot.                                                                                                                                                                     |

Compared with Get Sale Invoices, a challan has no `New_Bill_No`, `Bill_Cancelled`, sale order number and date (`SO_Order_No`, `SO_Order_Date`), payment, credit note, retail-customer membership, e-invoice, TCS, cost centre or discount-total fields, and its lines have no lot supplier, godown or agent fields.

### **Example response**

```json
{
  "GetData": [
    {
      "Vouch_Code": 5210,
      "Bill_No": "GCH-154",
      "Bill_Date": "30/07/2026",
      "Bill_Time": "30/07/2026 11:20 AM",
      "Account_Code": "C1045",
      "Account_Name": "SHREE GANESH TEXTILES",
      "Customer_Code": "C1045",
      "Customer_Name": "SHREE GANESH TEXTILES",
      "Agent_Name": "NIL",
      "Quantity": 10.0,
      "Gross_Amount": 12000.0,
      "Net_Amount": 12600.0,
      "Total_Tax": "600",
      "Branch_Name": "LUDHIANA MAIN",
      "Branch_Code": 2,
      "Currency_Name": "INR",
      "Tax_Region_Name": "CGST/SGST",
      "Action_Code": "N",
      "Type": "CH",
      "Branch_Short_Name": "LDH",
      "Doc_Prefix": "GCH",
      "Doc_Number": 154,
      "Retail_Cust_Name": "NIL NIL NIL",
      "Retail_Cust_Mobile_No": "0",
      "Retail_Cust_Email_ID": "",
      "SO_Party_Order_No": "PO-7781",
      "SO_Party_Order_Date": "28/07/2026",
      "Gr_Number": "",
      "Gr_Date": "",
      "Order_No": "",
      "Order_Date": "",
      "Remarks1": "",
      "Cases": "",
      "Transport_Mode": "",
      "DNParty_Name": "(NIL)",
      "CNParty_Name": "(NIL)",
      "DISPParty_Name": "(NIL)",
      "HANDParty_Name": "(NIL)",
      "POSTParty_Name": "(NIL)",
      "DN_Desc": "",
      "CN_Desc": "",
      "Display_Desc": "",
      "Challan_Date": "",
      "Challan_no": "",
      "DD_Chq": "0",
      "DD_Chq_No": "",
      "DD_Chq_Amt": 0.0,
      "GR_Number_2": "",
      "GR_Date_2": "",
      "Issue_Time": "",
      "Removal_Time": "",
      "Trans_Name": "PUNJAB ROADWAYS",
      "Remarks2": "",
      "Remarks3": "",
      "Shipping_Addres": {
        "Code": 0, "Cust_Code": 0, "Contact_Person_Name": "", "Phone_Number": "", "Address_1": "", "Address_2": "",
        "Driving_Directions": "", "City_Name": "", "Code_Type": "", "Country_Name": "", "Email_Id": "", "Location_Code": 0,
        "Mobile_No": "", "Pin_Code": "", "State_Name": "", "Company_Name": "", "Latitude": "", "Longitude": "",
        "Address_ID": null, "Complete_Address": "", "External_Address_Id": "", "Location_Name": null, "State_Code": 0,
        "Country_Code": 0, "DisplayAddress": "-", "DeleteAddress": false, "SameAsShippingAddress": false, "Gst_No": null
      },
      "Billing_Address": {
        "Code": 0, "Cust_Code": 0, "Contact_Person_Name": "", "Phone_Number": "", "Address_1": "", "Address_2": "",
        "Driving_Directions": "", "City_Name": "", "Code_Type": "", "Country_Name": "", "Email_Id": "", "Location_Code": 0,
        "Mobile_No": "", "Pin_Code": "", "State_Name": "", "Company_Name": "", "Latitude": "", "Longitude": "",
        "Address_ID": null, "Complete_Address": "", "External_Address_Id": "", "Location_Name": null, "State_Code": 0,
        "Country_Code": 0, "DisplayAddress": "-", "DeleteAddress": false, "SameAsShippingAddress": false, "Gst_No": null
      },
      "LstItems": [
        {
          "SL_Txn_Code": 1051,
          "Lot_Code": 24120,
          "Lot_Number": "L-2604",
          "AddlItemCode": "8901234567012",
          "LogicUser_Code": "KUR-1001-M",
          "PackName": "M",
          "ItemHDName": "KURTA BLUE",
          "ItemName": "KURTA",
          "ItemDescription_1": "Cotton kurta",
          "CF_1": 1.0,
          "CF_2": 1.0,
          "CF_3": 1.0,
          "Weight": 0.0,
          "Item_Sale_Rate": 1200.0,
          "Item_Sp_Rate_1": 0.0,
          "Item_Sp_Rate_2": 0.0,
          "Item_Sp_Rate_3": 0.0,
          "Item_Sp_Rate_4": 0.0,
          "Item_Sp_Rate_5": 0.0,
          "Item_Pur_Rate": 750.0,
          "Item_MRP": 1499.0,
          "HSN_Code": "62113990",
          "Quantity": 10.0,
          "Lot_MRP": 1499.0,
          "Rate": 1200.0,
          "Tax_Amt_1": 300.0,
          "Tax_Amt_3": 300.0,
          "Gross_Amt": 12000.0,
          "Net_Amt": 12600.0,
          "Round_Amt": 0.0,
          "Net_Rate": 1200.0,
          "CD": 0.0,
          "TD": 0.0,
          "SP_CD": 0.0,
          "Scheme_Unit": 0.0,
          "Scheme_Rs": 0.0,
          "CD_Per": 0.0,
          "Tax_1": 2.5,
          "Tax_2": 0.0,
          "Tax_3": 2.5,
          "TD_Per": 0.0,
          "SP_CD_Per": 0.0,
          "Sale_Or_SR": "SL",
          "Lot_Sale_Rate": 1200.0,
          "Lot_Pur_Rate": 750.0,
          "Lot_Basic_Rate": 750.0,
          "Lot_SP_Rate1": 0.0,
          "Lot_SP_Rate2": 0.0,
          "Lot_SP_Rate3": 0.0,
          "Lot_SP_Rate4": 0.0,
          "Lot_SP_Rate5": 0.0,
          "SO_Item_Order_ID": "",
          "Tax_Amt_2": 0.0,
          "Tax3WithoutSur": 300.0,
          "Surcharge": 0.0,
          "ExciseUnit": 0.0,
          "AdjustPerUnit": 0.0,
          "AdjustItem": 0.0,
          "Freight": 0.0,
          "AdjustmentRupees": 0.0,
          "SPDiscount": 0.0,
          "DebitNote": 0.0,
          "CreditNote": 0.0,
          "Display": 0.0,
          "Handling": 0.0,
          "Postage": 0.0,
          "ExcisePercentage": 0.0,
          "Labour": 0.0
        }
      ]
    }
  ],
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 50290,
  "resultSize": "4 KB"
}
```

### **Messages you may see**

| Message                                                                                                              | Meaning                                                                                                                                                                     | What to do                                                                                            |
| -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| *No Pending Sale Challan found...* (with `Status: true`)                                                             | Nothing has been added to the change log after your bookmark.                                                                                                               | You are up to date. Call again later with the same bookmark.                                          |
| *No Record Found.* (with `Status: true`)                                                                             | No challan with sale lines matched: the batch held only challan returns or challans of other branches, nothing changed in the period, or the numbers you sent do not exist. | With a bookmark: store the new `LastGlobalModifyCode` and call again. Otherwise: check what you sent. |
| `Invalid code in list: …` (with `Status: false`; the part you sent in place of …)                                    | `Branch_Codes_From` contains something other than numbers and commas.                                                                                                       | Send branch codes as numbers separated by commas.                                                     |
| `Please Save Configuration from API Template first to Continue...` (with `Status: false`)                            | This endpoint has not been set up for your API site.                                                                                                                        | Ask your Logic ERP support team.                                                                      |
| `Invalid code in list: '…'. Only numeric codes are allowed.` (with `Status: false`; the part you sent in place of …) | `Doc_Codes` contains something other than numbers and commas.                                                                                                               | Send `Doc_Codes` as numbers separated by commas.                                                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-challans.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
