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

Edit Branch Rate Group Rates

Sets item rates for a branch rate group: the basic, purchase, sale and special rates and the MRP that apply to an item in every branch linked to that rate group. Name the rate group directly, or name a branch and Logic ERP uses the rate group that branch is linked to. Use it to push branch-wise price changes from your system into Logic ERP.

Endpoint

Name
Detail

Address

https://your-server/api/EditBranchRateGroupRates

Method

POST

Authorization

Basic Auth

The response and the messages every endpoint can return are explained in How Every API Call Works.

Request fields

Field
Type
Required
Default
Meaning

BranchRateGroupName

text

Either this or BranchCode

empty

Name of the branch rate group, exactly as set up in Logic ERP, for example "NORTH ZONE RATES". When filled, BranchCode is ignored.

BranchCode

number

Either this or BranchRateGroupName

0

Logic ERP's branch code (Branch_Code in Get Branch Info). Used only when BranchRateGroupName is empty: the rates are written to the rate group that branch is linked to.

ListItems

list

No – but nothing is saved without it

empty list

The items and their rates. See below.

BranchShortName is accepted but ignored – a branch can only be named by BranchCode here.

ListItems – one entry per item:

Field
Type
Required
Default
Meaning

ItemCode

text

Either this or EANCode

empty

The item code shown in Logic ERP (UserCode in Get Item Master). When filled, EANCode is not looked at.

EANCode

text

Either this or ItemCode

empty

The item's main additional code / barcode (AddlItemCode in Get Item Master). Other barcodes of the item (ListEANCode) are not searched.

MRP

number

No

0

MRP in ₹.

Sale_Rate

number

No

0

Sale rate in ₹.

Basic_Rate

number

No

0

Basic rate in ₹.

Pur_Rate

number

No

0

Purchase rate in ₹.

SP_Rate1 … SP_Rate5

number

No

0

Special rates 1 to 5 in ₹.

A rate is changed only when you send a value greater than 0. A rate you leave out, or send as 0, keeps its current value.

Rules Logic ERP applies

  • A rate group is shared. The rates belong to the rate group, not to one branch: every branch linked to the group gets the new rates. Naming a branch only tells Logic ERP which group to change.

  • With BranchCode, the branch must exist and must be linked to a rate group. With BranchRateGroupName, the name must match a branch rate group in Logic ERP; capital and small letters are not distinguished on a standard installation.

  • ItemCode and EANCode are matched exactly as sent – spaces are not removed; capital and small letters are not distinguished on a standard installation.

  • Items are checked first. Every line is looked up before anything is written. If one item is not found, the request stops with Status: false and nothing is saved.

  • All or nothing. The lines are then saved together: if anything fails while saving, none of them are kept.

  • An item that has no rates in the group yet is added to the group; rates you do not send start at 0. An item already in the group is updated.

  • A rate cannot be cleared to 0 through this endpoint – 0 means "leave unchanged".

  • If the same item appears twice in ListItems, both lines are applied in order, so the later line wins for the rates it sends.

  • Logic ERP also keeps a day-wise history of rate changes for the group: one history line per item per day, updated by later calls on the same day.

  • An empty ListItems answers Status: true and saves nothing.

  • Branch and financial year play no other part: the rates are not tied to a date.

Known issue – a line with neither ItemCode nor EANCode changes an unrelated item. Logic ERP then looks for an item whose additional code is empty, and most databases have many such items, so the rates are written to whichever one is found first – with Status: true. Always fill ItemCode (preferred) or EANCode on every line.

Known issue – wrong ItemCode gives a misleading message. When ItemCode is not found, the message is Invalid EAN Code : followed by the EANCode you sent – usually nothing. Read it as "this item was not found" and check the item code.

Example request

By branch, two items:

By rate group name:

Response

  • Status – true when all lines were saved.

  • Message – empty when saved; otherwise the reason (see below).

  • LastSavedCode – always 0; this endpoint does not return a record number.

  • request_ID – filled once the items have been checked. When the request is refused earlier (branch, rate group or item not found) it is null.

Example response

Messages you may see

Message
Meaning
What to do

Branch Code Is Missing...

Neither BranchRateGroupName nor BranchCode was sent.

Send one of them.

Invalid Branch Code...

No branch has this BranchCode.

Check the code with Get Branch Info.

Branch Rate Group Not Defined...

The branch exists but is not linked to a rate group.

Ask your Logic ERP team to link the branch to a rate group, or send BranchRateGroupName.

Branch Rate Group not Defined...

No branch rate group has the name you sent.

Check the name in Logic ERP.

Invalid EAN Code : … (the EANCode you sent)

An item in ListItems was not found – by ItemCode when it was filled, otherwise by EANCode. Nothing was saved.

Check the code. See the known issue above.

A technical error (with Status: false)

Something failed while saving, for example ListItems sent as null or a name containing '. Nothing was saved. The reason may be followed by technical detail – read the first line.

Correct the request and send it again.