> 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/push/edit-item-gst-tax-group.md).

# Edit Item GST Tax Group

Moves one or more items to a different **GST tax group**. In Logic ERP the GST tax group of an item is one of its **item groups**, kept at one of the 30 group levels – which level depends on your company's setup (ask your Logic ERP team). You send the level, the group, and the list of items. The group must **already exist** in Logic ERP; it is never created by this endpoint.

### **Endpoint**

| Name          | Detail                                        |
| ------------- | --------------------------------------------- |
| Address       | `https://your-server/api/EditItemGSTTaxGroup` |
| Method        | `POST`                                        |
| Authorization | Basic Auth                                    |

The response and the common messages 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).

### **Request fields**

Field names are matched without regard to capitals. This endpoint shares its request layout with [Edit Item HSN Code](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/push/edit-item-hsn-code.md) and [Edit Item Rates](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/push/edit-item-rates.md); only the fields below are read. The HSN fields (`HSSerial_No`, `HS_Code`, `HS_Description`, `HS_Short_Desc`, `HS_Long_Desc`, `HS_Type`, `SION_Number`, `SION_Rate`, `Unit_of_Measurement`), `Reason` and the rate fields in `ListItems` are ignored.

| Field                  | Type   | Required       | Default | Meaning                                                                                                                                                                                                                                     |
| ---------------------- | ------ | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GST_Group_Level`      | number | Yes            | `0`     | The group level that holds the GST tax group, `1` to `30`.                                                                                                                                                                                  |
| `GST_Group_Name`       | text   | One of the two | –       | Name of the GST tax group, as shown in Logic ERP (`Group_NameN` in [Get Item Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md), where N is the level). |
| `GST_Group_Short_Name` | text   | One of the two | –       | Short name of the group (`Group_Short_NameN` in Get Item Master). When filled, the group is found by its short name and `GST_Group_Name` is not used to find it. A short name of `(NIL)` counts as empty.                                   |
| `ListItems`            | list   | Yes            | –       | The items to change, at least one. See below.                                                                                                                                                                                               |

**`ListItems`** – one entry per item:

| Field      | Type | Required       | Default | Meaning                                                                                                                                                  |
| ---------- | ---- | -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ItemCode` | text | One of the two | `""`    | The item code as shown in Logic ERP (`UserCode` in Get Item Master). When filled, `EANCode` is not used.                                                 |
| `EANCode`  | text | One of the two | `""`    | The item's barcode (`AddlItemCode` in Get Item Master). Used only when `ItemCode` is empty. Other barcodes of the item (`ListEANCode`) are not searched. |

Codes and group names are matched without regard to capitals; spaces at the end are ignored.

### **Rules Logic ERP applies**

* **Finding the group:** a **main group** (not a sub-group) at the level you sent, by short name if `GST_Group_Short_Name` is filled, otherwise by name. It must already exist; groups at other levels do not count.
* **Any level can be changed.** Logic ERP does not check that the level you send is the one your company uses for GST tax groups – a wrong level moves the items to that group at that level. Send the right level.
* **The whole item changes.** Item groups belong to the item (item and shade), so the change applies to **every item code** of each item in the list – all its sizes and packs.
* Each changed item is recorded in Logic ERP's master change history as re-allocated from its old group to the new one.
* All items are checked, and the group is found, before anything is saved. If any item is not found, or the group is not found, **nothing** is saved.
* Everything is saved in one go: if anything fails, no item is changed.
* An empty or missing `ListItems` is refused with `EAN Codes not defined...`; nothing is changed.
* Every item code of each item gets today's date as its modified date, and the change is recorded in Logic ERP's change log, so the items come back in Get Item Master – by bookmark, or for a period that includes today.
* This endpoint is covered by the same licence as creating items through the API.

### **Example request**

Moves two items to the GST tax group `GST 5%` kept at level 6:

```json
{
  "GST_Group_Level": 6,
  "GST_Group_Name": "GST 5%",
  "GST_Group_Short_Name": "",
  "ListItems": [
    { "ItemCode": "KR1045-M", "EANCode": "" },
    { "ItemCode": "", "EANCode": "8901234567892" }
  ]
}
```

### **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**. This really saves in the sandbox, so use test values like the example. The example moves the test item `APITEST0001` to a GST tax group that already exists in the sandbox.

## Edit Item GST Tax Group

> Moves one or more items to a different GST tax group. In Logic ERP the GST tax group of an item is one of its item groups, kept at one of the 30 group levels – which level depends on your company's setup (ask your Logic ERP team). You send the level, the group, and the list of items. The group must already exist in Logic ERP; it is never created by this endpoint.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Masters - Push"}],"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":{"/EditItemGSTTaxGroup":{"post":{"tags":["Masters - Push"],"operationId":"EditItemGSTTaxGroup","summary":"Edit Item GST Tax Group","description":"Moves one or more items to a different GST tax group. In Logic ERP the GST tax group of an item is one of its item groups, kept at one of the 30 group levels – which level depends on your company's setup (ask your Logic ERP team). You send the level, the group, and the list of items. The group must already exist in Logic ERP; it is never created by this endpoint.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"GST_Group_Level":{"type":"integer","description":"The group level that holds the GST tax group, `1` to `30`."},"GST_Group_Name":{"type":"string","description":"Name of the GST tax group, as shown in Logic ERP (`Group_NameN` in Get Item Master, where N is the level)."},"GST_Group_Short_Name":{"type":"string","description":"Short name of the group (`Group_Short_NameN` in Get Item Master). When filled, the group is found by its short name and `GST_Group_Name` is not used to find it. A short name of `(NIL)` counts as empty."},"ListItems":{"type":"array","items":{"type":"object","properties":{"ItemCode":{"type":"string","description":"The item code as shown in Logic ERP (`UserCode` in Get Item Master). When filled, `EANCode` is not used."},"EANCode":{"type":"string","description":"The item's barcode (`AddlItemCode` in Get Item Master). Used only when `ItemCode` is empty. Other barcodes of the item (`ListEANCode`) are not searched."}}},"description":"The items to change, at least one. See below."}},"required":["ListItems"]}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status and Message.","content":{"application/json":{"schema":{"type":"object","properties":{"Status":{"type":"boolean","description":"`true` when the items were saved."},"Message":{"type":"string","description":"`GST Tax Group Changed Successfully...` when saved; otherwise the reason."},"LastSavedCode":{"type":"integer","description":"Logic ERP's internal number of the GST tax group the items were moved to."},"request_ID":{"type":"string","description":"The ID of this request. `null` when the request was refused by one of the checks below before anything was saved."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response**

| Field           | What it holds for this endpoint                                                                                   |
| --------------- | ----------------------------------------------------------------------------------------------------------------- |
| `Status`        | `true` when the items were saved.                                                                                 |
| `Message`       | `GST Tax Group Changed Successfully...` when saved; otherwise the reason.                                         |
| `LastSavedCode` | Logic ERP's internal number of the GST tax group the items were moved to.                                         |
| `request_ID`    | The ID of this request. `null` when the request was refused by one of the checks below before anything was saved. |

### **Example response**

```json
{
  "Status": true,
  "Message": "GST Tax Group Changed Successfully...",
  "LastSavedCode": 7188,
  "request_ID": "9d3c5a7e-1b2f-4e86-a0d4-6c8e2f1b5a39"
}
```

### **Messages you may see**

| Message                                                        | Meaning                                                                                                                                                                                                               | What to do                                  |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------- |
| `GST_Group_Level always belongs between 1 to 30. Please Check` | `GST_Group_Level` is left out, `0`, or outside 1 to 30.                                                                                                                                                               | Send the level, 1 to 30.                    |
| `Invalid GST_Group_Name and GST_Group_Short_Name...`           | Both the name and the short name are empty.                                                                                                                                                                           | Send one of them.                           |
| `Invalid GST_Group_Name : …` (the name you sent in place of …) | Neither a real name nor a real short name was sent – each is empty or `(NIL)`.                                                                                                                                        | Send a real group name or short name.       |
| `EAN Codes not defined...`                                     | `ListItems` is empty or missing. Nothing was saved.                                                                                                                                                                   | Send at least one item.                     |
| `Invalid EAN Code : …`                                         | An item in `ListItems` was not found, or an entry has neither `ItemCode` nor `EANCode`. The barcode you sent is shown in place of …; when you sent an `ItemCode` the message ends after the colon. Nothing was saved. | Check the item codes and barcodes.          |
| `GST_Group_Name : … not found at horizontal level : …`         | No main group at that level has that name (or, when you also sent a short name, that short name – the message still shows the name).                                                                                  | Check the group and the level in Logic ERP. |
| `GST_Group_Short_Name : … not found at horizontal level : …`   | No main group at that level has that short name (sent without a name).                                                                                                                                                | Check the short name and the level.         |
| A database error (with `Status: false`)                        | Saving failed. Nothing was saved.                                                                                                                                                                                     | Correct the request and send it again.      |


---

# 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/push/edit-item-gst-tax-group.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.
