> 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-vouchers.md).

# Get Purchase Vouchers

Returns your **purchase vouchers** (supplier bills entered as purchases) from Logic ERP, each with its **header** (supplier, bill number and date, amounts, transport, gate pass) and its **item lines** (item, lot, quantity, rate, discounts, charges, taxes and physical-verification quantities). Use it to copy new and changed purchases into your own system — normally by asking only for vouchers **added or changed** since your last call — or to fetch particular vouchers by their internal number.

Purchase returns, purchase challans, purchase challan returns and stock transfers in are not returned here; they have their own endpoints with the same response layout: [Get Purchase Returns](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-returns.md), [Get Purchase Challans](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-challans.md), [Get Purchase Challan Returns](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-purchase-challan-returns.md) and [Get Stock Transfers In](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/purchase/pull/get-stock-transfers-in.md).

### **Endpoint**

| Name          | Detail                                       |
| ------------- | -------------------------------------------- |
| Address       | `https://your-server/api/GetPurchaseVoucher` |
| 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 voucher was saved or edited, not the voucher date). Send both as `null` or leave them out when you are not asking for a period. With `Doc_Codes`, `DateFrom` decides the **financial year** that is searched – see the rules. Write them as `yyyy-MM-dd`. |
| `Doc_Codes`          | text   | No       | empty   | Logic ERP's internal voucher numbers (`Vouch_Code` in the response), separated by commas, for example `"52,53"`. Returns exactly these vouchers; 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 vouchers of these branches are returned, in every kind of request. Numbers and commas only.                                                                                                                                                                    |
| `Doc_Num_Like`       | text   | No       | empty   | Only vouchers whose internal voucher number starts with this text. That number is `PU` followed by the voucher date as `yyyyMMdd` and a serial of the day, so `"PU202604"` gives vouchers dated April 2026. Stock transfers in also start with `PU`. Used with the bookmark or a period; ignored with `Doc_Codes`.         |

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

### **Rules Logic ERP applies**

* **Only purchase vouchers.** Purchase returns and stock transfers in are never returned here, even when they are in the change log or you name them in `Doc_Codes`.
* **One change log for several endpoints.** Purchase vouchers, purchase returns and stock transfers in (and other documents kept with purchases, such as production receipts) share one change log. With a bookmark, each call reads up to **200 change-log lines** of all these kinds and returns only the purchase vouchers among them, so a batch can hold few vouchers or none. When it holds none you 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 Purchase Voucher found..."` and `LastGlobalModifyCode` is the value you sent. If you also use Get Purchase Returns or Get Stock Transfers In, keep a separate bookmark for each endpoint.
* **A voucher can come back in a later batch.** Every save of a voucher adds a line to the change log, so a voucher 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 voucher is `Vouch_Code` together with its financial year.** `Vouch_Code` starts again every financial year, so two vouchers of different years can have the same `Vouch_Code` – also in one answer.
* **Which financial year is searched.** With a bookmark, `-1`, a first sync from `0` or a period, each changed voucher is read from **its own financial year**. With `Doc_Codes`, the financial year that contains `DateFrom` is searched when `DateFrom` is a valid date, otherwise the financial year the Logic ERP API site is currently working in: to fetch vouchers of an earlier year, send their `Doc_Codes` with `DateFrom` and `DateTo` inside that year (the dates do not filter the vouchers).
* With `"GlobalModifyCode": -1`, the first call (before Logic ERP keeps a bookmark for you) starts at the first change of the current financial year; later calls return changes of every financial year.
* `Branch_Codes_From` only **narrows** what the rest of the request selects. With a bookmark it narrows the batch: vouchers of other branches are skipped and are not returned in a later batch either. In a period request it also narrows the change log.
* With `Doc_Codes` or a period, `LastGlobalModifyCode` comes back as `0`.
* **Your Logic ERP team can limit this endpoint** in the API site setup to certain branches and voucher series (GRN prefixes). Vouchers outside them are never returned, whatever you send – even a voucher you have just saved through the API, for example one billed against a purchase challan in another series.
* **Your Logic ERP team can also choose which fields are returned.** A field that is not chosen is left out of the response altogether; the line fields `Pur_Txn_Code`, `ItemCode`, `Pur_MRP`, `Pur_Gross_Amt`, `Pur_Net_Amt`, `Pur_Round_Amt`, `Pur_Net_Rate` and `Gross_Pur_Amt` are always returned. When no choice has been made – the usual case – every field below is returned.
* Every line must find its linked records in Logic ERP (item, lot, pack, colour, company, group, HSN, item description, tax rates) and the voucher its supplier (with the supplier's city, state and country), account-entry party, agent, branch, currency and tax region. A line that cannot is left out, and a voucher whose header links cannot be found is not returned. In normal use these records always exist.
* `Action_Code` is `"0"` for a voucher added and `"1"` for a voucher changed since it was added, from its latest change-log line. A **deleted** voucher comes back as a record with `"Action_Code": "2"`, its `Vouch_Code`, `Vouch_No`, `Vouch_Date` and `Branch_Code`, and no lines – remove it from your system.
* Vouchers are not returned in any guaranteed order.
* `Vouch_Date` and `Bill_Date` are text `dd/MM/yyyy`. `Gr_Date`, `Order_Date` and `GPN_Date` are text in the server's short date format, for example `25/01/24`. A date that is not filled is `""`.

> **Known issue – a deleted stock transfer in can appear as a deleted voucher.** Deleted documents are found by their internal number, and purchase vouchers and stock transfers in both start with `PU`. So a short record with `Action_Code` `"2"` here can be a deleted **stock transfer in**, and a deleted voucher can also appear on Get Stock Transfers In. 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": ""
}
```

A voucher of an earlier financial year by its internal number:

```json
{
  "GlobalModifyCode": 0,
  "DateFrom": "2025-04-01",
  "DateTo": "2025-04-01",
  "Doc_Codes": "52"
}
```

### **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; send the `LastGlobalModifyCode` you get back to see the next batch. Do not send `"GlobalModifyCode": -1` here – it changes what the sandbox has marked as already sent.

## Get Purchase Vouchers

> Returns your purchase vouchers (supplier bills entered as purchases) from Logic ERP, each with its header (supplier, bill number and date, amounts, transport, gate pass) and its item lines (item, lot, quantity, rate, discounts, charges, taxes and physical-verification quantities). Use it to copy new and changed purchases into your own system — normally by asking only for vouchers added or changed since your last call — or to fetch particular vouchers 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":{"/GetPurchaseVoucher":{"post":{"tags":["Purchase - Pull"],"operationId":"GetPurchaseVoucher","summary":"Get Purchase Vouchers","description":"Returns your purchase vouchers (supplier bills entered as purchases) from Logic ERP, each with its header (supplier, bill number and date, amounts, transport, gate pass) and its item lines (item, lot, quantity, rate, discounts, charges, taxes and physical-verification quantities). Use it to copy new and changed purchases into your own system — normally by asking only for vouchers added or changed since your last call — or to fetch particular vouchers 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 voucher was saved or edited, not the voucher date). Send both as `null` or leave them out when you are not asking for a period. With `Doc_Codes`, `DateFrom` decides the financial year that is searched – see the rules. Write them as `yyyy-MM-dd`."},"DateTo":{"type":"string","nullable":true,"description":"With `GlobalModifyCode` `0`: a period of changes (the date a voucher was saved or edited, not the voucher date). Send both as `null` or leave them out when you are not asking for a period. With `Doc_Codes`, `DateFrom` decides the financial year that is searched – see the rules. Write them as `yyyy-MM-dd`."},"Doc_Codes":{"type":"string","description":"Logic ERP's internal voucher numbers (`Vouch_Code` in the response), separated by commas, for example `\"52,53\"`. Returns exactly these vouchers; 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 vouchers of these branches are returned, in every kind of request. Numbers and commas only."},"Doc_Num_Like":{"type":"string","description":"Only vouchers whose internal voucher number starts with this text. That number is `PU` followed by the voucher date as `yyyyMMdd` and a serial of the day, so `\"PU202604\"` gives vouchers dated April 2026. Stock transfers in also start with `PU`. Used with the bookmark or a period; ignored with `Doc_Codes`."}}}}}},"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":"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":"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":"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 bill number."},"Bill_Date":{"type":"string","description":"The supplier's bill date, `dd/MM/yyyy`."},"GRN_Prefix":{"type":"string","description":"The voucher's series prefix and number as shown in Logic ERP, for example `TPB` and `2`."},"GRN_Number":{"type":"integer","description":"The voucher's series prefix and number as shown in Logic ERP, for example `TPB` and `2`."},"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`."},"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":"Gate pass number and date of the voucher; empty when none."},"GPN_Date":{"type":"string","description":"Gate pass number and date of the voucher; empty when none."},"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**

Each item in `GetData` is one voucher:

| Field                                                      | Type         | Meaning                                                                                                                                                                                                               |
| ---------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vouch_Code`                                               | number       | Logic ERP's internal voucher number, unique within a financial year. Use it in `Doc_Codes`.                                                                                                                           |
| `Vouch_No`                                                 | text         | 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`                                               | date         | Voucher date, `dd/MM/yyyy`.                                                                                                                                                                                           |
| `Account_Code`                                             | text         | Code of the supplier as shown in Logic ERP (`User_Code` in [Get Party Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-party-master.md)).       |
| `Account_Name`                                             | text         | Supplier's name as kept in Logic ERP; it can include the city after padding spaces.                                                                                                                                   |
| `Agent_Name`                                               | text         | The voucher's agent, or `NIL`.                                                                                                                                                                                        |
| `Quantity`                                                 | number       | Total quantity of the voucher.                                                                                                                                                                                        |
| `Gross_Amount`                                             | number       | Gross amount in ₹ (quantity × rate, before discounts, charges and taxes).                                                                                                                                             |
| `Net_Amount`                                               | number       | Voucher total in ₹.                                                                                                                                                                                                   |
| `Total_Tax`                                                | text         | Total of the three tax amounts in ₹, written as text, for example `"450"`.                                                                                                                                            |
| `Branch_Name`                                              | text         | Name of the voucher's branch; `(NIL)` for branch `0`.                                                                                                                                                                 |
| `Branch_Code`                                              | number       | Code of the voucher's branch.                                                                                                                                                                                         |
| `Currency_Name`                                            | text         | Currency, for example `INR`.                                                                                                                                                                                          |
| `Bill_No`                                                  | text         | The supplier's bill number.                                                                                                                                                                                           |
| `Bill_Date`                                                | date         | The supplier's bill date, `dd/MM/yyyy`.                                                                                                                                                                               |
| `GRN_Prefix`, `GRN_Number`                                 | text, number | The voucher's series prefix and number as shown in Logic ERP, for example `TPB` and `2`.                                                                                                                              |
| `Tax_Region_Name`                                          | text         | The voucher's tax region, for example `CGST/SGST` or `IGST`.                                                                                                                                                          |
| `Goods_In_Transit`                                         | number       | `1` when the voucher is marked as goods in transit, otherwise `0`.                                                                                                                                                    |
| `Action_Code`                                              | text         | `"0"` = added, `"1"` = changed, `"2"` = deleted (see the rules).                                                                                                                                                      |
| `Doc_Type_Desc`                                            | text         | `Purchase`.                                                                                                                                                                                                           |
| `Doc_Type`                                                 | text         | `PU`.                                                                                                                                                                                                                 |
| `Gr_Number`, `Gr_Date`                                     | text, date   | Transport GR / LR number and date.                                                                                                                                                                                    |
| `Order_No`, `Order_Date`                                   | text, date   | Order number and date typed in the voucher's other details.                                                                                                                                                           |
| `Header_Remarks_1`, `Header_Remarks_2`, `Header_Remarks_3` | text         | Remarks typed on the voucher.                                                                                                                                                                                         |
| `Transport_Mode`                                           | text         | Mode of transport, as typed.                                                                                                                                                                                          |
| `Transport_Name`                                           | text         | Transporter's name as kept in the transporter master; empty when the voucher has no other details.                                                                                                                    |
| `Trans_ID`, `Trans_Services`                               | text         | Transporter ID and services as kept in the transporter master.                                                                                                                                                        |
| `Weight`, `Cases`                                          | text         | Weight and number of cases, as typed.                                                                                                                                                                                 |
| `GPN_Number`, `GPN_Date`                                   | text, date   | Gate pass number and date of the voucher; empty when none.                                                                                                                                                            |
| `ListItems`                                                | list         | The item lines. See below.                                                                                                                                                                                            |

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

| Field                                                         | Type   | Meaning                                                                                                                                                                                           |
| ------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Pur_Txn_Code`                                                | number | Logic ERP's internal line number.                                                                                                                                                                 |
| `Lot_Code`                                                    | number | Internal number of the lot (batch) received.                                                                                                                                                      |
| `Lot_Number`                                                  | text   | Lot number.                                                                                                                                                                                       |
| `AddlItemCode`                                                | text   | The item's additional code, for example a barcode.                                                                                                                                                |
| `ItemCode`                                                    | 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)). |
| `PackName`                                                    | text   | Pack (size) of the item.                                                                                                                                                                          |
| `CF_1`, `CF_2`, `CF_3`                                        | number | The item's conversion factors.                                                                                                                                                                    |
| `Item_Sale_Rate`, `Item_Pur_Rate`, `Item_MRP`                 | number | Sale rate, purchase rate and MRP in the item master **today**.                                                                                                                                    |
| `Item_Sp_Rate_1` … `Item_Sp_Rate_5`                           | number | Special rates 1–5 in the item master today.                                                                                                                                                       |
| `HSN_Code`, `HSN_Serial_No`, `HSN_Description`, `HSN_UOM`     | text   | HSN code, serial number, description and unit of the item (`(NIL)` / empty when none).                                                                                                            |
| `Quantity`                                                    | number | Quantity on the line.                                                                                                                                                                             |
| `Lot_MRP`                                                     | number | MRP of the lot.                                                                                                                                                                                   |
| `Rate`                                                        | number | Purchase rate on the line.                                                                                                                                                                        |
| `Tax_P_1`, `Tax_P_2`, `Tax_P_3`                               | number | Tax rates (%) of the three tax slots of the line.                                                                                                                                                 |
| `Tax_Amt_1`, `Tax_Amt_3`                                      | number | 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`                                                     | number | MRP used on the line; normally the same as `Lot_MRP`.                                                                                                                                             |
| `Pur_Gross_Amt`                                               | number | Quantity × rate, in ₹.                                                                                                                                                                            |
| `Pur_Net_Amt`                                                 | number | Line total, in ₹.                                                                                                                                                                                 |
| `Pur_Round_Amt`                                               | number | Rounding on the line.                                                                                                                                                                             |
| `Pur_Net_Rate`                                                | number | Net rate per unit.                                                                                                                                                                                |
| `Gross_Pur_Amt`                                               | number | A second gross amount kept on the line; `0` on many lines. Use `Pur_Gross_Amt`.                                                                                                                   |
| `CD`, `TD`, `SP_CD`                                           | number | Cash discount, trade discount and special cash discount amounts in ₹; a cash discount comes back as a **negative** amount.                                                                        |
| `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.                                                                                                                                                           |
| `Freight`, `Adjust_Item`, `Handling`, `Postage`, `ExciseUnit` | number | Freight, adjustment, handling, postage and excise-per-unit amounts on the line, in ₹.                                                                                                             |
| `ExcisePercentage`                                            | number | Despite its name, an amount: the market-fee charge on the line.                                                                                                                                   |
| `Qty_Scanned`, `Qty_Rejected`                                 | number | Quantity scanned and quantity rejected for this line in the physical verification of the voucher; `0` when not verified.                                                                          |
| `Qty_Excess`                                                  | number | 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`                                                    | text   | Item name.                                                                                                                                                                                        |
| `ItemHDName`                                                  | text   | Item name with its colour, as shown in the item master.                                                                                                                                           |
| `ColorName`                                                   | text   | Colour, or `(NIL)`.                                                                                                                                                                               |
| `ItemDesc_1`                                                  | text   | Item description.                                                                                                                                                                                 |
| `CompanyName`                                                 | text   | Item's company (brand).                                                                                                                                                                           |
| `Packing`                                                     | text   | Packing description from the item master.                                                                                                                                                         |
| `Item_Group_Name_1`                                           | text   | Item's group.                                                                                                                                                                                     |
| `LotPcsInfo`                                                  | list   | Always an empty list here.                                                                                                                                                                        |

### **Example response**

```json
{
  "GetData": [
    {
      "Vouch_Code": 52,
      "Vouch_No": "2026-04131",
      "Vouch_Date": "13/04/2026",
      "Account_Code": "S2001",
      "Account_Name": "JAIPUR HANDLOOM HOUSE         -JAIPUR",
      "Agent_Name": "NIL",
      "Quantity": 20.0,
      "Gross_Amount": 9000.0,
      "Net_Amount": 9450.0,
      "Total_Tax": "450",
      "Branch_Name": "LUDHIANA MAIN",
      "Branch_Code": 2,
      "Currency_Name": "INR",
      "Bill_No": "JHH-118",
      "Bill_Date": "11/04/2026",
      "GRN_Prefix": "TPB",
      "GRN_Number": 14,
      "Tax_Region_Name": "CGST/SGST",
      "Goods_In_Transit": 0,
      "Action_Code": "0",
      "Doc_Type_Desc": "Purchase",
      "Doc_Type": "PU",
      "Gr_Number": "LR-5521",
      "Gr_Date": "12/04/26",
      "Order_No": "PO-77",
      "Order_Date": "02/04/26",
      "Header_Remarks_1": "",
      "Header_Remarks_2": "",
      "Header_Remarks_3": "",
      "Transport_Mode": "BY ROAD",
      "Transport_Name": "PUNJAB ROADWAYS",
      "Trans_ID": "",
      "Trans_Services": "",
      "Weight": "",
      "Cases": "2",
      "GPN_Number": "GP-31",
      "GPN_Date": "13/04/26",
      "ListItems": [
        {
          "Pur_Txn_Code": 118,
          "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": 20.0,
          "Lot_MRP": 1499.0,
          "Rate": 450.0,
          "Tax_Amt_1": 225.0,
          "Tax_Amt_3": 225.0,
          "Pur_MRP": 1499.0,
          "Pur_Gross_Amt": 9000.0,
          "Pur_Net_Amt": 9450.0,
          "Pur_Round_Amt": 0.0,
          "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": 20.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 Purchase Voucher 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 purchase voucher matched: the batch held only returns, stock transfers in or vouchers outside your filters, nothing in the period was a purchase voucher, or the numbers you sent are not purchase vouchers 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-purchase-vouchers.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.
