For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

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) is meant to return only the schemes running on that date, but at present it makes the call fail – see Known limitations.

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 – for example 31/01/2026. The separator follows the server's date settings, so do not rely on it being /.

Known limitations

  • DateFrom does not work. Any date sent in DateFrom makes the call fail (Status: false) with the message Conversion failed when converting character string to smalldatetime data type. (the reason may be followed by technical detail – read the first line). Send DateFrom as null and filter on DataFrom / DataTo yourself.

  • Status is false even when the call succeeds. Treat the call as successful when Message is empty and GetData is a list (possibly empty).

  • Minimum_Qty, CD_P and TD_P are always 0, whatever is set up in Logic ERP.

  • Schemes set up for a whole item group or for a company (brand) are kept alongside item schemes in Logic ERP and are currently returned as if they were schemes of a single item. The ItemCode shown for such a record is not the item the scheme applies to. Until this is corrected, check unexpected records with your Logic ERP team.

  • A scheme with no start or end date makes the whole call fail. If even one scheme in Logic ERP was saved without a from or to date, the call returns no data (Status: false) with the message Argument 'Expression' is not a valid value. Ask your Logic ERP team to fill in the dates on that scheme (or remove it), then call again.

Example request

All schemes:

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 – a date makes the call fail (see the known issues on this page).

Get Item Schemes

post

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.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
DateFromstring · nullableOptional

Send null or leave it out to get all schemes. A date here (yyyy-MM-dd) is meant to return only the schemes running on that date, but at present it makes the call fail – see Known limitations.

Responses
200

Always HTTP 200. Check Status, Message and GetData.

application/json
StatusbooleanOptional

See the Status rules on this page and on How Every API Call Works.

MessagestringOptional

Why the call failed, or a note. The reason may be followed by technical detail - read the first line.

LastGlobalModifyCodeintegerOptional

The change-log bookmark (see How Every API Call Works).

resultSizestringOptional

Size of the answer, for example "2 KB".

post/GetItemScheme
POST /api/GetItemScheme HTTP/1.1
Host: demo.logicerp.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 17

{
  "DateFrom": null
}
{
  "GetData": [
    {
      "ItemCode": "text",
      "EANCode": "text",
      "DataFrom": "text",
      "DataTo": "text",
      "Minimum_Qty": 1,
      "Qty_Or_Value": "text",
      "ListSchemeSlab": [
        {
          "Scheme_Slab": 1,
          "Free_Qty": 1,
          "CD_P": 1,
          "TD_P": 1
        }
      ]
    }
  ],
  "Status": true,
  "Message": "text",
  "LastGlobalModifyCode": 1,
  "resultSize": "text"
}

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

Always 0 at present (see Known limitations).

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. Always 0 at present (see Known limitations).

TD_P

number

Trade discount % at this slab. Always 0 at present (see Known limitations).

Example response

Messages you may see

Message
Meaning
What to do

(empty) with GetData a list

The call succeeded (even though Status is false). An empty list means no scheme is set up.

Use the data.

Conversion failed when converting character string to smalldatetime data type. (the reason may be followed by technical detail – read the first line)

A date was sent in DateFrom (see Known limitations). GetData is null.

Send "DateFrom": null.

Argument 'Expression' is not a valid value.

A scheme in Logic ERP has no start or end date (see Known limitations). GetData is null.

Ask your Logic ERP team to fill in the scheme's dates.