> 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/masters/pull/get-item-schemes-discounts-and-rates-for-export.md).

# Get Item Schemes, Discounts and Rates for Export

Returns the **item-wise schemes, discounts and special rates** set up in Logic ERP under *Define Item Wise Schemes/Disc/Rates for Export*: for each item, the period, the **cash discount %**, **trade discount %**, **scheme amount per unit**, a **new rate**, and how the scheme is applied. Use it to copy these terms into another system – for example a distributor's or a branch's billing software – that bills the same items.

### **Endpoint**

| Name          | Detail                                            |
| ------------- | ------------------------------------------------- |
| Address       | `https://your-server/api/GetItemSchemesForExport` |
| 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).

### **How this differs from Get Item Schemes**

|                          | Get Item Schemes                                                                | Get Item Schemes for Export (this page)                                         |
| ------------------------ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Comes from               | *Setup Item Wise Schemes*                                                       | *Define Item Wise Schemes/Disc/Rates for Export*                                |
| Shape                    | One record per scheme, with a list of **slabs** (buy so much, get so much free) | One **flat** record per item and period: discount %s, scheme per unit, new rate |
| Free goods               | Free quantity per slab                                                          | Only a yes/no: *issue all quantity as free*                                     |
| Date filter (`DateFrom`) | Schemes **running on** that date                                                | Schemes **not yet ended** on that date (running or starting later)              |
| Barcode / EAN            | Returned                                                                        | Not returned                                                                    |
| Dates in the response    | Day/month/year, four-digit year                                                 | The server's short date format – the year may have two digits (see below)       |

### **Request fields**

| Field              | Type   | Required | Default | Meaning                                                                                                                                   |
| ------------------ | ------ | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `GlobalModifyCode` | number | No       | `0`     | Send `0`. This endpoint does not use the change-log bookmark; any other value is only echoed back in `LastGlobalModifyCode`.              |
| `DateFrom`         | date   | No       | —       | Leave it out or send `null` to get every record. A date here (`yyyy-MM-dd`) returns only schemes whose last day is on or after that date. |
| `DateTo`           | date   | No       | —       | Not used to filter. When `DateFrom` is a date, `DateTo` must also be a date, on or after `DateFrom`.                                      |

`Doc_Codes`, `Branch_Codes_From` and `Doc_Num_Like` are ignored. Every call returns the full list that matches. `LastGlobalModifyCode` in the response is `0` (or the number you sent) – do not store it.

### **Rules Logic ERP applies**

* With `DateFrom` as `null`, **every** record is returned – current, future and expired. Filter on `Date_From` / `Date_To` in your system if you need only running ones.
* Records are for **all branches** and **all parties**; the setup screen has no branch or party.
* Items are not checked for being active.
* Records come in no particular order.
* `Date_From` and `Date_To` come as text in the **server's short date format** – for example `31/01/2026` or `31/01/26` – so be ready to parse both. A time is added only when one was stored; the field is empty when no date was stored.
* When nothing is found the call still succeeds (`Status: true`) with `GetData` `null` and a message beginning `No Scheme found...`.

### **Example request**

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

### **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**. Leave `DateFrom` and `DateTo` as `null` to see every record, or send both as dates to see only schemes that have not ended by `DateFrom`.

## Get Item Schemes, Discounts and Rates for Export

> Returns the item-wise schemes, discounts and special rates set up in Logic ERP under Define Item Wise Schemes/Disc/Rates for Export: for each item, the period, the cash discount %, trade discount %, scheme amount per unit, a new rate, and how the scheme is applied. Use it to copy these terms into another system – for example a distributor's or a branch's billing software – that bills the same items.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Masters - 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":{"/GetItemSchemesForExport":{"post":{"tags":["Masters - Pull"],"operationId":"GetItemSchemesForExport","summary":"Get Item Schemes, Discounts and Rates for Export","description":"Returns the item-wise schemes, discounts and special rates set up in Logic ERP under Define Item Wise Schemes/Disc/Rates for Export: for each item, the period, the cash discount %, trade discount %, scheme amount per unit, a new rate, and how the scheme is applied. Use it to copy these terms into another system – for example a distributor's or a branch's billing software – that bills the same items.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"GlobalModifyCode":{"type":"integer","description":"Send `0`. This endpoint does not use the change-log bookmark; any other value is only echoed back in `LastGlobalModifyCode`."},"DateFrom":{"type":"string","nullable":true,"description":"Leave it out or send `null` to get every record. A date here (`yyyy-MM-dd`) returns only schemes whose last day is on or after that date."},"DateTo":{"type":"string","nullable":true,"description":"Not used to filter. When `DateFrom` is a date, `DateTo` must also be a date, on or after `DateFrom`."}}}}}},"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":{"ItemCode":{"type":"string","description":"The item code shown in Logic ERP."},"Date_From":{"type":"string","description":"First day of the scheme, in the server's short date format. Empty when not set."},"Date_To":{"type":"string","description":"Last day of the scheme, in the server's short date format. Empty when not set."},"CD_P":{"type":"number","description":"Cash discount %. `0` when none."},"TD_P":{"type":"number","description":"Trade discount %. `0` when none."},"Scheme_Unit":{"type":"number","description":"Scheme amount per unit, in ₹. `0` when none."},"New_Rate":{"type":"number","description":"The new rate entered on the setup screen, in ₹. `0` when none."},"Apply_Scheme_For_All_Dates":{"type":"boolean","description":"`true` when Apply Scheme for all Dates is ticked."},"Issue_All_Qty_As_Free":{"type":"boolean","description":"`true` when Issue all Quantity as Free is chosen."}}},"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`:

| Field                        | Type         | Meaning                                                                         |
| ---------------------------- | ------------ | ------------------------------------------------------------------------------- |
| `ItemCode`                   | text         | The item code shown in Logic ERP.                                               |
| `Date_From`                  | text         | First day of the scheme, in the server's short date format. Empty when not set. |
| `Date_To`                    | text         | Last day of the scheme, in the server's short date format. Empty when not set.  |
| `CD_P`                       | number       | Cash discount %. `0` when none.                                                 |
| `TD_P`                       | number       | Trade discount %. `0` when none.                                                |
| `Scheme_Unit`                | number       | Scheme amount per unit, in ₹. `0` when none.                                    |
| `New_Rate`                   | number       | The *new rate* entered on the setup screen, in ₹. `0` when none.                |
| `Apply_Scheme_For_All_Dates` | true / false | `true` when *Apply Scheme for all Dates* is ticked.                             |
| `Issue_All_Qty_As_Free`      | true / false | `true` when *Issue all Quantity as Free* is chosen.                             |

### **Example response**

```json
{
  "GetData": [
    {
      "ItemCode": "TEA-500",
      "Date_From": "01/10/26",
      "Date_To": "31/12/26",
      "CD_P": 2.0,
      "TD_P": 5.0,
      "Scheme_Unit": 3.5,
      "New_Rate": 0.0,
      "Apply_Scheme_For_All_Dates": false,
      "Issue_All_Qty_As_Free": false
    }
  ],
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 0,
  "resultSize": "1 KB"
}
```

### **Messages you may see**

| Message                                                           | Meaning                                                                                                                    | What to do                                      |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
| `No Scheme found...` (with `Status: true`)                        | Nothing is set up on the export scheme screen (or nothing ends on or after `DateFrom`). `GetData` is `null`.               | Nothing to copy; call again later.              |
| `Invalid Date From..`                                             | `DateFrom` is not a date. **`Status` is `true` here – check `GetData`, which is `null`.**                                  | Send `"DateFrom": null`.                        |
| `Invalid Date To.`                                                | `DateTo` is not a date. **`Status` is `true` here – check `GetData`, which is `null`.**                                    | Send `"DateTo": null`.                          |
| `If Date From exists then Date To cannot be null..Please Check..` | `DateFrom` was a date and `DateTo` was `null` or left out. **`Status` is `true` here – check `GetData`, which is `null`.** | Send `DateTo` as a date too, or both as `null`. |
| `Date From cannot be greater than Date To...Please Check..`       | `DateFrom` was later than `DateTo`. **`Status` is `true` here – check `GetData`, which is `null`.**                        | Send `DateTo` on or after `DateFrom`.           |


---

# 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/masters/pull/get-item-schemes-discounts-and-rates-for-export.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.
