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

Edit Branch Tax Group Taxes

Sets which sale or purchase tax type applies to an item group in a branch tax group, region by region (for example CGST/SGST, IGST). Name the tax group directly, or name a branch and Logic ERP uses the tax group that branch is linked to. Use it to keep branch-wise GST settings for item groups in step with your system.

Endpoint

Name
Detail

Address

https://your-server/api/EditBranchTaxGroupWiseGroupTaxes

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

BranchTaxGroupName

text

Either this or BranchCode

empty

Name of the branch tax group, exactly as set up in Logic ERP, for example "PUNJAB STORES". When filled, BranchCode is ignored.

BranchCode

number

Either this or BranchTaxGroupName

0

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

TaxType

text

Yes

–

"SL" to set the sale tax, "PU" to set the purchase tax. Capital letters only, no spaces. One request sets one side only.

ListTaxRegions

list

No – but nothing is saved without it

empty list

The tax regions to set. See below.

BranchShortName is accepted but ignored.

ListTaxRegions – one entry per tax region:

Field
Type
Required
Default
Meaning

TaxRegionName

text

Yes

–

Name of the tax region as set up in Logic ERP, for example "CGST/SGST" or "IGST". Spaces before and after are ignored; capital and small letters are not distinguished.

ListGroups

list

No – but nothing is saved for the region without it

empty list

The item groups and their tax type in this region. See below.

ListGroups – one entry per item group:

Field
Type
Required
Default
Meaning

GroupName

text

Either this or GroupShortName

empty

Name of the item group (as in Group_Name1 … Group_Name30 in Get Item Master). When filled, GroupShortName is not looked at.

GroupShortName

text

Either this or GroupName

empty

Short name of the item group.

TaxTypeName

text

Yes

–

The first part of the tax type's name in Logic ERP – see the rule below.

Rules Logic ERP applies

  • A tax group is shared. The taxes belong to the tax group, not to one branch: every branch linked to the group is affected. Naming a branch only tells Logic ERP which group to change.

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

  • How the tax type is found. Logic ERP looks for a tax type whose name is TaxTypeName, a hyphen, then the item group's name as stored in Logic ERP – for example TaxTypeName "GST 5%" with group "FOOTWEAR" needs a tax type named GST 5%-FOOTWEAR. The tax type must also be of the side you chose (TaxType) and of the same GST kind as the region (CGST/SGST, IGST or non-GST).

  • One group level per tax group. All item groups in one tax group must come from the same group level (for example all from level 2). If the tax group already has sale taxes (for "SL") or purchase taxes (for "PU") set for groups of another level, the request is refused. This also applies within one request: send groups of one level only.

  • Item groups are matched by name or short name across all group levels; spaces before and after are ignored. If the same name is used at more than one level, Logic ERP takes one of them – use a name that is unique. Fill GroupName or GroupShortName on every line: with both empty, Logic ERP looks for a group whose short name is empty and may pick an unrelated group.

  • For each group, only the tax of the region and side you sent is set. Other regions, and the other side (sale or purchase), keep their values. A group that has no taxes in the tax group yet is added.

  • Lines are processed in order and saved together at the end. If anything fails while saving, nothing is kept.

  • An empty ListTaxRegions, or a region with an empty ListGroups, saves nothing for it and is not reported.

Known issue – a refused line leaves the request unfinished. When a line is refused (unknown region, group or tax type, or a group of another level), the earlier lines of the same request have already been written but are not committed. Treat the whole request as not saved: correct it and send the whole request again. Sending the same lines twice is safe – each one simply sets the same tax again.

Known issue – the tax type name must carry the group name. A tax type named only TaxTypeName (for example GST 5%) is never found; Logic ERP always adds a hyphen and the group's name. If your tax types are not named that way, the request answers Invalid Tax Type : … – ask your Logic ERP team before using this endpoint.

Known issue – a missing TaxType gives an incomplete message. Leaving TaxType out answers Invalid Tax Type : with nothing after it.

Example request

For this request Logic ERP needs sale tax types named GST 5%-FOOTWEAR, GST 12%-APPAREL (CGST/SGST kind) and IGST 5%-FOOTWEAR (IGST kind).

Response

  • Status – true when all lines were saved.

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

  • LastSavedCode – always 0.

  • request_ID – filled once the tax group and TaxType have been accepted. When the request is refused before that it is null.

Example response

Messages you may see

Message
Meaning
What to do

Branch Code is missing...

Neither BranchTaxGroupName nor BranchCode was sent.

Send one of them.

Invalid Branch Code...

No branch has this BranchCode.

Check the code with Get Branch Info.

Branch Tax Group Not Defined...

The branch is not linked to a tax group, or no tax group has the name you sent.

Check the name, or ask your Logic ERP team to link the branch to a tax group.

Invalid Tax Type : … (the TaxType you sent)

TaxType is not exactly SL or PU.

Send "SL" or "PU".

Invalid Tax Region Name : …

The region name is empty or not found.

Check the region name in Logic ERP. See the first known issue.

Invalid Group Name : …

No item group has this name (or short name).

Check the group. See the first known issue.

Records Exist For Other Group Levels - ( …) (the other level numbers)

The tax group already has taxes of this side for groups of another level.

Use groups of the level already in use, or ask your Logic ERP team. See the first known issue.

Invalid Tax Type : … (the tax type name Logic ERP looked for, for example GST 5%-FOOTWEAR)

No tax type of this side and GST kind has that name.

See the second known issue.

A technical error (with Status: false)

Something failed while saving, for example 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.