> 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-stock-transfers-in.md).

# Get Stock Transfers In

Returns your **stock transfers in** (goods received from another branch or company of your group, entered as a purchase marked as a stock transfer) from Logic ERP, each with its header and item lines. Use it to copy new and changed transfers into your own system — normally by asking only for those **added or changed** since your last call — or to fetch particular transfers by their internal number.

The response has **exactly 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); this page lists only what is different for stock transfers in.

### **Endpoint**

| Name          | Detail                                       |
| ------------- | -------------------------------------------- |
| Address       | `https://your-server/api/GetStockTransferIn` |
| 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 transfer was saved or edited). Send both as `null` or leave them out when you are not asking for a period. With `Doc_Codes`, `DateFrom` decides the **financial year** searched, as on Get Purchase Vouchers. Write them as `yyyy-MM-dd`. |
| `Doc_Codes`          | text   | No       | empty   | Logic ERP's internal numbers (`Vouch_Code`), separated by commas, for example `"39,71"`. Returns exactly these transfers; the bookmark and period are ignored. Numbers and commas only.                                                                                                                    |
| `Branch_Codes_From`  | text   | No       | empty   | Codes of the **receiving** branches, separated by commas, for example `"2,7"`. Numbers and commas only.                                                                                                                                                                                                    |
| `Doc_Num_Like`       | text   | No       | empty   | Only transfers whose internal number starts with this text: `PU` followed by the date as `yyyyMMdd` – the same start as purchase vouchers. Used with the bookmark or a period.                                                                                                                             |

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

### **Rules Logic ERP applies**

The rules of [Get Purchase Vouchers](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-vouchers.md) apply, with these differences:

* **Only stock transfers in** – purchases marked as a stock transfer – are returned. Ordinary purchase vouchers and purchase returns are not.
* **Shared change log.** Purchase vouchers, purchase returns and stock transfers in 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 transfers: 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 Stock Transfer In found..."` and `LastGlobalModifyCode` is the value you sent. Keep this endpoint's bookmark separate from the bookmark you use for Get Purchase Vouchers.
* Transfers have no gate pass here: `GPN_Number` and `GPN_Date` are always empty, and the lines are never repeated.
* `Qty_Scanned`, `Qty_Rejected` and `Qty_Excess` are filled from the physical verification of the transfer, as on Get Purchase Vouchers.
* Transfers use their **own API site settings**: the branches, series (GRN prefixes) and field choice your Logic ERP team set for stock transfers in.

> **Known issue – a deleted purchase voucher can appear as a deleted transfer.** Deleted documents are found by their internal number, and stock transfers in and purchase vouchers both start with `PU`. So a short record with `Action_Code` `"2"` here can be a deleted **purchase voucher**, and a deleted transfer can also appear on Get Purchase Vouchers. If you store both, look the `Vouch_Code` up among both before you remove it.

### **Example request**

Next batch after your stored bookmark:

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

Two transfers by their internal numbers:

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

### **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 Stock Transfers In

> Returns your stock transfers in (goods received from another branch or company of your group, entered as a purchase marked as a stock transfer) from Logic ERP, each with its header and item lines. Use it to copy new and changed transfers into your own system — normally by asking only for those added or changed since your last call — or to fetch particular transfers 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":{"/GetStockTransferIn":{"post":{"tags":["Purchase - Pull"],"operationId":"GetStockTransferIn","summary":"Get Stock Transfers In","description":"Returns your stock transfers in (goods received from another branch or company of your group, entered as a purchase marked as a stock transfer) from Logic ERP, each with its header and item lines. Use it to copy new and changed transfers into your own system — normally by asking only for those added or changed since your last call — or to fetch particular transfers 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 transfer was saved or edited). Send both as `null` or leave them out when you are not asking for a period. With `Doc_Codes`, `DateFrom` decides the financial year searched, as on Get Purchase Vouchers. Write them as `yyyy-MM-dd`."},"DateTo":{"type":"string","nullable":true,"description":"With `GlobalModifyCode` `0`: a period of changes (the date a transfer was saved or edited). Send both as `null` or leave them out when you are not asking for a period. With `Doc_Codes`, `DateFrom` decides the financial year searched, as on Get Purchase Vouchers. Write them as `yyyy-MM-dd`."},"Doc_Codes":{"type":"string","description":"Logic ERP's internal numbers (`Vouch_Code`), separated by commas, for example `\"39,71\"`. Returns exactly these transfers; the bookmark and period are ignored. Numbers and commas only."},"Branch_Codes_From":{"type":"string","description":"Codes of the receiving branches, separated by commas, for example `\"2,7\"`. Numbers and commas only."},"Doc_Num_Like":{"type":"string","description":"Only transfers whose internal number starts with this text: `PU` followed by the date as `yyyyMMdd` – the same start as purchase vouchers. 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 voucher number, unique within a financial year. Use it in `Doc_Codes`."},"Vouch_No":{"type":"string","description":"The internal voucher number shortened to year, `-`, month, day and the serial of the day, for example `2026-04081` (first voucher of 8 April 2026). Not the number users see – that is `GRN_Prefix` and `GRN_Number`."},"Vouch_Date":{"type":"string","description":"Voucher date, `dd/MM/yyyy`."},"Account_Code":{"type":"string","description":"The account the transfer was entered against."},"Account_Name":{"type":"string","description":"The account the transfer was entered against."},"Agent_Name":{"type":"string","description":"The voucher's agent, or `NIL`."},"Quantity":{"type":"number","description":"Total quantity of the voucher."},"Gross_Amount":{"type":"number","description":"Gross amount in ₹ (quantity × rate, before discounts, charges and taxes)."},"Net_Amount":{"type":"number","description":"Voucher total in ₹."},"Total_Tax":{"type":"string","description":"Total of the three tax amounts in ₹, written as text, for example `\"450\"`."},"Branch_Name":{"type":"string","description":"The branch that received the goods."},"Branch_Code":{"type":"integer","description":"The branch that received the goods."},"Currency_Name":{"type":"string","description":"Currency, for example `INR`."},"Bill_No":{"type":"string","description":"The bill number and date typed on the transfer."},"Bill_Date":{"type":"string","description":"The bill number and date typed on the transfer."},"GRN_Prefix":{"type":"string","description":"The transfer's series prefix and number in the receiving branch."},"GRN_Number":{"type":"integer","description":"The transfer's series prefix and number in the receiving branch."},"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 (see the rules)."},"Doc_Type_Desc":{"type":"string","description":"`Purchase`."},"Doc_Type":{"type":"string","description":"`PU` – the same as a purchase voucher."},"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":"Total quantity of the voucher."},"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":"Line total, in ₹."},"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":"Quantity scanned and quantity rejected for this line in the physical verification of the voucher; `0` when not verified."},"Qty_Excess":{"type":"number","description":"Quantity recorded for this item in the difference list of the physical verification. It is kept per item, so every line of the same item shows the same value; `0` when none."},"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 stock transfer in:

| Field                          | Value for a stock transfer in                                    |
| ------------------------------ | ---------------------------------------------------------------- |
| `Doc_Type`                     | `PU` – the same as a purchase voucher.                           |
| `Doc_Type_Desc`                | `Purchase`.                                                      |
| `Branch_Code`, `Branch_Name`   | The branch that **received** the goods.                          |
| `Account_Code`, `Account_Name` | The account the transfer was entered against.                    |
| `Bill_No`, `Bill_Date`         | The bill number and date typed on the transfer.                  |
| `GRN_Prefix`, `GRN_Number`     | The transfer's series prefix and number in the receiving branch. |
| `GPN_Number`, `GPN_Date`       | Always empty.                                                    |

### **Example response**

```json
{
  "GetData": [
    {
      "Vouch_Code": 71,
      "Vouch_No": "2026-05061",
      "Vouch_Date": "06/05/2026",
      "Account_Code": "BR-LDH",
      "Account_Name": "SHREE GANESH TEXTILES         -LUDHIANA",
      "Agent_Name": "NIL",
      "Quantity": 6.0,
      "Gross_Amount": 2700.0,
      "Net_Amount": 2835.0,
      "Total_Tax": "135",
      "Branch_Name": "AMRITSAR STORE",
      "Branch_Code": 7,
      "Currency_Name": "INR",
      "Bill_No": "2627/2/STO-1",
      "Bill_Date": "06/05/2026",
      "GRN_Prefix": "PSTI",
      "GRN_Number": 1,
      "Tax_Region_Name": "IGST",
      "Goods_In_Transit": 0,
      "Action_Code": "0",
      "Doc_Type_Desc": "Purchase",
      "Doc_Type": "PU",
      "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": 196,
          "Lot_Code": 24120,
          "Lot_Number": "L-2604",
          "AddlItemCode": "8901234567012",
          "ItemCode": "KUR-1001-M",
          "PackName": "M",
          "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": 6.0,
          "Lot_MRP": 1499.0,
          "Rate": 450.0,
          "Tax_Amt_1": 0.0,
          "Tax_Amt_3": 135.0,
          "Pur_MRP": 1499.0,
          "Pur_Gross_Amt": 2700.0,
          "Pur_Net_Amt": 2835.0,
          "Pur_Round_Amt": 0.0,
          "Pur_Net_Rate": 450.0,
          "Gross_Pur_Amt": 2700.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": 0.0,
          "Tax_P_2": 0.0,
          "Tax_P_3": 5.0,
          "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": 12813,
  "resultSize": "3 KB"
}
```

### **Messages you may see**

| Message                                                                             | Meaning                                                                                                                                                                                                                 | What to do                                                                                            |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| *No Stock Transfer In 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 stock transfer in matched: the batch held only purchase vouchers, returns or transfers outside your filters, nothing in the period was a transfer, or the numbers you sent are not transfers of that financial year. | 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-stock-transfers-in.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.
