> 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/purchase/pull/get-purchase-challan-returns.md).

# Get Purchase Challan Returns

Returns your **purchase challan returns** (goods received on a purchase challan and sent back to the supplier) from Logic ERP, each with its header and item lines. Use it to copy new and changed challan returns into your own system — normally by asking only for those **added or changed** since your last call — or to fetch particular ones by their internal number.

The response has **the same layout as** [**Get Purchase Vouchers**](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-vouchers.md), and the request works like [Get Purchase Challans](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-challans.md); this page lists only what is different for challan returns.

### **Endpoint**

| Name          | Detail                                       |
| ------------- | -------------------------------------------- |
| Address       | `https://your-server/api/GetPUChallanReturn` |
| 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.                                                                                                                                  |
| `DateFrom`, `DateTo` | date   | No       | empty   | With `GlobalModifyCode` `0`: a period of **changes** (the date a challan return was saved or edited). 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 return numbers (`Vouch_Code`), separated by commas, for example `"19,70"`. Returns exactly these; 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"`. Numbers and commas only.                                                                                                                             |
| `Doc_Num_Like`       | text   | No       | empty   | Only documents whose internal number starts with this text. Challan returns start with `CH` and the date as `yyyyMMdd`, the same as challans, for example `"CH202601"`. Used with the bookmark or a period. |

Field names are matched without regard to upper or lower case. Other fields in the request (for example `PartyUserCode`, `Branch_Codes_To`) are ignored.

### **Rules Logic ERP applies**

The rules of [Get Purchase Challans](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-challans.md) apply – challan returns of every year are kept together, so `Vouch_Code` alone is your key and `DateFrom` does not choose a year – with these differences:

* **Only purchase challan returns** are returned.
* **Shared change log.** Purchase challans and challan returns share one change log, read in batches of the size set for your API site (**150 lines** when none is set). A batch can hold no challan returns: 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 Purchase Challan Return found..."` and `LastGlobalModifyCode` is the value you sent. Keep this endpoint's bookmark separate from the one for Get Purchase Challans.
* **Deleted challan returns** come back as short records, as on Get Purchase Challans: `Action_Code` `"2"`, an empty `ListItems`, and `Vouch_Code`, `Vouch_No`, `Vouch_Date` and `Branch_Code` filled (`GRN_Prefix` and `GRN_Number` too when the challan return was sent to you before with `"GlobalModifyCode": -1`). With `"GlobalModifyCode": -1`, only a deleted document that this endpoint sent you before is reported. Other challan returns have `Action_Code` `"0"` (added) or `"1"` (changed).
* **Signs.** The header `Quantity`, `Gross_Amount`, `Net_Amount` and `Total_Tax` are **negative**. On the lines, `Quantity`, `Rate` and the tax amounts are zero or positive while `Pur_Gross_Amt` and `Pur_Net_Amt` are negative, so a line's `Pur_Net_Amt` is not its real total – use the header `Net_Amount` for the value of the return.
* Challan returns use their **own API site settings**: the branches, series (GRN prefixes) and field choice your Logic ERP team set for purchase challan returns.

> **Known issue – a deleted challan can appear as a deleted challan return.** With a bookmark, a period or `Doc_Codes`, the short records for deleted documents are taken from the change log shared with challans, without checking which kind of document was deleted. A short record with `Action_Code` `"2"` can therefore be a deleted **challan**. If you also store challans, look the `Vouch_Code` up among both before you remove it. With `"GlobalModifyCode": -1` this does not happen.

### **Example request**

Next batch after your stored bookmark:

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

One challan return by its internal number:

```json
{
  "GlobalModifyCode": 0,
  "DateFrom": null,
  "DateTo": null,
  "Doc_Codes": "19"
}
```

### **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 Purchase Challan Returns

> Returns your purchase challan returns (goods received on a purchase challan and sent back to the supplier) from Logic ERP, each with its header and item lines. Use it to copy new and changed challan returns into your own system — normally by asking only for those added or changed since your last call — or to fetch particular ones by their internal number.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Purchase - 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":{"/GetPUChallanReturn":{"post":{"tags":["Purchase - Pull"],"operationId":"GetPUChallanReturn","summary":"Get Purchase Challan Returns","description":"Returns your purchase challan returns (goods received on a purchase challan and sent back to the supplier) from Logic ERP, each with its header and item lines. Use it to copy new and changed challan returns into your own system — normally by asking only for those added or changed since your last call — or to fetch particular ones 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."},"DateFrom":{"type":"string","nullable":true,"description":"With `GlobalModifyCode` `0`: a period of changes (the date a challan return was saved or edited). 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 return was saved or edited). 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 return numbers (`Vouch_Code`), separated by commas, for example `\"19,70\"`. Returns exactly these; 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\"`. Numbers and commas only."},"Doc_Num_Like":{"type":"string","description":"Only documents whose internal number starts with this text. Challan returns start with `CH` and the date as `yyyyMMdd`, the same as challans, for example `\"CH202601\"`. 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":"Internal challan return number, unique across all years."},"Vouch_No":{"type":"string","description":"The internal challan number shortened to year, `-`, month, day and serial, for example `2024-04262`."},"Vouch_Date":{"type":"string","description":"Voucher date, `dd/MM/yyyy`."},"Account_Code":{"type":"string","description":"Code of the supplier as shown in Logic ERP (`User_Code` in Get Party Master)."},"Account_Name":{"type":"string","description":"Supplier's name as kept in Logic ERP; it can include the city after padding spaces."},"Agent_Name":{"type":"string","description":"The voucher's agent, or `NIL`."},"Quantity":{"type":"number","description":"Negative – see the rules."},"Gross_Amount":{"type":"number","description":"Negative – see the rules."},"Net_Amount":{"type":"number","description":"Negative – see the rules."},"Total_Tax":{"type":"string","description":"Negative – see the rules."},"Branch_Name":{"type":"string","description":"Name of the voucher's branch; `(NIL)` for branch `0`."},"Branch_Code":{"type":"integer","description":"Code of the voucher's branch."},"Currency_Name":{"type":"string","description":"Currency, for example `INR`."},"Bill_No":{"type":"string","description":"The supplier's challan or bill number and date."},"Bill_Date":{"type":"string","description":"The supplier's challan or bill number and date."},"GRN_Prefix":{"type":"string","description":"The challan return's series prefix and number, for example `TCHR` and `1`."},"GRN_Number":{"type":"integer","description":"The challan return's series prefix and number, for example `TCHR` and `1`."},"Tax_Region_Name":{"type":"string","description":"The voucher's tax region, for example `CGST/SGST` or `IGST`."},"Goods_In_Transit":{"type":"integer","description":"`1` when the voucher is marked as goods in transit, otherwise `0`."},"Action_Code":{"type":"string","description":"`\"0\"` = added, `\"1\"` = changed, `\"2\"` = deleted (short record)."},"Doc_Type_Desc":{"type":"string","description":"`Purchase Challan Return`."},"Doc_Type":{"type":"string","description":"`CR`."},"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 voucher's other details."},"Order_Date":{"type":"string","description":"Order number and date typed in the voucher's other details."},"Header_Remarks_1":{"type":"string","description":"Remarks typed on the voucher."},"Header_Remarks_2":{"type":"string","description":"Remarks typed on the voucher."},"Header_Remarks_3":{"type":"string","description":"Remarks typed on the voucher."},"Transport_Mode":{"type":"string","description":"Mode of transport, as typed."},"Transport_Name":{"type":"string","description":"Transporter's name as kept in the transporter master; empty when the voucher has no other details."},"Trans_ID":{"type":"string","description":"Transporter ID and services as kept in the transporter master."},"Trans_Services":{"type":"string","description":"Transporter ID and services as kept in the transporter master."},"Weight":{"type":"string","description":"Weight and number of cases, as typed."},"Cases":{"type":"string","description":"Weight and number of cases, as typed."},"GPN_Number":{"type":"string","description":"Always empty."},"GPN_Date":{"type":"string","description":"Always empty."},"ListItems":{"type":"array","items":{"type":"object","properties":{"Pur_Txn_Code":{"type":"integer","description":"Logic ERP's internal line number."},"Lot_Code":{"type":"integer","description":"Internal number of the lot (batch) received."},"Lot_Number":{"type":"string","description":"Lot number."},"AddlItemCode":{"type":"string","description":"The item's additional code, for example a barcode."},"ItemCode":{"type":"string","description":"Item code as shown in Logic ERP (`UserCode` in Get Item Master)."},"PackName":{"type":"string","description":"Pack (size) of the item."},"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."},"Item_Sale_Rate":{"type":"number","description":"Sale rate, purchase rate and MRP 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":"Sale rate, purchase rate and MRP in the item master today."},"Item_MRP":{"type":"number","description":"Sale rate, purchase rate and MRP in the item master today."},"HSN_Code":{"type":"string","description":"HSN code, serial number, description and unit of the item (`(NIL)` / empty when none)."},"Quantity":{"type":"number","description":"Negative – see the rules."},"Lot_MRP":{"type":"number","description":"MRP of the lot."},"Rate":{"type":"number","description":"Purchase rate on the line."},"Tax_Amt_1":{"type":"number","description":"Tax amounts of slots 1 and 3, in ₹. There is no amount for slot 2. With the usual GST setup slot 1 holds CGST and slot 3 SGST or IGST."},"Tax_Amt_3":{"type":"number","description":"Tax amounts of slots 1 and 3, in ₹. There is no amount for slot 2. With the usual GST setup slot 1 holds CGST and slot 3 SGST or IGST."},"Pur_MRP":{"type":"number","description":"MRP used on the line; normally the same as `Lot_MRP`."},"Pur_Gross_Amt":{"type":"number","description":"Quantity × rate, in ₹."},"Pur_Net_Amt":{"type":"number","description":"Negative; `Quantity`, `Rate` and the tax amounts on the line are zero or positive."},"Pur_Round_Amt":{"type":"number","description":"Rounding on the line."},"Pur_Net_Rate":{"type":"number","description":"Net rate per unit."},"Gross_Pur_Amt":{"type":"number","description":"A second gross amount kept on the line; `0` on many lines. Use `Pur_Gross_Amt`."},"CD":{"type":"number","description":"Cash discount, trade discount and special cash discount amounts in ₹; a cash discount comes back as a negative amount."},"TD":{"type":"number","description":"Cash discount, trade discount and special cash discount amounts in ₹; a cash discount comes back as a negative amount."},"SP_CD":{"type":"number","description":"Cash discount, trade discount and special cash discount amounts in ₹; a cash discount comes back as a negative amount."},"Scheme_Unit":{"type":"number","description":"Scheme discount per unit and in rupees."},"Scheme_Rs":{"type":"number","description":"Scheme discount per unit and in rupees."},"Freight":{"type":"number","description":"Freight, adjustment, handling, postage and excise-per-unit amounts on the line, in ₹."},"Adjust_Item":{"type":"number","description":"Freight, adjustment, handling, postage and excise-per-unit amounts on the line, in ₹."},"Handling":{"type":"number","description":"Freight, adjustment, handling, postage and excise-per-unit amounts on the line, in ₹."},"Postage":{"type":"number","description":"Freight, adjustment, handling, postage and excise-per-unit amounts on the line, in ₹."},"ExciseUnit":{"type":"number","description":"Freight, adjustment, handling, postage and excise-per-unit amounts on the line, in ₹."},"ExcisePercentage":{"type":"number","description":"Despite its name, an amount: the market-fee charge on the line."},"CD_Per":{"type":"number","description":"The percentages of those discounts."},"TD_Per":{"type":"number","description":"The percentages of those discounts."},"SP_CD_Per":{"type":"number","description":"The percentages of those discounts."},"Tax_P_1":{"type":"number","description":"Tax rates (%) of the three tax slots of the line."},"Tax_P_2":{"type":"number","description":"Tax rates (%) of the three tax slots of the line."},"Tax_P_3":{"type":"number","description":"Tax rates (%) of the three tax slots of the line."},"Qty_Scanned":{"type":"number","description":"Quantity scanned and quantity rejected for this line in the physical verification of the voucher; `0` when not verified."},"Qty_Rejected":{"type":"number","description":"Always `0`."},"Qty_Excess":{"type":"number","description":"Always `0`."},"ItemName":{"type":"string","description":"Item name."},"ItemHDName":{"type":"string","description":"Item name with its colour, as shown in the item master."},"ColorName":{"type":"string","description":"Colour, or `(NIL)`."},"ItemDesc_1":{"type":"string","description":"Item description."},"CompanyName":{"type":"string","description":"Item's company (brand)."},"HSN_Serial_No":{"type":"string","description":"HSN code, serial number, description and unit of the item (`(NIL)` / empty when none)."},"HSN_Description":{"type":"string","description":"HSN code, serial number, description and unit of the item (`(NIL)` / empty when none)."},"HSN_UOM":{"type":"string","description":"HSN code, serial number, description and unit of the item (`(NIL)` / empty when none)."},"Packing":{"type":"string","description":"Packing description from the item master."},"Item_Group_Name_1":{"type":"string","description":"Item's group."},"LotPcsInfo":{"type":"array","items":{"type":"object"},"description":"Always an empty list here."}}},"description":"The item 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**

Every field is the same as in the [response of Get Purchase Vouchers](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-vouchers.md) (`GetData` items and `ListItems`). For a challan return:

| Field                                                   | Value for a challan return                                                         |
| ------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `Vouch_Code`                                            | Internal challan return number, unique across all years.                           |
| `Doc_Type`                                              | `CR`.                                                                              |
| `Doc_Type_Desc`                                         | `Purchase Challan Return`.                                                         |
| `GRN_Prefix`, `GRN_Number`                              | The challan return's series prefix and number, for example `TCHR` and `1`.         |
| `Quantity`, `Gross_Amount`, `Net_Amount`, `Total_Tax`   | Negative – see the rules.                                                          |
| `ListItems[].Pur_Gross_Amt`, `Pur_Net_Amt`              | Negative; `Quantity`, `Rate` and the tax amounts on the line are zero or positive. |
| `Action_Code`                                           | `"0"` = added, `"1"` = changed, `"2"` = deleted (short record).                    |
| `GPN_Number`, `GPN_Date`                                | Always empty.                                                                      |
| `ListItems[].Qty_Scanned`, `Qty_Rejected`, `Qty_Excess` | Always `0`.                                                                        |

### **Example response**

```json
{
  "GetData": [
    {
      "Vouch_Code": 19,
      "Vouch_No": "2026-05142",
      "Vouch_Date": "14/05/2026",
      "Account_Code": "S2001",
      "Account_Name": "JAIPUR HANDLOOM HOUSE         -JAIPUR",
      "Agent_Name": "NIL",
      "Quantity": -1.0,
      "Gross_Amount": -450.0,
      "Net_Amount": -473.0,
      "Total_Tax": "-22.5",
      "Branch_Name": "LUDHIANA MAIN",
      "Branch_Code": 2,
      "Currency_Name": "INR",
      "Bill_No": "DC-2231",
      "Bill_Date": "14/05/2026",
      "GRN_Prefix": "TCHR",
      "GRN_Number": 1,
      "Tax_Region_Name": "CGST/SGST",
      "Goods_In_Transit": 0,
      "Action_Code": "0",
      "Doc_Type_Desc": "Purchase Challan Return",
      "Doc_Type": "CR",
      "Gr_Number": "",
      "Gr_Date": "",
      "Order_No": "",
      "Order_Date": "",
      "Header_Remarks_1": "",
      "Header_Remarks_2": "",
      "Header_Remarks_3": "",
      "Transport_Mode": "",
      "Transport_Name": "",
      "Trans_ID": "",
      "Trans_Services": "",
      "Weight": "",
      "Cases": "",
      "GPN_Number": "",
      "GPN_Date": "",
      "ListItems": [
        {
          "Pur_Txn_Code": 53,
          "Lot_Code": 24180,
          "Lot_Number": "L-2611",
          "AddlItemCode": "8901234567029",
          "ItemCode": "KUR-1001-L",
          "PackName": "L",
          "CF_1": 1.0,
          "CF_2": 1.0,
          "CF_3": 1.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": 450.0,
          "Item_MRP": 1499.0,
          "HSN_Code": "62113990",
          "Quantity": 1.0,
          "Lot_MRP": 1499.0,
          "Rate": 450.0,
          "Tax_Amt_1": 11.25,
          "Tax_Amt_3": 11.25,
          "Pur_MRP": 1499.0,
          "Pur_Gross_Amt": -450.0,
          "Pur_Net_Amt": -427.5,
          "Pur_Round_Amt": -0.5,
          "Pur_Net_Rate": 450.0,
          "Gross_Pur_Amt": 0.0,
          "CD": 0.0,
          "TD": 0.0,
          "SP_CD": 0.0,
          "Scheme_Unit": 0.0,
          "Scheme_Rs": 0.0,
          "Freight": 0.0,
          "Adjust_Item": 0.0,
          "Handling": 0.0,
          "Postage": 0.0,
          "ExciseUnit": 0.0,
          "ExcisePercentage": 0.0,
          "CD_Per": 0.0,
          "TD_Per": 0.0,
          "SP_CD_Per": 0.0,
          "Tax_P_1": 2.5,
          "Tax_P_2": 0.0,
          "Tax_P_3": 2.5,
          "Qty_Scanned": 0.0,
          "Qty_Rejected": 0.0,
          "Qty_Excess": 0.0,
          "ItemName": "COTTON KURTA",
          "ItemHDName": "COTTON KURTA BLUE",
          "ColorName": "BLUE",
          "ItemDesc_1": "Cotton kurta, straight fit",
          "CompanyName": "SHREE GANESH",
          "HSN_Serial_No": "62113990",
          "HSN_Description": "GARMENTS OF COTTON",
          "HSN_UOM": "PCS-PIECES",
          "Packing": "PCS",
          "Item_Group_Name_1": "KURTA",
          "LotPcsInfo": []
        }
      ]
    }
  ],
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 1026771,
  "resultSize": "3 KB"
}
```

### **Messages you may see**

| Message                                                                             | Meaning                                                                                                                                                                                 | What to do                                                                                            |
| ----------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| *No Pending Purchase Challan Return 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 return matched: the batch held only challans or documents outside your filters, nothing in the period was a challan return, or the numbers you sent are not challan returns. | With a bookmark: store the new `LastGlobalModifyCode` and call again. Otherwise: check what you sent. |
| `Invalid code in list: '…'. Only numeric codes are allowed.` (with `Status: false`) | `Doc_Codes` or `Branch_Codes_From` contained something other than numbers and commas.                                                                                                   | Send numbers separated by commas.                                                                     |
| `No code or sub-query supplied.` (with `Status: false`)                             | `Doc_Codes` holds only spaces.                                                                                                                                                          | Send numbers separated by commas, or leave the field out.                                             |
| The date messages listed in How Every API Call Works (with `Status: true`)          | A period request with a missing or invalid date.                                                                                                                                        | Send both dates as `yyyy-MM-dd`, or both as `null`.                                                   |


---

# 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/purchase/pull/get-purchase-challan-returns.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.
