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

# Get Sale Invoices

Returns your **sale invoices** from Logic ERP, each with its **header** (party, retail customer, amounts, payment split, transport, GST e-invoice details, addresses) and its **item lines** (item, lot, quantity, rate, discounts, charges and taxes). Use it to copy new and changed invoices into your own system — normally by asking only for invoices **added or changed** since your last call — or to look up particular invoices by number, sale order, retail customer mobile or challan.

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

### **Endpoint**

| Name          | Detail                                   |
| ------------- | ---------------------------------------- |
| Address       | `https://your-server/api/GetSaleInvoice` |
| 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 an invoice was saved or edited, not the invoice date). Send both as `null` when you are not asking for a period. With `Doc_Codes` or a lookup it also 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 invoice numbers (`Vouch_Code` in the response), separated by commas, for example `"1452,1453"`. Returns exactly these invoices; 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 invoices of these branches are returned, in every kind of request. Numbers and commas only.                                                                                                                                                                                                                                |
| `Doc_Num_Like`       | text   | No       | empty   | Only invoices whose internal voucher number starts with this text. For sale invoices that number is `SL` followed by the invoice prefix, so `"SLWSL"` gives invoices with prefix `WSL`. Used with the bookmark or a period.                                                                                                                                                            |
| `SaleBillNo`         | text   | No       | empty   | One or more invoice numbers exactly as shown in `New_Bill_No`, separated by commas with no spaces, for example `"2627/2/WSL-15"`. A lookup – see the rules.                                                                                                                                                                                                                            |
| `SaleOrderNo`        | text   | No       | empty   | A sale order number: either exactly as shown in `SO_Order_No` (for example `"SO 33"`), or prefix and number joined with `-` (for example `"SO-33"`). Returns the invoices made against that order. A lookup – see the rules.                                                                                                                                                           |
| `PartyOrderNo`       | text   | No       | empty   | The party's own order number on the sale order (`SO_Party_Order_No`), for example `"PO-7781"`. Returns the invoices made against that sale order. A lookup – see the rules.                                                                                                                                                                                                            |
| `Mobile_No`          | text   | No       | empty   | A retail customer's mobile number, for example `"9814012345"`. Returns the invoices of retail customers with exactly this mobile number. A lookup – see the rules.                                                                                                                                                                                                                     |
| `Challan_No`         | text   | No       | empty   | A sale challan as challan prefix and number joined with `-`, for example `"GCH-154"` (the challan's `Bill_No` in [Get Sale Challans](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-challans.md)). Returns the invoices made from that challan, each with **only the lines made from it**. A lookup – see the rules. |
| `PartyUserCode`      | text   | No       | empty   | One or more party codes as shown in Logic ERP (`Account_Code` in the response), separated by commas, for example `"C1045"`. Narrows whatever else the request selects to invoices made to these parties.                                                                                                                                                                               |
| `ApprovalFilter`     | text   | No       | `"0"`   | `"1"` = only approved invoices, `"2"` = only invoices still waiting for approval, anything else = both.                                                                                                                                                                                                                                                                                |
| `Branch_Codes_To`    | text   | No       | empty   | Only used for stock transfers; leave empty here.                                                                                                                                                                                                                                                                                                                                       |

Field names are matched without regard to upper or lower case. Other fields in the request are ignored.

### **Rules Logic ERP applies**

* **Only sale invoices.** Sale returns and stock transfers out are never returned here, even when they are in the change log or you name them in `Doc_Codes`.
* **One change log for three endpoints.** Sale invoices, sale returns and stock transfers out share one change log. With a bookmark, each call reads up to **200 change-log lines** of all three kinds and returns only the sale invoices among them, so a batch can hold few invoices 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 Pending Sale Bill found..."` and `LastGlobalModifyCode` is the value you sent. If you also use [Get Sale Returns](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-returns.md) or [Get Stock Transfers Out](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-stock-transfers-out.md), keep a separate bookmark for each endpoint.
* **An invoice can come back in a later batch.** Every save of an invoice adds a line to the change log, so an invoice 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 an invoice is `Vouch_Code` together with its financial year.** `Vouch_Code` starts again every financial year, so two invoices of different years can have the same `Vouch_Code`.
* **Which financial year is searched.** When invoices come from the change log (a bookmark, `-1`, `0` from the start, or a period), each changed invoice is read from its **own** financial year, so one answer can hold invoices of several years – even two invoices with the same `Vouch_Code`. A change to an invoice of a financial year whose data is no longer kept in Logic ERP is skipped. With `Doc_Codes` or a lookup, one financial year is searched: the one that contains `DateFrom` when it is a valid date, otherwise the financial year the Logic ERP API site is currently working in. With `Doc_Codes`, `DateFrom` is used only for this: to fetch invoices of an earlier year, send their `Doc_Codes` with `DateFrom` and `DateTo` inside that year (the dates do not filter the invoices).
* **`"GlobalModifyCode": -1`.** The first `-1` call (before Logic ERP has kept a bookmark for this endpoint) starts at the first change of the current financial year – the one the Logic ERP API site is working in; when that year has no changes yet, it starts after the latest change. After that, every change is returned, whatever the financial year of the invoice. When your Logic ERP team has marked documents to be sent again, the next `-1` call returns only those, with `LastGlobalModifyCode` `0`; the change log continues on the following `-1` call. A `-1` call that also carries a lookup field (`SaleBillNo`, `SaleOrderNo`, `PartyOrderNo`, `Mobile_No` or `Challan_No`) is answered as a lookup: it does not return the documents marked to be sent again and does not move your bookmark.
* **Lookups.** When `SaleBillNo`, `SaleOrderNo`, `PartyOrderNo`, `Mobile_No` or `Challan_No` is filled and `Doc_Codes` is empty, the change log is not used: the matching invoices of the financial year are returned whether or not they changed recently, and `LastGlobalModifyCode` comes back as `0` – do not store it. `SaleOrderNo` and `PartyOrderNo` return every invoice made against that order; the dates do not filter them (`DateFrom` still chooses the financial year). `Challan_No` returns only the invoice lines made from that challan, so an invoice that also holds other lines comes back incomplete, and its `ItemCount` and `Discount_Amount` cover only the lines returned. With `SaleBillNo`, `Mobile_No` or `Challan_No`, `DateFrom` and `DateTo` (both needed) filter on the **invoice date**, both days included. `Mobile_No` returns all the customer's invoices of the year, not only the last few.
* `PartyUserCode`, `ApprovalFilter` and `Branch_Codes_From` only **narrow** what the rest of the request selects. With a bookmark they narrow the batch: invoices that do not match are skipped and are not returned in a later batch either.
* With `Doc_Codes` or a lookup, `LastGlobalModifyCode` comes back as `0`; a period request also returns `0`.
* **Your Logic ERP team can limit this endpoint** in the API site setup to certain branches and invoice series. Invoices outside them are never returned, whatever you send.
* **Your Logic ERP team can also choose which fields are returned.** A field that is not chosen is left out of the response altogether. When no choice has been made – the usual case – every field below is returned.
* Every line must find its linked records in Logic ERP (item, lot, lot supplier, godown, pack, group, HSN, colour, company, item description, agent) and the invoice its party, customer, account-entry party, agent, branch, currency, tax region and cost centre records. A line that cannot is left out, and an invoice whose header links cannot be found is not returned. In normal use these records always exist.
* **Cancelled** invoices are returned with `Bill_Cancelled: true`. Invoices **deleted** in Logic ERP are not returned, so a deletion does not reach you through this endpoint.
* Invoices are not returned in any guaranteed order.
* Dates in the response are text `dd/MM/yyyy`, and times `dd/MM/yyyy hh:mm AM/PM`, for example `16/04/2026 01:08 PM`. A date that is not filled is `""` – except `GST_EInvoice_Acknowledgement_Date` and `GST_EWay_Bill_Date`, which are `null`.
* A link that is not set is shown as `(NIL)` or `NIL` (for example `Trans_Name`, `DNParty_Name`, `Agent_Name`). An invoice without a retail customer has `Retail_Cust_Name` `"NIL NIL NIL"`, `Retail_Cust_Mobile_No` `"0"` and `RCU_Membership_Number` `0`.

> **Known issue – `Discount_Coupon_Amt`.** It holds the minimum bill amount set on the discount coupon, not the discount the coupon gave.

### **Example request**

Next batch after your stored bookmark:

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

All invoices made against one sale order:

```json
{
  "GlobalModifyCode": 0,
  "DateFrom": null,
  "DateTo": null,
  "SaleOrderNo": "SO-33"
}
```

An invoice of an earlier financial year by its internal number:

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

### **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 Sale Invoices

> Returns your sale invoices from Logic ERP, each with its header (party, retail customer, amounts, payment split, transport, GST e-invoice details, addresses) and its item lines (item, lot, quantity, rate, discounts, charges and taxes). Use it to copy new and changed invoices into your own system — normally by asking only for invoices added or changed since your last call — or to look up particular invoices by number, sale order, retail customer mobile or challan.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Sale - Pull"}],"servers":[{"url":"https://demo.logicerp.com/api","description":"Logic ERP sandbox (test company)"}],"security":[{"basicAuth":[]}],"components":{"securitySchemes":{"basicAuth":{"type":"http","scheme":"basic","description":"The user name and password of your API site."}}},"paths":{"/GetSaleInvoice":{"post":{"tags":["Sale - Pull"],"operationId":"GetSaleInvoice","summary":"Get Sale Invoices","description":"Returns your sale invoices from Logic ERP, each with its header (party, retail customer, amounts, payment split, transport, GST e-invoice details, addresses) and its item lines (item, lot, quantity, rate, discounts, charges and taxes). Use it to copy new and changed invoices into your own system — normally by asking only for invoices added or changed since your last call — or to look up particular invoices by number, sale order, retail customer mobile or challan.","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 an invoice was saved or edited, not the invoice date). Send both as `null` when you are not asking for a period. With `Doc_Codes` or a lookup it also 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 an invoice was saved or edited, not the invoice date). Send both as `null` when you are not asking for a period. With `Doc_Codes` or a lookup it also 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 invoice numbers (`Vouch_Code` in the response), separated by commas, for example `\"1452,1453\"`. Returns exactly these invoices; 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 invoices of these branches are returned, in every kind of request. Numbers and commas only."},"Doc_Num_Like":{"type":"string","description":"Only invoices whose internal voucher number starts with this text. For sale invoices that number is `SL` followed by the invoice prefix, so `\"SLWSL\"` gives invoices with prefix `WSL`. Used with the bookmark or a period."},"SaleBillNo":{"type":"string","description":"One or more invoice numbers exactly as shown in `New_Bill_No`, separated by commas with no spaces, for example `\"2627/2/WSL-15\"`. A lookup – see the rules."},"SaleOrderNo":{"type":"string","description":"A sale order number: either exactly as shown in `SO_Order_No` (for example `\"SO 33\"`), or prefix and number joined with `-` (for example `\"SO-33\"`). Returns the invoices made against that order. A lookup – see the rules."},"PartyOrderNo":{"type":"string","description":"The party's own order number on the sale order (`SO_Party_Order_No`), for example `\"PO-7781\"`. Returns the invoices made against that sale order. A lookup – see the rules."},"Mobile_No":{"type":"string","description":"A retail customer's mobile number, for example `\"9814012345\"`. Returns the invoices of retail customers with exactly this mobile number. A lookup – see the rules."},"Challan_No":{"type":"string","description":"A sale challan as challan prefix and number joined with `-`, for example `\"GCH-154\"` (the challan's `Bill_No` in Get Sale Challans). Returns the invoices made from that challan, each with only the lines made from it. A lookup – see the rules."},"PartyUserCode":{"type":"string","description":"One or more party codes as shown in Logic ERP (`Account_Code` in the response), separated by commas, for example `\"C1045\"`. Narrows whatever else the request selects to invoices made to these parties."},"ApprovalFilter":{"type":"string","description":"`\"1\"` = only approved invoices, `\"2\"` = only invoices still waiting for approval, anything else = both."},"Branch_Codes_To":{"type":"string","description":"Only used for stock transfers; leave empty here."}}}}}},"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 invoice number, unique within a financial year. Use it in `Doc_Codes`."},"Bill_No":{"type":"string","description":"Invoice prefix and number, for example `WSL-15`."},"New_Bill_No":{"type":"string","description":"The full invoice number as printed, for example `2627/2/WSL-15`; empty when your setup does not use one. Use it in `SaleBillNo`."},"Bill_Date":{"type":"string","description":"Invoice date, `dd/MM/yyyy`."},"Bill_Time":{"type":"string","description":"Date and time the invoice was saved, `dd/MM/yyyy hh:mm AM/PM`."},"Account_Code":{"type":"string","description":"Code of the account the invoice is made to (for a cash sale, the cash account). Use it in `PartyUserCode`."},"Account_Entry_Customer":{"type":"string","description":"Name of the party whose ledger the invoice amount is posted to, when it differs from the account (for example a marketplace); `(NIL)` when none."},"Account_Entry_User_Code":{"type":"string","description":"Code of that party; `0` when none."},"Account_Name":{"type":"string","description":"Name of the account the invoice is made to."},"Customer_Code":{"type":"string","description":"Code of the invoice's customer party."},"Customer_Name":{"type":"string","description":"Name of the invoice's customer party."},"Agent_Name":{"type":"string","description":"The invoice's agent or salesman, or `NIL`."},"Quantity":{"type":"number","description":"Total quantity of the invoice."},"Gross_Amount":{"type":"number","description":"Gross amount in ₹ (quantity × rate, before discounts, charges and taxes)."},"Net_Amount":{"type":"number","description":"Invoice total in ₹."},"Total_Tax":{"type":"string","description":"Total of the three tax amounts in ₹, written as text, for example `\"126\"`. With a tax-inclusive tax region it can be `\"0\"` (see `Tax_Amt_2`)."},"Branch_Name":{"type":"string","description":"Name of the invoice's branch."},"Branch_Code":{"type":"integer","description":"Code of the invoice's branch."},"Currency_Name":{"type":"string","description":"Currency, for example `INR`."},"Tax_Region_Name":{"type":"string","description":"The invoice's tax region, for example `CGST/SGST` or `IGST (INCL)`."},"Action_Code":{"type":"string","description":"The latest change: `N` = added, `M` = modified, `D` = deleted."},"Type":{"type":"string","description":"`SL` (sale invoice)."},"Branch_Short_Name":{"type":"string","description":"Short name of the invoice's branch."},"Doc_Prefix":{"type":"string","description":"Invoice prefix, for example `WSL`."},"Doc_Number":{"type":"integer","description":"Invoice number within the prefix."},"RCU_Membership_Series":{"type":"string","description":"Membership series and number of the retail customer on the invoice; empty and `0` when none."},"RCU_Membership_Number":{"type":"integer","description":"Membership series and number of the retail customer on the invoice; empty and `0` when none."},"Retail_Cust_Name":{"type":"string","description":"Retail customer's first, middle and last name, separated by spaces."},"Retail_Cust_Mobile_No":{"type":"string","description":"Retail customer's mobile number."},"Retail_Cust_Email_ID":{"type":"string","description":"Retail customer's e-mail address."},"SO_Order_No":{"type":"string","description":"Number and date of the sale order the invoice lines were made against (when lines come from different orders, the last line's order); empty when none."},"SO_Order_Date":{"type":"string","description":"Number and date of the sale order the invoice lines were made against (when lines come from different orders, the last line's order); empty when none."},"SO_Party_Order_No":{"type":"string","description":"The party's own order number and date on that sale order."},"SO_Party_Order_Date":{"type":"string","description":"The party's own order number and date on that sale order."},"Credit_Note_Bill_Amount":{"type":"number","description":"`0` for a sale invoice (on a sale return it is the return's total)."},"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 invoice's other details."},"Order_Date":{"type":"string","description":"Order number and date typed in the invoice's other details."},"Remarks1":{"type":"string","description":"Remarks typed on the invoice."},"Cases":{"type":"string","description":"Number of cases or packages."},"Transport_Mode":{"type":"string","description":"Mode of transport, as typed."},"DNParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts of the invoice, or `(NIL)`."},"CNParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts of the invoice, or `(NIL)`."},"DISPParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts of the invoice, or `(NIL)`."},"HANDParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts of the invoice, or `(NIL)`."},"POSTParty_Name":{"type":"string","description":"Accounts used for the debit note, credit note, display, handling and postage amounts of the invoice, or `(NIL)`."},"DN_Desc":{"type":"string","description":"Descriptions typed for the debit note, credit note and display amounts."},"CN_Desc":{"type":"string","description":"Descriptions typed for the debit note, credit note and display amounts."},"Display_Desc":{"type":"string","description":"Descriptions typed for the debit note, credit note and display amounts."},"Challan_Date":{"type":"string","description":"Challan reference typed in the invoice's other details."},"Challan_no":{"type":"string","description":"Challan reference typed in the invoice's other details."},"DD_Chq":{"type":"string","description":"Demand draft / cheque indicator as stored, usually `\"0\"` or empty."},"DD_Chq_No":{"type":"string","description":"Demand draft or cheque number and amount."},"DD_Chq_Amt":{"type":"number","description":"Demand draft or cheque number and amount."},"GR_Number_2":{"type":"string","description":"A second GR / LR number and date."},"GR_Date_2":{"type":"string","description":"A second GR / LR number and date."},"Issue_Time":{"type":"string","description":"Time of issue and time of removal of goods, `dd/MM/yyyy hh:mm AM/PM`; empty when not filled."},"Removal_Time":{"type":"string","description":"Time of issue and time of removal of goods, `dd/MM/yyyy hh:mm AM/PM`; empty when not filled."},"Trans_Name":{"type":"string","description":"Transporter, or `(NIL)`."},"Remarks2":{"type":"string","description":"Remarks typed on the invoice."},"Remarks3":{"type":"string","description":"Remarks typed on the invoice."},"Credit_Note_Amount":{"type":"number","description":"Total of the sale-return credit notes adjusted against this invoice; `0` when none."},"ST_Branch_Code":{"type":"integer","description":"`0` for a sale invoice (used by stock transfers)."},"RCU_Create_Date":{"type":"string","description":"When the retail customer was created, `dd/MM/yyyy`."},"RCU_State":{"type":"string","description":"State and country of the retail customer's city, or `(NIL)`."},"RCU_Country":{"type":"string","description":"State and country of the retail customer's city, or `(NIL)`."},"RCU_CountryCode":{"type":"string","description":"Code of that country, if one is kept."},"Credit_Amount":{"type":"number","description":"How the invoice was paid, in ₹: cash, card, gift voucher and on credit. When the invoice has no payment split, the whole `Net_Amount` is shown as `Cash_Amount` for a cash invoice or `Credit_Amount` for a credit invoice."},"Cash_Amount":{"type":"number","description":"How the invoice was paid, in ₹: cash, card, gift voucher and on credit. When the invoice has no payment split, the whole `Net_Amount` is shown as `Cash_Amount` for a cash invoice or `Credit_Amount` for a credit invoice."},"Gift_Voucher_Amount":{"type":"number","description":"How the invoice was paid, in ₹: cash, card, gift voucher and on credit. When the invoice has no payment split, the whole `Net_Amount` is shown as `Cash_Amount` for a cash invoice or `Credit_Amount` for a credit invoice."},"Discount_Coupon_No":{"type":"string","description":"Number of the discount coupon linked to the invoice; empty when none."},"Discount_Coupon_Amt":{"type":"number","description":"See the known issue."},"Bill_Cancelled":{"type":"boolean","description":"`true` when the invoice has been cancelled."},"GST_EInvoice_IRN_No":{"type":"string","description":"GST e-invoice IRN; empty when none."},"GST_EInvoice_QR_Image":{"type":"string","description":"The signed QR code data of the e-invoice; empty when none."},"GST_EInvoice_Acknowledgement_No":{"type":"string","description":"E-invoice acknowledgement number."},"GST_EInvoice_Acknowledgement_Date":{"type":"string","nullable":true,"description":"E-invoice acknowledgement date, `dd/MM/yyyy`; `null` when none."},"GST_EWay_Bill_No":{"type":"string","nullable":true,"description":"E-way bill number and date; `null` (or an empty number) when there is no e-way bill."},"GST_EWay_Bill_Date":{"type":"string","nullable":true,"description":"E-way bill number and date; `null` (or an empty number) when there is no e-way bill."},"InvoicePDFLink":{"type":"string","nullable":true,"description":"A link to the invoice PDF on the Aaptak e-bill service, when the invoice was sent there; otherwise `null`."},"TCS_Act_Name":{"type":"string","description":"TCS account, rate and amount collected on the invoice; empty / `0` when none."},"TCS_Percent":{"type":"number","description":"TCS account, rate and amount collected on the invoice; empty / `0` when none."},"TCS_Amount":{"type":"number","description":"TCS account, rate and amount collected on the invoice; empty / `0` when none."},"CC_Plus_CE_Name":{"type":"string","description":"Cost centre, cost element and their combined name on the invoice, or `(NIL)`."},"Cost_Center_Name":{"type":"string","description":"Cost centre, cost element and their combined name on the invoice, or `(NIL)`."},"Cost_Element_Name":{"type":"string","description":"Cost centre, cost element and their combined name on the invoice, or `(NIL)`."},"Credit_Card_Amount":{"type":"number","description":"How the invoice was paid, in ₹: cash, card, gift voucher and on credit. When the invoice has no payment split, the whole `Net_Amount` is shown as `Cash_Amount` for a cash invoice or `Credit_Amount` for a credit invoice."},"Discount_Amount":{"type":"number","description":"Total discount of the invoice in ₹, as a positive amount: the sum over all lines of `CD`, `TD`, `SP_CD`, `Scheme_Unit`, `Scheme_Rs`, `AdjustItem`, `AdjustPerUnit`, `SPDiscount` and `AdjustmentRupees` where they are negative."},"ItemCount":{"type":"integer","description":"Number of different item codes on the invoice."},"Patient_Name":{"type":"string","description":"Patient details (pharmacy). Filled only when your Logic ERP team has chosen these fields for the response; otherwise empty."},"Patient_Mobile_No":{"type":"string","description":"Patient details (pharmacy). Filled only when your Logic ERP team has chosen these fields for the response; otherwise empty."},"Shipping_Addres":{"type":"object","properties":{"Code":{"type":"integer","description":"Logic ERP's internal address number; `0` when there is no address."},"Cust_Code":{"type":"integer","description":"Internal number of the customer the address belongs to; `0` when not linked."},"Contact_Person_Name":{"type":"string","description":"Contact person."},"Phone_Number":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Address_1":{"type":"string","description":"Address lines."},"Address_2":{"type":"string","description":"Address lines."},"Driving_Directions":{"type":"string","description":"Directions."},"City_Name":{"type":"string","description":"City, state, country and PIN code."},"Code_Type":{"type":"string","description":"Kind of address, as stored."},"Country_Name":{"type":"string","description":"City, state, country and PIN code."},"Email_Id":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Location_Code":{"type":"integer","description":"Location, when used."},"Mobile_No":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Pin_Code":{"type":"string","description":"City, state, country and PIN code."},"State_Name":{"type":"string","description":"City, state, country and PIN code."},"Company_Name":{"type":"string","description":"Company name at the address."},"Latitude":{"type":"string","description":"Map position, when kept."},"Longitude":{"type":"string","description":"Map position, when kept."},"Address_ID":{"type":"string","description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Complete_Address":{"type":"string","description":"The full address in one text, when kept."},"External_Address_Id":{"type":"string","description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Location_Name":{"type":"string","description":"Location, when used."},"State_Code":{"type":"integer","description":"Internal number of the state."},"Country_Code":{"type":"integer","description":"Always `0`."},"DisplayAddress":{"type":"string","description":"Mobile number and contact person joined with `-`."},"DeleteAddress":{"type":"boolean","description":"Always `false` here – ignore."},"SameAsShippingAddress":{"type":"boolean","description":"Always `false` here – ignore."},"Gst_No":{"type":"string","description":"GSTIN at the address."}},"description":"The delivery address on the invoice (the name is spelt this way). See below."},"Billing_Address":{"type":"object","properties":{"Code":{"type":"integer","description":"Logic ERP's internal address number; `0` when there is no address."},"Cust_Code":{"type":"integer","description":"Internal number of the customer the address belongs to; `0` when not linked."},"Contact_Person_Name":{"type":"string","description":"Contact person."},"Phone_Number":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Address_1":{"type":"string","description":"Address lines."},"Address_2":{"type":"string","description":"Address lines."},"Driving_Directions":{"type":"string","description":"Directions."},"City_Name":{"type":"string","description":"City, state, country and PIN code."},"Code_Type":{"type":"string","description":"Kind of address, as stored."},"Country_Name":{"type":"string","description":"City, state, country and PIN code."},"Email_Id":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Location_Code":{"type":"integer","description":"Location, when used."},"Mobile_No":{"type":"string","description":"Phone, mobile and e-mail at the address."},"Pin_Code":{"type":"string","description":"City, state, country and PIN code."},"State_Name":{"type":"string","description":"City, state, country and PIN code."},"Company_Name":{"type":"string","description":"Company name at the address."},"Latitude":{"type":"string","description":"Map position, when kept."},"Longitude":{"type":"string","description":"Map position, when kept."},"Address_ID":{"type":"string","description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Complete_Address":{"type":"string","description":"The full address in one text, when kept."},"External_Address_Id":{"type":"string","description":"Logic ERP's address ID and the ID your system gave the address, if any."},"Location_Name":{"type":"string","description":"Location, when used."},"State_Code":{"type":"integer","description":"Internal number of the state."},"Country_Code":{"type":"integer","description":"Always `0`."},"DisplayAddress":{"type":"string","description":"Mobile number and contact person joined with `-`."},"DeleteAddress":{"type":"boolean","description":"Always `false` here – ignore."},"SameAsShippingAddress":{"type":"boolean","description":"Always `false` here – ignore."},"Gst_No":{"type":"string","description":"GSTIN at the address."}},"description":"The billing address on the invoice. See below."},"ListCreditCard":{"type":"array","items":{"type":"object"},"description":"Card payments by card type. See below."},"LstItems":{"type":"array","items":{"type":"object","properties":{"SL_Txn_Code":{"type":"integer","description":"Logic ERP's internal line number."},"Lot_Code":{"type":"integer","description":"Internal number of the lot (batch) sold."},"Lot_Number":{"type":"string","description":"Lot number."},"AddlItemCode":{"type":"string","description":"The item's additional code, for example a barcode."},"LogicUser_Code":{"type":"string","description":"Item code as shown in Logic ERP (`UserCode` in Get Item Master)."},"PackName":{"type":"string","description":"Pack (size) of the item."},"ItemName":{"type":"string","description":"Item name."},"ItemHDName":{"type":"string","description":"Item name with its colour, as shown in the item master."},"ItemDescription_1":{"type":"string","description":"Item description."},"ColorName":{"type":"string","description":"Colour, or `(NIL)`."},"CompanyName":{"type":"string","description":"Item's company (brand), or `(NIL)`."},"CF_1":{"type":"number","description":"The item's conversion factors."},"CF_2":{"type":"number","description":"The item's conversion factors."},"CF_3":{"type":"number","description":"The item's conversion factors."},"Weight":{"type":"number","description":"Always `0`."},"Item_Sale_Rate":{"type":"number","description":"MRP, sale rate and purchase rate in the item master today."},"Item_Sp_Rate_1":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_2":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_3":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_4":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Sp_Rate_5":{"type":"number","description":"Special rates 1–5 in the item master today."},"Item_Pur_Rate":{"type":"number","description":"MRP, sale rate and purchase rate in the item master today."},"Item_MRP":{"type":"number","description":"MRP, sale rate and purchase rate in the item master today."},"HSN_Code":{"type":"string","description":"HSN code, serial number, description and unit of the item (`(NIL)` / empty when none)."},"Quantity":{"type":"number","description":"Total quantity of the invoice."},"Lot_MRP":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Rate":{"type":"number","description":"Rate on the line."},"Tax_Amt_1":{"type":"number","description":"Tax amounts of the three slots, in ₹. `Tax_Amt_3` includes `Surcharge`. In the sandbox's GST setup slot 1 holds CGST and slot 3 SGST or IGST; with a tax-inclusive region slot 2 holds the tax included in the rate as a negative amount."},"Tax_Amt_3":{"type":"number","description":"Tax amounts of the three slots, in ₹. `Tax_Amt_3` includes `Surcharge`. In the sandbox's GST setup slot 1 holds CGST and slot 3 SGST or IGST; with a tax-inclusive region slot 2 holds the tax included in the rate as a negative amount."},"MRP_SaleBill":{"type":"number","description":"MRP used on the line."},"Gross_Amt":{"type":"number","description":"Quantity × rate, in ₹."},"Net_Amt":{"type":"number","description":"Line total, in ₹."},"Round_Amt":{"type":"number","description":"Rounding on the line."},"Net_Rate":{"type":"number","description":"Net rate per unit."},"Sale_Amt":{"type":"number","description":"Taxable value of the line, in ₹."},"CD":{"type":"number","description":"Cash discount, trade discount and special cash discount amounts in ₹; a discount is a negative amount."},"TD":{"type":"number","description":"Cash discount, trade discount and special cash discount amounts in ₹; a discount is a negative amount."},"SP_CD":{"type":"number","description":"Cash discount, trade discount and special cash discount amounts in ₹; a discount is a negative amount."},"Scheme_Unit":{"type":"number","description":"Scheme discount per unit and in rupees (negative = discount)."},"Scheme_Rs":{"type":"number","description":"Scheme discount per unit and in rupees (negative = discount)."},"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."},"Sale_Or_SR":{"type":"string","description":"`SL`."},"Lot_Sale_Rate":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Lot_Pur_Rate":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Lot_Basic_Rate":{"type":"number","description":"MRP, sale, purchase and basic rate of the lot."},"Lot_SP_Rate1":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate2":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate3":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate4":{"type":"number","description":"Special rates 1–5 of the lot."},"Lot_SP_Rate5":{"type":"number","description":"Special rates 1–5 of the lot."},"SO_Item_Order_ID":{"type":"string","description":"The order-line ID of the sale order line this line was made from; empty when none."},"Tax_Amt_2":{"type":"number","description":"Tax amounts of the three slots, in ₹. `Tax_Amt_3` includes `Surcharge`. In the sandbox's GST setup slot 1 holds CGST and slot 3 SGST or IGST; with a tax-inclusive region slot 2 holds the tax included in the rate as a negative amount."},"Tax3WithoutSur":{"type":"number","description":"Tax of slot 3 without surcharge, and the surcharge."},"Surcharge":{"type":"number","description":"Tax of slot 3 without surcharge, and the surcharge."},"ExciseUnit":{"type":"number","description":"Charges added on the line, in ₹."},"AdjustPerUnit":{"type":"number","description":"Other adjustments and special discount on the line (negative = discount)."},"AdjustItem":{"type":"number","description":"Other adjustments and special discount on the line (negative = discount)."},"Freight":{"type":"number","description":"Charges added on the line, in ₹."},"AdjustmentRupees":{"type":"number","description":"Other adjustments and special discount on the line (negative = discount)."},"SPDiscount":{"type":"number","description":"Other adjustments and special discount on the line (negative = discount)."},"DebitNote":{"type":"number","description":"Charges added on the line, in ₹."},"CreditNote":{"type":"number","description":"Charges added on the line, in ₹."},"Display":{"type":"number","description":"Charges added on the line, in ₹."},"Handling":{"type":"number","description":"Charges added on the line, in ₹."},"Postage":{"type":"number","description":"Charges added on the line, in ₹."},"ExcisePercentage":{"type":"number","description":"Despite its name, an amount: the market-fee charge on the line."},"Labour":{"type":"number","description":"Charges added on the line, in ₹."},"RRate":{"type":"number","description":"A second rate kept on the line; normally the same as `Rate`."},"Tax_1":{"type":"number","description":"Tax rates (%) of the three tax slots of the line, as set by the tax region."},"Tax_2":{"type":"number","description":"Tax rates (%) of the three tax slots of the line, as set by the tax region."},"Tax_3":{"type":"number","description":"Tax rates (%) of the three tax slots of the line, as set by the tax region."},"Agent_Name":{"type":"string","description":"The invoice's agent or salesman, or `NIL`."},"Agent_ShortName":{"type":"string","description":"The line's agent and its short name, or `NIL`."},"Item_Group_Name_1":{"type":"string","description":"Item's group."},"Lot_Sup_Code":{"type":"string","description":"Code and name of the supplier the lot was bought from."},"Lot_Sup_Name":{"type":"string","description":"Code and name of the supplier the lot was bought from."},"Lot_Bill_No":{"type":"string","description":"Purchase bill number and date of the lot."},"Lot_Purchase_Date":{"type":"string","description":"Purchase bill number and date of the lot."},"Lot_Expiry_Date":{"type":"string","description":"Expiry and manufacturing date of the lot; empty when none."},"Lot_Mfg_Date":{"type":"string","description":"Expiry and manufacturing date of the lot; empty when none."},"Scheme_Campaign_Group_Name":{"type":"string","description":"The scheme campaign applied on the line. Filled only when your Logic ERP team has switched on scheme campaigns for this endpoint; otherwise empty."},"Scheme_Campaign_Name":{"type":"string","description":"The scheme campaign applied on the line. Filled only when your Logic ERP team has switched on scheme campaigns for this endpoint; otherwise empty."},"Godown_Name":{"type":"string","description":"Godown the goods were taken from, or `(NIL)`."},"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."},"Invoice_Prescription_Days":{"type":"string","description":"Prescription days (pharmacy); `\"0\"` unless patient details are chosen for the response."},"ListOtherAgents":{"type":"array","items":{"type":"object"},"description":"Further agents on the line. See below."}}},"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 invoice:

| Field                                                                                | Type                 | Meaning                                                                                                                                                                                                                          |
| ------------------------------------------------------------------------------------ | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Vouch_Code`                                                                         | number               | Logic ERP's internal invoice number, unique within a financial year. Use it in `Doc_Codes`.                                                                                                                                      |
| `Bill_No`                                                                            | text                 | Invoice prefix and number, for example `WSL-15`.                                                                                                                                                                                 |
| `New_Bill_No`                                                                        | text                 | The full invoice number as printed, for example `2627/2/WSL-15`; empty when your setup does not use one. Use it in `SaleBillNo`.                                                                                                 |
| `Bill_Date`                                                                          | date                 | Invoice date, `dd/MM/yyyy`.                                                                                                                                                                                                      |
| `Bill_Time`                                                                          | text                 | Date and time the invoice was saved, `dd/MM/yyyy hh:mm AM/PM`.                                                                                                                                                                   |
| `Account_Code`                                                                       | text                 | Code of the account the invoice is made to (for a cash sale, the cash account). Use it in `PartyUserCode`.                                                                                                                       |
| `Account_Entry_Customer`                                                             | text                 | Name of the party whose ledger the invoice amount is posted to, when it differs from the account (for example a marketplace); `(NIL)` when none.                                                                                 |
| `Account_Entry_User_Code`                                                            | text                 | Code of that party; `0` when none.                                                                                                                                                                                               |
| `Account_Name`                                                                       | text                 | Name of the account the invoice is made to.                                                                                                                                                                                      |
| `Customer_Code`                                                                      | text                 | Code of the invoice's customer party.                                                                                                                                                                                            |
| `Customer_Name`                                                                      | text                 | Name of the invoice's customer party.                                                                                                                                                                                            |
| `Agent_Name`                                                                         | text                 | The invoice's agent or salesman, or `NIL`.                                                                                                                                                                                       |
| `Quantity`                                                                           | number               | Total quantity of the invoice.                                                                                                                                                                                                   |
| `Gross_Amount`                                                                       | number               | Gross amount in ₹ (quantity × rate, before discounts, charges and taxes).                                                                                                                                                        |
| `Net_Amount`                                                                         | number               | Invoice total in ₹.                                                                                                                                                                                                              |
| `Total_Tax`                                                                          | text                 | Total of the three tax amounts in ₹, written as text, for example `"126"`. With a tax-inclusive tax region it can be `"0"` (see `Tax_Amt_2`).                                                                                    |
| `Branch_Name`                                                                        | text                 | Name of the invoice's branch.                                                                                                                                                                                                    |
| `Branch_Code`                                                                        | number               | Code of the invoice's branch.                                                                                                                                                                                                    |
| `Currency_Name`                                                                      | text                 | Currency, for example `INR`.                                                                                                                                                                                                     |
| `Tax_Region_Name`                                                                    | text                 | The invoice's tax region, for example `CGST/SGST` or `IGST (INCL)`.                                                                                                                                                              |
| `Action_Code`                                                                        | text                 | The latest change: `N` = added, `M` = modified, `D` = deleted.                                                                                                                                                                   |
| `Type`                                                                               | text                 | `SL` (sale invoice).                                                                                                                                                                                                             |
| `Branch_Short_Name`                                                                  | text                 | Short name of the invoice's branch.                                                                                                                                                                                              |
| `Doc_Prefix`                                                                         | text                 | Invoice prefix, for example `WSL`.                                                                                                                                                                                               |
| `Doc_Number`                                                                         | number               | Invoice number within the prefix.                                                                                                                                                                                                |
| `RCU_Membership_Series`, `RCU_Membership_Number`                                     | text, number         | Membership series and number of the retail customer on the invoice; empty and `0` when none.                                                                                                                                     |
| `Retail_Cust_Name`                                                                   | text                 | Retail customer's first, middle and last name, separated by spaces.                                                                                                                                                              |
| `Retail_Cust_Mobile_No`                                                              | text                 | Retail customer's mobile number.                                                                                                                                                                                                 |
| `Retail_Cust_Email_ID`                                                               | text                 | Retail customer's e-mail address.                                                                                                                                                                                                |
| `RCU_Create_Date`                                                                    | date                 | When the retail customer was created, `dd/MM/yyyy`.                                                                                                                                                                              |
| `RCU_State`, `RCU_Country`                                                           | text                 | State and country of the retail customer's city, or `(NIL)`.                                                                                                                                                                     |
| `RCU_CountryCode`                                                                    | text                 | Code of that country, if one is kept.                                                                                                                                                                                            |
| `SO_Order_No`, `SO_Order_Date`                                                       | text, date           | Number and date of the sale order the invoice lines were made against (when lines come from different orders, the last line's order); empty when none.                                                                           |
| `SO_Party_Order_No`, `SO_Party_Order_Date`                                           | text, date           | The party's own order number and date on that sale order.                                                                                                                                                                        |
| `Order_No`, `Order_Date`                                                             | text, date           | Order number and date typed in the invoice's other details.                                                                                                                                                                      |
| `Challan_no`, `Challan_Date`                                                         | text, date           | Challan reference typed in the invoice's other details.                                                                                                                                                                          |
| `Gr_Number`, `Gr_Date`                                                               | text, date           | Transport GR / LR number and date.                                                                                                                                                                                               |
| `GR_Number_2`, `GR_Date_2`                                                           | text, date           | A second GR / LR number and date.                                                                                                                                                                                                |
| `Cases`                                                                              | text                 | Number of cases or packages.                                                                                                                                                                                                     |
| `Transport_Mode`                                                                     | text                 | Mode of transport, as typed.                                                                                                                                                                                                     |
| `Trans_Name`                                                                         | text                 | Transporter, or `(NIL)`.                                                                                                                                                                                                         |
| `Issue_Time`, `Removal_Time`                                                         | text                 | Time of issue and time of removal of goods, `dd/MM/yyyy hh:mm AM/PM`; empty when not filled.                                                                                                                                     |
| `Remarks1`, `Remarks2`, `Remarks3`                                                   | text                 | Remarks typed on the invoice.                                                                                                                                                                                                    |
| `DNParty_Name`, `CNParty_Name`, `DISPParty_Name`, `HANDParty_Name`, `POSTParty_Name` | text                 | Accounts used for the debit note, credit note, display, handling and postage amounts of the invoice, or `(NIL)`.                                                                                                                 |
| `DN_Desc`, `CN_Desc`, `Display_Desc`                                                 | text                 | Descriptions typed for the debit note, credit note and display amounts.                                                                                                                                                          |
| `DD_Chq`                                                                             | text                 | Demand draft / cheque indicator as stored, usually `"0"` or empty.                                                                                                                                                               |
| `DD_Chq_No`, `DD_Chq_Amt`                                                            | text, number         | Demand draft or cheque number and amount.                                                                                                                                                                                        |
| `Credit_Note_Amount`                                                                 | number               | Total of the sale-return credit notes adjusted against this invoice; `0` when none.                                                                                                                                              |
| `Credit_Note_Bill_Amount`                                                            | number               | `0` for a sale invoice (on a sale return it is the return's total).                                                                                                                                                              |
| `ST_Branch_Code`                                                                     | number               | `0` for a sale invoice (used by stock transfers).                                                                                                                                                                                |
| `Cash_Amount`, `Credit_Card_Amount`, `Gift_Voucher_Amount`, `Credit_Amount`          | number               | How the invoice was paid, in ₹: cash, card, gift voucher and on credit. When the invoice has no payment split, the whole `Net_Amount` is shown as `Cash_Amount` for a cash invoice or `Credit_Amount` for a credit invoice.      |
| `Discount_Coupon_No`                                                                 | text                 | Number of the discount coupon linked to the invoice; empty when none.                                                                                                                                                            |
| `Discount_Coupon_Amt`                                                                | number               | See the known issue.                                                                                                                                                                                                             |
| `Bill_Cancelled`                                                                     | true / false         | `true` when the invoice has been cancelled.                                                                                                                                                                                      |
| `GST_EInvoice_IRN_No`                                                                | text                 | GST e-invoice IRN; empty when none.                                                                                                                                                                                              |
| `GST_EInvoice_QR_Image`                                                              | text                 | The signed QR code data of the e-invoice; empty when none.                                                                                                                                                                       |
| `GST_EInvoice_Acknowledgement_No`                                                    | text                 | E-invoice acknowledgement number.                                                                                                                                                                                                |
| `GST_EInvoice_Acknowledgement_Date`                                                  | date                 | E-invoice acknowledgement date, `dd/MM/yyyy`; `null` when none.                                                                                                                                                                  |
| `GST_EWay_Bill_No`, `GST_EWay_Bill_Date`                                             | text, date           | E-way bill number and date; `null` (or an empty number) when there is no e-way bill.                                                                                                                                             |
| `InvoicePDFLink`                                                                     | text                 | A link to the invoice PDF on the Aaptak e-bill service, when the invoice was sent there; otherwise `null`.                                                                                                                       |
| `TCS_Act_Name`, `TCS_Percent`, `TCS_Amount`                                          | text, number, number | TCS account, rate and amount collected on the invoice; empty / `0` when none.                                                                                                                                                    |
| `Cost_Center_Name`, `Cost_Element_Name`, `CC_Plus_CE_Name`                           | text                 | Cost centre, cost element and their combined name on the invoice, or `(NIL)`.                                                                                                                                                    |
| `Discount_Amount`                                                                    | number               | Total discount of the invoice in ₹, as a positive amount: the sum over all lines of `CD`, `TD`, `SP_CD`, `Scheme_Unit`, `Scheme_Rs`, `AdjustItem`, `AdjustPerUnit`, `SPDiscount` and `AdjustmentRupees` where they are negative. |
| `ItemCount`                                                                          | number               | Number of different item codes on the invoice.                                                                                                                                                                                   |
| `Patient_Name`, `Patient_Mobile_No`                                                  | text                 | Patient details (pharmacy). Filled only when your Logic ERP team has chosen these fields for the response; otherwise empty.                                                                                                      |
| `Shipping_Addres`                                                                    | object               | The delivery address on the invoice (the name is spelt this way). See below.                                                                                                                                                     |
| `Billing_Address`                                                                    | object               | The billing address on the invoice. See below.                                                                                                                                                                                   |
| `ListCreditCard`                                                                     | list                 | Card payments by card type. See below.                                                                                                                                                                                           |
| `LstItems`                                                                           | list                 | The item lines. See below.                                                                                                                                                                                                       |

**`Shipping_Addres` and `Billing_Address`** — when the invoice has no such address, the object is still present with empty texts, `0` numbers and `null` for `Address_ID`, `Location_Name` and `Gst_No`:

| Field                                                 | Type         | Meaning                                                                      |
| ----------------------------------------------------- | ------------ | ---------------------------------------------------------------------------- |
| `Code`                                                | number       | Logic ERP's internal address number; `0` when there is no address.           |
| `Cust_Code`                                           | number       | Internal number of the customer the address belongs to; `0` when not linked. |
| `Contact_Person_Name`                                 | text         | Contact person.                                                              |
| `Phone_Number`, `Mobile_No`, `Email_Id`               | text         | Phone, mobile and e-mail at the address.                                     |
| `Company_Name`                                        | text         | Company name at the address.                                                 |
| `Address_1`, `Address_2`                              | text         | Address lines.                                                               |
| `Complete_Address`                                    | text         | The full address in one text, when kept.                                     |
| `Driving_Directions`                                  | text         | Directions.                                                                  |
| `City_Name`, `State_Name`, `Country_Name`, `Pin_Code` | text         | City, state, country and PIN code.                                           |
| `State_Code`                                          | number       | Internal number of the state.                                                |
| `Country_Code`                                        | number       | Always `0`.                                                                  |
| `Location_Code`, `Location_Name`                      | number, text | Location, when used.                                                         |
| `Latitude`, `Longitude`                               | text         | Map position, when kept.                                                     |
| `Address_ID`, `External_Address_Id`                   | text         | Logic ERP's address ID and the ID your system gave the address, if any.      |
| `Gst_No`                                              | text         | GSTIN at the address.                                                        |
| `Code_Type`                                           | text         | Kind of address, as stored.                                                  |
| `DisplayAddress`                                      | text         | Mobile number and contact person joined with `-`.                            |
| `DeleteAddress`, `SameAsShippingAddress`              | true / false | Always `false` here – ignore.                                                |

**`ListCreditCard`** — one entry per card type used to pay the invoice; empty list when no card was used:

| Field      | Type   | Meaning                                |
| ---------- | ------ | -------------------------------------- |
| `CardName` | text   | Card type, for example `VISA`.         |
| `Amount`   | number | Amount paid with that card type, in ₹. |

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

| Field                                                                                          | Type       | Meaning                                                                                                                                                                                                                                       |
| ---------------------------------------------------------------------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `SL_Txn_Code`                                                                                  | number     | Logic ERP's internal line number.                                                                                                                                                                                                             |
| `Lot_Code`                                                                                     | number     | Internal number of the lot (batch) sold.                                                                                                                                                                                                      |
| `Lot_Number`                                                                                   | text       | Lot number.                                                                                                                                                                                                                                   |
| `LogicUser_Code`                                                                               | text       | Item code as shown in Logic ERP (`UserCode` in [Get Item Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md)).                                             |
| `AddlItemCode`                                                                                 | text       | The item's additional code, for example a barcode.                                                                                                                                                                                            |
| `ItemName`                                                                                     | text       | Item name.                                                                                                                                                                                                                                    |
| `ItemHDName`                                                                                   | text       | Item name with its colour, as shown in the item master.                                                                                                                                                                                       |
| `ItemDescription_1`                                                                            | text       | Item description.                                                                                                                                                                                                                             |
| `ColorName`                                                                                    | text       | Colour, or `(NIL)`.                                                                                                                                                                                                                           |
| `CompanyName`                                                                                  | text       | Item's company (brand), or `(NIL)`.                                                                                                                                                                                                           |
| `Item_Group_Name_1`                                                                            | text       | Item's group.                                                                                                                                                                                                                                 |
| `PackName`                                                                                     | text       | Pack (size) of the item.                                                                                                                                                                                                                      |
| `Packing`                                                                                      | text       | Packing description from the item master.                                                                                                                                                                                                     |
| `CF_1`, `CF_2`, `CF_3`                                                                         | number     | The item's conversion factors.                                                                                                                                                                                                                |
| `Weight`                                                                                       | number     | Always `0`.                                                                                                                                                                                                                                   |
| `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.                                                                                                                                                                                                                         |
| `Rate`                                                                                         | number     | Rate on the line.                                                                                                                                                                                                                             |
| `RRate`                                                                                        | number     | A second rate kept on the line; normally the same as `Rate`.                                                                                                                                                                                  |
| `Net_Rate`                                                                                     | number     | Net rate per unit.                                                                                                                                                                                                                            |
| `MRP_SaleBill`                                                                                 | number     | MRP used on the line.                                                                                                                                                                                                                         |
| `Gross_Amt`                                                                                    | number     | Quantity × rate, in ₹.                                                                                                                                                                                                                        |
| `Sale_Amt`                                                                                     | number     | Taxable value of the line, in ₹.                                                                                                                                                                                                              |
| `Net_Amt`                                                                                      | number     | Line total, in ₹.                                                                                                                                                                                                                             |
| `Round_Amt`                                                                                    | number     | Rounding on the line.                                                                                                                                                                                                                         |
| `Tax_1`, `Tax_2`, `Tax_3`                                                                      | number     | Tax rates (%) of the three tax slots of the line, as set by the tax region.                                                                                                                                                                   |
| `Tax_Amt_1`, `Tax_Amt_2`, `Tax_Amt_3`                                                          | number     | Tax amounts of the three slots, in ₹. `Tax_Amt_3` includes `Surcharge`. In the sandbox's GST setup slot 1 holds CGST and slot 3 SGST or IGST; with a tax-inclusive region slot 2 holds the tax included in the rate as a **negative** amount. |
| `Tax3WithoutSur`, `Surcharge`                                                                  | number     | Tax of slot 3 without surcharge, and the surcharge.                                                                                                                                                                                           |
| `CD`, `TD`, `SP_CD`                                                                            | number     | Cash discount, trade discount and special cash discount amounts in ₹; a discount is 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 (negative = discount).                                                                                                                                                                                 |
| `AdjustPerUnit`, `AdjustItem`, `AdjustmentRupees`, `SPDiscount`                                | number     | Other adjustments and special discount on the line (negative = discount).                                                                                                                                                                     |
| `Freight`, `DebitNote`, `CreditNote`, `Display`, `Handling`, `Postage`, `Labour`, `ExciseUnit` | number     | Charges added on the line, in ₹.                                                                                                                                                                                                              |
| `ExcisePercentage`                                                                             | number     | Despite its name, an amount: the market-fee charge on the line.                                                                                                                                                                               |
| `Sale_Or_SR`                                                                                   | text       | `SL`.                                                                                                                                                                                                                                         |
| `SO_Item_Order_ID`                                                                             | text       | The order-line ID of the sale order line this line was made from; empty when none.                                                                                                                                                            |
| `Item_MRP`, `Item_Sale_Rate`, `Item_Pur_Rate`                                                  | number     | MRP, sale rate and purchase rate in the item master **today**.                                                                                                                                                                                |
| `Item_Sp_Rate_1` … `Item_Sp_Rate_5`                                                            | number     | Special rates 1–5 in the item master today.                                                                                                                                                                                                   |
| `Lot_MRP`, `Lot_Sale_Rate`, `Lot_Pur_Rate`, `Lot_Basic_Rate`                                   | number     | MRP, sale, purchase and basic rate of the lot.                                                                                                                                                                                                |
| `Lot_SP_Rate1` … `Lot_SP_Rate5`                                                                | number     | Special rates 1–5 of the lot.                                                                                                                                                                                                                 |
| `Lot_Sup_Code`, `Lot_Sup_Name`                                                                 | text       | Code and name of the supplier the lot was bought from.                                                                                                                                                                                        |
| `Lot_Bill_No`, `Lot_Purchase_Date`                                                             | text, date | Purchase bill number and date of the lot.                                                                                                                                                                                                     |
| `Lot_Expiry_Date`, `Lot_Mfg_Date`                                                              | date       | Expiry and manufacturing date of the lot; empty when none.                                                                                                                                                                                    |
| `Godown_Name`                                                                                  | text       | Godown the goods were taken from, or `(NIL)`.                                                                                                                                                                                                 |
| `Agent_Name`, `Agent_ShortName`                                                                | text       | The line's agent and its short name, or `NIL`.                                                                                                                                                                                                |
| `Scheme_Campaign_Group_Name`, `Scheme_Campaign_Name`                                           | text       | The scheme campaign applied on the line. Filled only when your Logic ERP team has switched on scheme campaigns for this endpoint; otherwise empty.                                                                                            |
| `Invoice_Prescription_Days`                                                                    | text       | Prescription days (pharmacy); `"0"` unless patient details are chosen for the response.                                                                                                                                                       |
| `ListOtherAgents`                                                                              | list       | Further agents on the line. See below.                                                                                                                                                                                                        |

**`ListOtherAgents`** — extra agents linked to the line, with their commission; usually an empty list:

| Field             | Type   | Meaning                   |
| ----------------- | ------ | ------------------------- |
| `Agent_Name`      | text   | Agent's name.             |
| `Agent_ShortName` | text   | Agent's short name.       |
| `Commission_P`    | number | Agent's commission, in %. |

### **Example response**

```json
{
  "GetData": [
    {
      "Vouch_Code": 1452,
      "Bill_No": "WSL-15",
      "New_Bill_No": "2627/2/WSL-15",
      "Bill_Date": "16/04/2026",
      "Bill_Time": "16/04/2026 01:08 PM",
      "Account_Code": "C1045",
      "Account_Entry_Customer": "(NIL)",
      "Account_Entry_User_Code": "0",
      "Account_Name": "SHREE GANESH TEXTILES",
      "Customer_Code": "C1045",
      "Customer_Name": "SHREE GANESH TEXTILES",
      "Agent_Name": "MAHESH KUMAR",
      "Quantity": 2.0,
      "Gross_Amount": 2400.0,
      "Net_Amount": 2520.0,
      "Total_Tax": "120",
      "Branch_Name": "LUDHIANA MAIN",
      "Branch_Code": 2,
      "Currency_Name": "INR",
      "Tax_Region_Name": "CGST/SGST",
      "Action_Code": "N",
      "Type": "SL",
      "Branch_Short_Name": "LDH",
      "Doc_Prefix": "WSL",
      "Doc_Number": 15,
      "RCU_Membership_Series": "RC",
      "RCU_Membership_Number": 4410,
      "Retail_Cust_Name": "Anita Sharma",
      "Retail_Cust_Mobile_No": "9814012345",
      "Retail_Cust_Email_ID": "",
      "SO_Order_No": "SO 33",
      "SO_Order_Date": "15/04/2026",
      "SO_Party_Order_No": "PO-7781",
      "SO_Party_Order_Date": "14/04/2026",
      "Credit_Note_Bill_Amount": 0.0,
      "Gr_Number": "LR-5521",
      "Gr_Date": "16/04/2026",
      "Order_No": "SO 33",
      "Order_Date": "15/04/2026",
      "Remarks1": "",
      "Cases": "1",
      "Transport_Mode": "BY ROAD",
      "DNParty_Name": "(NIL)",
      "CNParty_Name": "(NIL)",
      "DISPParty_Name": "(NIL)",
      "HANDParty_Name": "(NIL)",
      "POSTParty_Name": "(NIL)",
      "DN_Desc": "",
      "CN_Desc": "",
      "Display_Desc": "",
      "Challan_Date": "",
      "Challan_no": "",
      "DD_Chq": "0",
      "DD_Chq_No": "",
      "DD_Chq_Amt": 0.0,
      "GR_Number_2": "",
      "GR_Date_2": "",
      "Issue_Time": "16/04/2026 01:10 PM",
      "Removal_Time": "",
      "Trans_Name": "PUNJAB ROADWAYS",
      "Remarks2": "",
      "Remarks3": "",
      "Credit_Note_Amount": 0.0,
      "ST_Branch_Code": 0,
      "RCU_Create_Date": "10/03/2024",
      "RCU_State": "PUNJAB",
      "RCU_Country": "INDIA",
      "RCU_CountryCode": "",
      "Credit_Amount": 0.0,
      "Cash_Amount": 520.0,
      "Gift_Voucher_Amount": 0.0,
      "Discount_Coupon_No": "",
      "Discount_Coupon_Amt": 0.0,
      "Bill_Cancelled": false,
      "GST_EInvoice_IRN_No": "",
      "GST_EInvoice_QR_Image": "",
      "GST_EInvoice_Acknowledgement_No": "",
      "GST_EInvoice_Acknowledgement_Date": null,
      "GST_EWay_Bill_No": null,
      "GST_EWay_Bill_Date": null,
      "InvoicePDFLink": null,
      "TCS_Act_Name": "",
      "TCS_Percent": 0.0,
      "TCS_Amount": 0.0,
      "CC_Plus_CE_Name": "(NIL)",
      "Cost_Center_Name": "(NIL)",
      "Cost_Element_Name": "(NIL)",
      "Credit_Card_Amount": 2000.0,
      "Discount_Amount": 0.0,
      "ItemCount": 1,
      "Patient_Name": "",
      "Patient_Mobile_No": "",
      "Shipping_Addres": {
        "Code": 0, "Cust_Code": 0, "Contact_Person_Name": "", "Phone_Number": "", "Address_1": "", "Address_2": "",
        "Driving_Directions": "", "City_Name": "", "Code_Type": "", "Country_Name": "", "Email_Id": "", "Location_Code": 0,
        "Mobile_No": "", "Pin_Code": "", "State_Name": "", "Company_Name": "", "Latitude": "", "Longitude": "",
        "Address_ID": null, "Complete_Address": "", "External_Address_Id": "", "Location_Name": null, "State_Code": 0,
        "Country_Code": 0, "DisplayAddress": "-", "DeleteAddress": false, "SameAsShippingAddress": false, "Gst_No": null
      },
      "Billing_Address": {
        "Code": 0, "Cust_Code": 0, "Contact_Person_Name": "", "Phone_Number": "", "Address_1": "", "Address_2": "",
        "Driving_Directions": "", "City_Name": "", "Code_Type": "", "Country_Name": "", "Email_Id": "", "Location_Code": 0,
        "Mobile_No": "", "Pin_Code": "", "State_Name": "", "Company_Name": "", "Latitude": "", "Longitude": "",
        "Address_ID": null, "Complete_Address": "", "External_Address_Id": "", "Location_Name": null, "State_Code": 0,
        "Country_Code": 0, "DisplayAddress": "-", "DeleteAddress": false, "SameAsShippingAddress": false, "Gst_No": null
      },
      "ListCreditCard": [
        { "CardName": "VISA", "Amount": 2000.0 }
      ],
      "LstItems": [
        {
          "SL_Txn_Code": 3310,
          "Lot_Code": 24120,
          "Lot_Number": "L-2604",
          "AddlItemCode": "8901234567012",
          "LogicUser_Code": "KUR-1001-M",
          "PackName": "M",
          "ItemName": "COTTON KURTA",
          "ItemHDName": "COTTON KURTA BLUE",
          "ItemDescription_1": "Cotton kurta, straight fit",
          "ColorName": "BLUE",
          "CompanyName": "SHREE GANESH",
          "CF_1": 1.0,
          "CF_2": 1.0,
          "CF_3": 1.0,
          "Weight": 0.0,
          "Item_Sale_Rate": 1200.0,
          "Item_Sp_Rate_1": 0.0,
          "Item_Sp_Rate_2": 0.0,
          "Item_Sp_Rate_3": 0.0,
          "Item_Sp_Rate_4": 0.0,
          "Item_Sp_Rate_5": 0.0,
          "Item_Pur_Rate": 750.0,
          "Item_MRP": 1499.0,
          "HSN_Code": "62113990",
          "Quantity": 2.0,
          "Lot_MRP": 1499.0,
          "Rate": 1200.0,
          "Tax_Amt_1": 60.0,
          "Tax_Amt_3": 60.0,
          "MRP_SaleBill": 1499.0,
          "Gross_Amt": 2400.0,
          "Net_Amt": 2520.0,
          "Round_Amt": 0.0,
          "Net_Rate": 1200.0,
          "Sale_Amt": 2400.0,
          "CD": 0.0,
          "TD": 0.0,
          "SP_CD": 0.0,
          "Scheme_Unit": 0.0,
          "Scheme_Rs": 0.0,
          "CD_Per": 0.0,
          "TD_Per": 0.0,
          "SP_CD_Per": 0.0,
          "Sale_Or_SR": "SL",
          "Lot_Sale_Rate": 1200.0,
          "Lot_Pur_Rate": 750.0,
          "Lot_Basic_Rate": 750.0,
          "Lot_SP_Rate1": 0.0,
          "Lot_SP_Rate2": 0.0,
          "Lot_SP_Rate3": 0.0,
          "Lot_SP_Rate4": 0.0,
          "Lot_SP_Rate5": 0.0,
          "SO_Item_Order_ID": "",
          "Tax_Amt_2": 0.0,
          "Tax3WithoutSur": 60.0,
          "Surcharge": 0.0,
          "ExciseUnit": 0.0,
          "AdjustPerUnit": 0.0,
          "AdjustItem": 0.0,
          "Freight": 0.0,
          "AdjustmentRupees": 0.0,
          "SPDiscount": 0.0,
          "DebitNote": 0.0,
          "CreditNote": 0.0,
          "Display": 0.0,
          "Handling": 0.0,
          "Postage": 0.0,
          "ExcisePercentage": 0.0,
          "Labour": 0.0,
          "RRate": 1200.0,
          "Tax_1": 2.5,
          "Tax_2": 0.0,
          "Tax_3": 2.5,
          "Agent_Name": "NIL",
          "Agent_ShortName": "NIL",
          "Item_Group_Name_1": "KURTA",
          "Lot_Sup_Code": "S2001",
          "Lot_Sup_Name": "JAIPUR HANDLOOM HOUSE",
          "Lot_Bill_No": "JHH-118",
          "Lot_Purchase_Date": "02/04/2026",
          "Lot_Expiry_Date": "",
          "Lot_Mfg_Date": "",
          "Scheme_Campaign_Group_Name": "",
          "Scheme_Campaign_Name": "",
          "Godown_Name": "MAIN",
          "HSN_Serial_No": "62113990",
          "HSN_Description": "GARMENTS OF COTTON",
          "HSN_UOM": "PCS-PIECES",
          "Packing": "PCS",
          "Invoice_Prescription_Days": "0",
          "ListOtherAgents": []
        }
      ]
    }
  ],
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 18901,
  "resultSize": "6 KB"
}
```

### **Messages you may see**

| Message                                                                                                              | Meaning                                                                                                                                                                                                        | What to do                                                                                            |
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| *No Pending Sale Bill 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 sale invoice matched: the batch held only sale returns, stock transfers or invoices outside your filters, nothing in the period was a sale invoice, or the numbers, codes or lookup you sent found nothing. | With a bookmark: store the new `LastGlobalModifyCode` and call again. Otherwise: check what you sent. |
| `Invalid code list: '…'` (with `Status: false`; the text you sent in place of …)                                     | `Branch_Codes_From` or `Branch_Codes_To` contains something other than numbers and commas.                                                                                                                     | Send branch codes as numbers separated by commas.                                                     |
| `Invalid Challan_No : …` followed by the expected form (with `Status: false`; what you sent in place of …)           | `Challan_No` is not a challan prefix and number joined with `-`, or the part after `-` is not a number.                                                                                                        | Send the challan as prefix-number, for example `"GCH-154"`.                                           |
| `API settings for this route are not configured for the API template.` (with `Status: false`)                        | The settings of this endpoint have not been saved for your API site.                                                                                                                                           | Ask your Logic ERP support team.                                                                      |
| `Invalid code in list: '…'. Only numeric codes are allowed.` (with `Status: false`; the part you sent in place of …) | `Doc_Codes` contains something other than numbers and commas.                                                                                                                                                  | Send `Doc_Codes` as numbers separated by commas.                                                      |


---

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

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

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

```
GET https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/sale/pull/get-sale-invoices.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.
