> 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/inventory/pull/get-receipt-inventory.md). Agents can also search and read this documentation through its [MCP server](https://kb.logicerp.com/~gitbook/mcp).

# Get Receipt Inventory

Returns your **stock receipts** from Logic ERP – the documents that bring goods into a branch's stock without a purchase, for example opening stock, goods returned from a warehouse or a stock correction – each with its **header** (receipt number, date and time, branch, received from, remarks) and its **item lines** (item, pack, godown, lot, quantity, rate and the item's current rates). Use it to copy new and changed stock receipts into your own system – normally by asking only for receipts **added or changed** since your last call – or to fetch particular receipts by Logic ERP's internal number.

Stock issues have their own endpoint, [Get Issued Inventory](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/inventory/pull/get-issued-inventory.md), with the same response layout. Receipts you save through [Receipt Stock](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/inventory/push/receipt-stock.md) are returned here.

### **Endpoint**

| Name          | Detail                                        |
| ------------- | --------------------------------------------- |
| Address       | `https://your-server/api/GetReceiptInventory` |
| 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 day a receipt was saved or edited, not the receipt date). Both days are included. Send both as `null`, or leave them out, when you are not asking for a period. Write them as `yyyy-MM-dd`.                                                        |
| `Doc_Codes`          | text   | No       | empty   | Logic ERP's internal receipt numbers (`VouchCode` in the response), separated by commas, for example `"37,39"`. Returns exactly these receipts; the bookmark and period are ignored. Ignored itself when `GlobalModifyCode` is `-1`. Numbers and commas only; an entry such as `abc` is refused.             |
| `Branch_Codes_From`  | text   | No       | empty   | Branch codes separated by commas, for example `"2,5"`. Only receipts of these branches are returned, in every kind of request. With a bookmark it narrows the batch: receipts of other branches are skipped and are not returned in a later batch either. Numbers and commas only; anything else is refused. |

Field names are matched without regard to upper or lower case. `DisplayError` `"1"` is only for troubleshooting with your Logic ERP team: `Message` then carries technical detail, also on a successful answer. Other fields in the request are ignored – including `Doc_Num_Like`, which this endpoint does not read.

### **Rules Logic ERP applies**

* **Only stock receipts.** Logic ERP keeps other kinds of receipt in the same place – for example receipts against job orders or from production processes. They are never returned here, even when you name them in `Doc_Codes`.
* **Batches.** With a bookmark, each call reads up to **200 change-log lines** of stock receipts and returns the receipts they belong to; a receipt saved and then edited takes two lines but is returned once. When a batch holds no receipt that can be returned (for example only deleted receipts, or receipts of other branches), you get `"No Record Found."` with `Status: true` and a **higher** `LastGlobalModifyCode` – store it and call again. You have caught up when the answer is `"No Record Found."` and `LastGlobalModifyCode` is the value you sent (with `"GlobalModifyCode": -1`: the same value as in your previous answer) – call again later.
* **A receipt can come back in a later batch.** Every save of a receipt adds a line to the change log, so a receipt edited after your bookmark is returned again with its current details. Update it in your system; do not add it a second time.
* **Your key for a receipt is `VouchCode`.** Receipts are not kept per financial year: `VouchCode` is unique across all years, and receipts of every financial year are returned.
* With `"GlobalModifyCode": -1`, this endpoint keeps its own bookmark, separate from Get Issued Inventory. The very first `-1` call of your API site starts at the **beginning** of the change log (all financial years), not at the start of the current year, so the first calls can bring your whole history in batches.
* With `Doc_Codes` and with a period request, `LastGlobalModifyCode` comes back as `0` – do not store it. A period request returns every stock receipt changed in the period, with no batch limit.
* **Unapproved and deleted receipts.** Receipts are returned whether or not they are approved, and nothing in the response tells them apart. Receipts **deleted** in Logic ERP are not returned, so a deletion does not reach you through this endpoint.
* **Which stock the lines move.** Each line adds `Quantity` to the stock of the receipt's branch (`Branch_Code`), in the godown `GodownName`, under the lot `LotNo`. `Quantity` is always a positive number, and `IsReceipt` is always `false` on this endpoint – ignore it.
* **Item codes.** `LogicUserCode` is the 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)) and `AddItemCode` its additional code (for example a barcode). Both are always returned, whatever your item-code settings.
* `Basic_Rate`, `Sale_Rate`, `Pur_Rate`, `Mrp` and `Sp_Rate1` … `Sp_Rate5` are the item's rates in the item master **today**, not at the time of the receipt. `LotMrp` is the MRP of the lot and `Rate` the rate on the line.
* A line whose item cannot be found in Logic ERP is left out, and a receipt none of whose lines can be returned is not returned at all. When the line's lot, godown, pack or HSN record, or the remarks of the receipt, cannot be found, the line is still returned, with those fields empty. In normal use these records always exist.
* Remarks typed on a line and the item's bin are not returned; `Remarks` holds only the remarks of the receipt as a whole.
* Receipts, and the lines within a receipt, are not returned in any guaranteed order. Each receipt is returned once, with all its lines.
* Dates in the response are text: `Doc_Date` is `dd/MM/yyyy` and `Doc_Time` `dd/MM/yyyy hh:mm AM/PM`, for example `27/10/2026 04:19 PM` (`""` when no time was stored). `Manufacturing_Date` and `Expiry_Date` are in the server's short date format, for example `10/04/22`, and `""` when the lot has none.

### **Example request**

Next batch after your stored bookmark:

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

All stock receipts of one branch saved or edited in October 2026:

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

Particular receipts by their internal number:

```json
{
  "GlobalModifyCode": 0,
  "Doc_Codes": "37,39"
}
```

### **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 reads one test receipt by its number in `Doc_Codes`. Do not send `"GlobalModifyCode": -1` here – it changes what the sandbox has marked as already sent.

## Get Receipt Inventory

> Returns your stock receipts from Logic ERP – the documents that bring goods into a branch's stock without a purchase, for example opening stock, goods returned from a warehouse or a stock correction – each with its header (receipt number, date and time, branch, received from, remarks) and its item lines (item, pack, godown, lot, quantity, rate and the item's current rates). Use it to copy new and changed stock receipts into your own system – normally by asking only for receipts added or changed since your last call – or to fetch particular receipts by Logic ERP's internal number.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Inventory - 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":{"/GetReceiptInventory":{"post":{"tags":["Inventory - Pull"],"operationId":"GetReceiptInventory","summary":"Get Receipt Inventory","description":"Returns your stock receipts from Logic ERP – the documents that bring goods into a branch's stock without a purchase, for example opening stock, goods returned from a warehouse or a stock correction – each with its header (receipt number, date and time, branch, received from, remarks) and its item lines (item, pack, godown, lot, quantity, rate and the item's current rates). Use it to copy new and changed stock receipts into your own system – normally by asking only for receipts added or changed since your last call – or to fetch particular receipts by Logic ERP's 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 day a receipt was saved or edited, not the receipt date). Both days are included. Send both as `null`, or leave them out, 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 day a receipt was saved or edited, not the receipt date). Both days are included. Send both as `null`, or leave them out, when you are not asking for a period. Write them as `yyyy-MM-dd`."},"Doc_Codes":{"type":"string","description":"Logic ERP's internal receipt numbers (`VouchCode` in the response), separated by commas, for example `\"37,39\"`. Returns exactly these receipts; the bookmark and period are ignored. Ignored itself when `GlobalModifyCode` is `-1`. Numbers and commas only; an entry such as `abc` is refused."},"Branch_Codes_From":{"type":"string","description":"Branch codes separated by commas, for example `\"2,5\"`. Only receipts of these branches are returned, in every kind of request. With a bookmark it narrows the batch: receipts of other branches are skipped and are not returned in a later batch either. Numbers and commas only; anything else is refused."}}}}}},"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":{"VouchCode":{"type":"integer","description":"Logic ERP's internal receipt number, unique across all years. Use it in `Doc_Codes`."},"Branch_Code":{"type":"integer","description":"Code of the receipt's branch – the branch whose stock is increased."},"Doc_Type":{"type":"string","description":"Always `REC`."},"Doc_Prefix":{"type":"string","description":"Receipt prefix, for example `RC`."},"Doc_Date":{"type":"string","description":"Receipt date, `dd/MM/yyyy`."},"Doc_Time":{"type":"string","description":"Date and time the receipt was saved, `dd/MM/yyyy hh:mm AM/PM`; `\"\"` when not stored."},"Doc_Number":{"type":"string","description":"Receipt number within the prefix, as text, for example `\"33\"`."},"Doc_No":{"type":"string","description":"Receipt number as shown in Logic ERP, for example `RC  33` (prefix and number, as stored)."},"Doc_Nature":{"type":"string","description":"Nature of the document as stored, for example `NOR` (normal). Empty (`\"\"`) for receipts saved through Receipt Stock."},"IssueTo":{"type":"string","description":"Always `\"\"` here (used by Get Issued Inventory)."},"ReceivedFrom":{"type":"string","description":"Whom or where the goods were received from, as typed, for example `STOCK ADD`."},"Remarks":{"type":"string","description":"Remarks typed on the receipt; a blank (`\" \"`) when none."},"ListItems":{"type":"array","items":{"type":"object","properties":{"Vouch_Txn_Code":{"type":"string","description":"Logic ERP's internal line number, as text."},"LogicUserCode":{"type":"string","description":"Item code as shown in Logic ERP."},"AddItemCode":{"type":"string","description":"The item's additional code, for example a barcode; `\"\"` when none."},"PackName":{"type":"string","description":"Pack (size) of the item."},"GodownName":{"type":"string","description":"Godown the goods were received into, or `(NIL)`."},"LotNo":{"type":"string","description":"Lot number."},"LotMrp":{"type":"string","description":"MRP of the lot, as text, for example `\"2399\"`."},"HSN_Code":{"type":"string","description":"HSN code of the item, or `(NIL)`."},"Quantity":{"type":"number","description":"Quantity received, always positive."},"Basic_Rate":{"type":"number","description":"Basic, sale and purchase rate in the item master today."},"Sale_Rate":{"type":"number","description":"Basic, sale and purchase rate in the item master today."},"Pur_Rate":{"type":"number","description":"Basic, sale and purchase rate in the item master today."},"Rate":{"type":"number","description":"Rate on the line."},"Mrp":{"type":"number","description":"MRP in the item master today."},"CF_Qty":{"type":"number","description":"The line's conversion-factor quantity, as stored (normally `1`)."},"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."},"Sp_Rate1":{"type":"number","description":"Special rates 1–5 in the item master today."},"Sp_Rate2":{"type":"number","description":"Special rates 1–5 in the item master today."},"Sp_Rate3":{"type":"number","description":"Special rates 1–5 in the item master today."},"Sp_Rate4":{"type":"number","description":"Special rates 1–5 in the item master today."},"Sp_Rate5":{"type":"number","description":"Special rates 1–5 in the item master today."},"IsReceipt":{"type":"boolean","description":"Always `false` on this endpoint."},"Manufacturing_Date":{"type":"string","description":"Manufacturing and expiry date of the lot, in the server's short date format; `\"\"` when none."},"Expiry_Date":{"type":"string","description":"Manufacturing and expiry date of the lot, in the server's short date format; `\"\"` when none."},"LotProductionUnit":{"type":"string","description":"Production unit kept on the lot; `\"\"` when none."}}},"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**

Each item in `GetData` is one stock receipt:

| Field          | Type   | Meaning                                                                                                                                                                                                                                               |
| -------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `VouchCode`    | number | Logic ERP's internal receipt number, unique across all years. Use it in `Doc_Codes`.                                                                                                                                                                  |
| `Branch_Code`  | number | Code of the receipt's branch – the branch whose stock is increased.                                                                                                                                                                                   |
| `Doc_Type`     | text   | Always `REC`.                                                                                                                                                                                                                                         |
| `Doc_Prefix`   | text   | Receipt prefix, for example `RC`.                                                                                                                                                                                                                     |
| `Doc_Number`   | text   | Receipt number within the prefix, as text, for example `"33"`.                                                                                                                                                                                        |
| `Doc_No`       | text   | Receipt number as shown in Logic ERP, for example `RC 33` (prefix and number, as stored).                                                                                                                                                             |
| `Doc_Date`     | date   | Receipt date, `dd/MM/yyyy`.                                                                                                                                                                                                                           |
| `Doc_Time`     | text   | Date and time the receipt was saved, `dd/MM/yyyy hh:mm AM/PM`; `""` when not stored.                                                                                                                                                                  |
| `Doc_Nature`   | text   | Nature of the document as stored, for example `NOR` (normal). Empty (`""`) for receipts saved through [Receipt Stock](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/inventory/push/receipt-stock.md). |
| `IssueTo`      | text   | Always `""` here (used by Get Issued Inventory).                                                                                                                                                                                                      |
| `ReceivedFrom` | text   | Whom or where the goods were received from, as typed, for example `STOCK ADD`.                                                                                                                                                                        |
| `Remarks`      | text   | Remarks typed on the receipt; a blank (`" "`) when none.                                                                                                                                                                                              |
| `ListItems`    | list   | The item lines. See below.                                                                                                                                                                                                                            |

**`ListItems`** — one entry per item line:

| Field                                 | Type         | Meaning                                                                                      |
| ------------------------------------- | ------------ | -------------------------------------------------------------------------------------------- |
| `Vouch_Txn_Code`                      | text         | Logic ERP's internal line number, as text.                                                   |
| `LogicUserCode`                       | text         | Item code as shown in Logic ERP.                                                             |
| `AddItemCode`                         | text         | The item's additional code, for example a barcode; `""` when none.                           |
| `PackName`                            | text         | Pack (size) of the item.                                                                     |
| `GodownName`                          | text         | Godown the goods were received into, or `(NIL)`.                                             |
| `LotNo`                               | text         | Lot number.                                                                                  |
| `LotMrp`                              | text         | MRP of the lot, as text, for example `"2399"`.                                               |
| `HSN_Code`                            | text         | HSN code of the item, or `(NIL)`.                                                            |
| `Quantity`                            | number       | Quantity received, always positive.                                                          |
| `IsReceipt`                           | true / false | Always `false` on this endpoint.                                                             |
| `Rate`                                | number       | Rate on the line.                                                                            |
| `CF_Qty`                              | number       | The line's conversion-factor quantity, as stored (normally `1`).                             |
| `CF_1`, `CF_2`, `CF_3`                | number       | The item's conversion factors.                                                               |
| `Basic_Rate`, `Sale_Rate`, `Pur_Rate` | number       | Basic, sale and purchase rate in the item master today.                                      |
| `Mrp`                                 | number       | MRP in the item master today.                                                                |
| `Sp_Rate1` … `Sp_Rate5`               | number       | Special rates 1–5 in the item master today.                                                  |
| `Manufacturing_Date`, `Expiry_Date`   | text         | Manufacturing and expiry date of the lot, in the server's short date format; `""` when none. |
| `LotProductionUnit`                   | text         | Production unit kept on the lot; `""` when none.                                             |

### **Example response**

```json
{
  "GetData": [
    {
      "VouchCode": 39,
      "Branch_Code": 2,
      "Doc_Type": "REC",
      "Doc_Prefix": "RC",
      "Doc_Date": "03/07/2023",
      "Doc_Time": "03/07/2023 11:53 AM",
      "Doc_Number": "33",
      "Doc_No": "RC  33",
      "Doc_Nature": "NOR",
      "IssueTo": "",
      "ReceivedFrom": "LUDHIANA WAREHOUSE",
      "Remarks": " ",
      "ListItems": [
        {
          "Vouch_Txn_Code": "149",
          "LogicUserCode": "BAG-2201",
          "AddItemCode": "8901234500331",
          "PackName": "FREE",
          "GodownName": "MAIN",
          "LotNo": "L-0703",
          "LotMrp": "2399",
          "HSN_Code": "42022210",
          "Quantity": 100.0,
          "Basic_Rate": 390.0,
          "Sale_Rate": 0.0,
          "Pur_Rate": 390.0,
          "Rate": 700.0,
          "Mrp": 2399.0,
          "CF_Qty": 1.0,
          "CF_1": 1.0,
          "CF_2": 1.0,
          "CF_3": 1.0,
          "Sp_Rate1": 0.0,
          "Sp_Rate2": 0.0,
          "Sp_Rate3": 0.0,
          "Sp_Rate4": 0.0,
          "Sp_Rate5": 0.0,
          "IsReceipt": false,
          "Manufacturing_Date": "",
          "Expiry_Date": "",
          "LotProductionUnit": ""
        }
      ]
    }
  ],
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 1094182,
  "resultSize": "2 KB"
}
```

### **Messages you may see**

| Message                                                                                                       | Meaning                                                                                                                                                                                                                                                                               | What to do                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `No Record Found.` (with `Status: true`)                                                                      | No stock receipt matched: the batch held only deleted receipts or receipts of other branches, nothing changed in the period was a stock receipt of your branches, or the numbers you sent in `Doc_Codes` are not stock receipts – or, with a bookmark, there is nothing new after it. | With a bookmark: store the new `LastGlobalModifyCode` and call again; when it is the value you sent (with `-1`: the same as in your previous answer), you have caught up – call again later. Otherwise: check what you sent. |
| `Invalid code in list: '…'. Only numeric codes are allowed.` (with `Status: false`; your entry in place of …) | An entry in `Doc_Codes` or `Branch_Codes_From` is not a number.                                                                                                                                                                                                                       | Send them as numbers separated by commas.                                                                                                                                                                                    |
| `No valid numeric code supplied.` or `No code or sub-query supplied.` (with `Status: false`)                  | `Doc_Codes` or `Branch_Codes_From` holds only spaces or commas.                                                                                                                                                                                                                       | Send numbers, or leave the field out.                                                                                                                                                                                        |


---

# 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/inventory/pull/get-receipt-inventory.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.
