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
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.
How this differs from Get Item Schemes
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
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
Yes – send null
—
Leaving the field out gives Invalid Date From... A date here (yyyy-MM-dd) is meant to return only schemes whose last day is on or after that date, but at present it makes the call fail – see Known limitations.
DateTo
date
Yes – send null
—
Not used to filter, but it must be sent: leaving it out gives Invalid Date To.. 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
DateFromasnull, every record is returned – current, future and expired. Filter onDate_From/Date_Toin 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_FromandDate_Tocome as text in the server's short date format – for example31/01/2026or31/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) withGetDatanulland a message beginningNo Scheme found....
Known limitations
DateFromdoes not work. WhenDateFromandDateToare both dates, the call fails (Status: false) with a message containingConversion failed when converting character string to smalldatetime data type.(the reason may come with technical detail – read the first line). Send both asnulland filter onDate_From/Date_Toyourself.The
No Scheme found...message is followed by technical text. Only the first words matter.
Example request
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 – a date makes the call fail (see the known issues on this page).
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.
The user name and password of your API site.
Send 0. This endpoint does not use the change-log bookmark; any other value is only echoed back in LastGlobalModifyCode.
Leaving the field out gives Invalid Date From... A date here (yyyy-MM-dd) is meant to return only schemes whose last day is on or after that date, but at present it makes the call fail – see Known limitations.
Not used to filter, but it must be sent: leaving it out gives Invalid Date To.. When DateFrom is a date, DateTo must also be a date, on or after DateFrom.
Always HTTP 200. Check Status, Message and GetData.
See the Status rules on this page and on How Every API Call Works.
Why the call failed, or a note. The reason may be followed by technical detail - read the first line.
The change-log bookmark (see How Every API Call Works).
Size of the answer, for example "2 KB".
No login was sent.
POST /api/GetItemSchemesForExport HTTP/1.1
Host: demo.logicerp.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"GlobalModifyCode": 0,
"DateFrom": null,
"DateTo": null
}{
"GetData": [
{
"ItemCode": "text",
"Date_From": "text",
"Date_To": "text",
"CD_P": 1,
"TD_P": 1,
"Scheme_Unit": 1,
"New_Rate": 1,
"Apply_Scheme_For_All_Dates": true,
"Issue_All_Qty_As_Free": true
}
],
"Status": true,
"Message": "text",
"LastGlobalModifyCode": 1,
"resultSize": "text"
}Response fields
Each item in GetData:
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
Messages you may see
No Scheme found... followed by technical text (with Status: true)
Nothing is set up on the export scheme screen. GetData is null.
Nothing to copy; call again later.
Invalid Date From..
DateFrom was left out or is not a date. Status is true here – check GetData, which is null.
Send "DateFrom": null.
Invalid Date To.
DateTo was left out or 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. Status is true here – check GetData, which is null.
Send both as null (see Known limitations).
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 both as null (see Known limitations).
A message containing Conversion failed when converting character string to smalldatetime data type. (with Status: false; the reason may come with technical detail – read the first line)
DateFrom and DateTo were both dates (see Known limitations).
Send both dates as null.