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

# Get Item Schemes

Returns the **item-wise schemes** set up in Logic ERP under *Setup Item Wise Schemes*: for each item, the period the scheme runs and its **slabs** – how much must be bought to reach each slab and the **free quantity** given at that slab. Use it to show running offers in your own billing or ordering system, or to check which items are on a scheme on a given day.

### **Endpoint**

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

This endpoint **does not use the change log**: `GlobalModifyCode`, `DateTo`, `Doc_Codes`, `Branch_Codes_From` and `Doc_Num_Like` are ignored, and every call returns the full list of schemes that match. `LastGlobalModifyCode` is always `0` – do not store it.

### **Request fields**

| Field      | Type | Required | Default | Meaning                                                                                                                                                                            |
| ---------- | ---- | -------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DateFrom` | date | No       | —       | Send `null` or leave it out to get all schemes. A date here (`yyyy-MM-dd`) returns only the schemes **running on that date** (starting on or before it and ending on or after it). |

An empty body `{}` is a valid request.

### **Rules Logic ERP applies**

* Without `DateFrom`, **every** item scheme is returned – current, future and expired. Filter on `DataFrom` / `DataTo` in your system if you need only running schemes.
* One record is returned for each scheme. An item that has several schemes (for example for different periods) appears once per scheme.
* Schemes are returned for **all branches** and **all parties**. A scheme that Logic ERP applies only to a particular customer, customer group or group of branches is returned like any other, and the response does not say who it is limited to.
* Items are not checked for being active.
* The slabs of each scheme (`ListSchemeSlab`) are in ascending order of `Scheme_Slab`. The schemes themselves come in no particular order.
* `Qty_Or_Value` tells you what the slabs are measured in: `Q` = the quantity bought, `V` = the value bought (in ₹).
* `DataFrom` and `DataTo` come as text, day/month/year with a four-digit year and `/` – for example `31/01/2026`. They are empty when the scheme has no start or end date.
* Only schemes set up for a **single item** are returned. Schemes set up for a whole item group or for a company (brand) are not returned.

### **Example request**

All schemes:

```json
{
  "DateFrom": 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` as `null` to see every scheme, or send a date to see the schemes running that day.

## Get Item Schemes

> Returns the item-wise schemes set up in Logic ERP under Setup Item Wise Schemes: for each item, the period the scheme runs and its slabs – how much must be bought to reach each slab and the free quantity given at that slab. Use it to show running offers in your own billing or ordering system, or to check which items are on a scheme on a given day.

```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":{"/GetItemScheme":{"post":{"tags":["Masters - Pull"],"operationId":"GetItemScheme","summary":"Get Item Schemes","description":"Returns the item-wise schemes set up in Logic ERP under Setup Item Wise Schemes: for each item, the period the scheme runs and its slabs – how much must be bought to reach each slab and the free quantity given at that slab. Use it to show running offers in your own billing or ordering system, or to check which items are on a scheme on a given day.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"DateFrom":{"type":"string","nullable":true,"description":"Send `null` or leave it out to get all schemes. A date here (`yyyy-MM-dd`) returns only the schemes running on that date (starting on or before it and ending on or after it)."}}}}}},"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."},"EANCode":{"type":"string","description":"The item's barcode / EAN code, if one is kept."},"DataFrom":{"type":"string","description":"First day of the scheme, for example `01/10/2026`. (The name is spelt `DataFrom`, not `DateFrom`.)"},"DataTo":{"type":"string","description":"Last day of the scheme, for example `31/10/2026`."},"Minimum_Qty":{"type":"number","description":"Minimum quantity set up for the scheme; `0` when none."},"Qty_Or_Value":{"type":"string","description":"`Q` when the slabs are quantities, `V` when they are values in ₹."},"ListSchemeSlab":{"type":"array","items":{"type":"object","properties":{"Scheme_Slab":{"type":"number","description":"The quantity (or value in ₹, when `Qty_Or_Value` is `V`) the customer must buy to reach this slab."},"Free_Qty":{"type":"number","description":"The quantity given free at this slab; `0` when the slab gives no free goods."},"CD_P":{"type":"number","description":"Cash discount % at this slab; `0` when none."},"TD_P":{"type":"number","description":"Trade discount % at this slab; `0` when none."}}},"description":"The slabs of the scheme. 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`:

| Field            | Type   | Meaning                                                                                            |
| ---------------- | ------ | -------------------------------------------------------------------------------------------------- |
| `ItemCode`       | text   | The item code shown in Logic ERP.                                                                  |
| `EANCode`        | text   | The item's barcode / EAN code, if one is kept.                                                     |
| `DataFrom`       | text   | First day of the scheme, for example `01/10/2026`. (The name is spelt `DataFrom`, not `DateFrom`.) |
| `DataTo`         | text   | Last day of the scheme, for example `31/10/2026`.                                                  |
| `Minimum_Qty`    | number | Minimum quantity set up for the scheme; `0` when none.                                             |
| `Qty_Or_Value`   | text   | `Q` when the slabs are quantities, `V` when they are values in ₹.                                  |
| `ListSchemeSlab` | list   | The slabs of the scheme. See below.                                                                |

**`ListSchemeSlab`** – one entry for each slab, lowest first:

| Field         | Type   | Meaning                                                                                            |
| ------------- | ------ | -------------------------------------------------------------------------------------------------- |
| `Scheme_Slab` | number | The quantity (or value in ₹, when `Qty_Or_Value` is `V`) the customer must buy to reach this slab. |
| `Free_Qty`    | number | The quantity given free at this slab; `0` when the slab gives no free goods.                       |
| `CD_P`        | number | Cash discount % at this slab; `0` when none.                                                       |
| `TD_P`        | number | Trade discount % at this slab; `0` when none.                                                      |

### **Example response**

```json
{
  "GetData": [
    {
      "ItemCode": "TEA-500",
      "EANCode": "8901234567012",
      "DataFrom": "01/10/2026",
      "DataTo": "31/10/2026",
      "Minimum_Qty": 0.0,
      "Qty_Or_Value": "Q",
      "ListSchemeSlab": [
        { "Scheme_Slab": 10.0000, "Free_Qty": 1.0, "CD_P": 0.0, "TD_P": 0.0 },
        { "Scheme_Slab": 24.0000, "Free_Qty": 3.0, "CD_P": 0.0, "TD_P": 0.0 }
      ]
    }
  ],
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 0,
  "resultSize": "1 KB"
}
```

### **Messages you may see**

| Message                                               | Meaning                                                      | What to do    |
| ----------------------------------------------------- | ------------------------------------------------------------ | ------------- |
| *(empty)* with `GetData` a list (with `Status: true`) | The call succeeded. An empty list means no scheme is set up. | Use the data. |


---

# 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.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.
