> 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-barcode-packing-and-descriptions.md).

# Edit Item Barcode, Packing and Descriptions

Changes a few details of an **existing item** in Logic ERP, found by its **item code**: the **barcode** (additional item code) and **packing** of that item code, and the **descriptions** and **additional name** of the item it belongs to. Use it to fill in a barcode or a description after the item was created. It never creates items or sizes and cannot change names, groups or rates.

### **Endpoint**

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

The response and the messages common to every Push 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). Items are not branch documents: this endpoint has no branch or date fields.

### **Request fields**

One request = one item code. Field names are matched without regard to capitals.

| Field                                    | Type      | Required | Default | Meaning                                                                                                                                                                                                                                         |
| ---------------------------------------- | --------- | -------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `LogicUserCode`                          | text      | **Yes**  | `""`    | The item code as users see and type it in Logic ERP (`UserCode` in [Get Item Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md)), for example `"UW260041"`. |
| `EANCode`                                | text (30) | No       | `null`  | New barcode (additional item code) for this item code – `AddlItemCode` in Get Item Master.                                                                                                                                                      |
| `Packing`                                | text (30) | No       | `null`  | New packing unit for this item code, for example `"PCS"`, `"BOX"`.                                                                                                                                                                              |
| `ItemDesc_1`, `ItemDesc_2`, `ItemDesc_3` | text      | No       | `null`  | New item descriptions 1–3.                                                                                                                                                                                                                      |
| `AddlItemName`                           | text (80) | No       | `""`    | New additional item name.                                                                                                                                                                                                                       |

**Empty means "leave as it is".** A field left out, `null` or `""` keeps its current value – so this endpoint cannot clear a barcode, packing or description.

### **Rules Logic ERP applies**

* The item code is looked up among the item codes in Logic ERP (not among barcodes). Not found → *Unable to found LogicUserCode : …*.
* `EANCode` and `Packing` change **only this item code**. `ItemDesc_…` and `AddlItemName` belong to the **item** (name + company + shade), so they change for **every size** of it.
* The barcode replaces the item code's main barcode. Other barcodes stored for the item code are kept. Logic ERP does **not** check whether the barcode is already used by another item.
* Logic ERP saves the **whole item again** with the change: every size of the item gets today's date as modified date, so they all appear in Get Item Master for a period that includes today. The item's other details are saved back as they were read.
* If your Logic ERP requires **approval of changed items**, the item is not usable – and not returned by Get Item Master – until the change is approved in Logic ERP.
* If your Logic ERP builds item codes as EAN-13 barcodes, every item code of the item must be a valid EAN-13 code with your prefix, otherwise the save fails with a message containing `Invalid EAN-13 Code` (or `Invalid EAN Code... Last Digit Calculation Incorrect..` for a wrong check digit).
* When the request fails, nothing is changed.

### **Example request**

```json
{
  "LogicUserCode": "UW260041",
  "EANCode": "8906123450415",
  "Packing": "PCS",
  "ItemDesc_1": "100% cotton pique, regular fit",
  "ItemDesc_2": "Machine wash cold",
  "ItemDesc_3": "",
  "AddlItemName": ""
}
```

Here `ItemDesc_3` and `AddlItemName` are empty, so they keep their current values.

### **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 changes the barcode and a description of the sandbox's test item `APITEST0001`.

## Edit Item Barcode, Packing and Descriptions

> Changes a few details of an existing item in Logic ERP, found by its item code: the barcode (additional item code) and packing of that item code, and the descriptions and additional name of the item it belongs to. Use it to fill in a barcode or a description after the item was created. It never creates items or sizes and cannot change names, groups or rates.

```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":{"/EditItems":{"post":{"tags":["Masters - Push"],"operationId":"EditItems","summary":"Edit Item Barcode, Packing and Descriptions","description":"Changes a few details of an existing item in Logic ERP, found by its item code: the barcode (additional item code) and packing of that item code, and the descriptions and additional name of the item it belongs to. Use it to fill in a barcode or a description after the item was created. It never creates items or sizes and cannot change names, groups or rates.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"LogicUserCode":{"type":"string","description":"The item code as users see and type it in Logic ERP (`UserCode` in Get Item Master), for example `\"UW260041\"`."},"EANCode":{"type":"string","description":"New barcode (additional item code) for this item code – `AddlItemCode` in Get Item Master."},"Packing":{"type":"string","description":"New packing unit for this item code, for example `\"PCS\"`, `\"BOX\"`."},"ItemDesc_1":{"type":"string","description":"New item descriptions 1–3."},"ItemDesc_2":{"type":"string","description":"New item descriptions 1–3."},"ItemDesc_3":{"type":"string","description":"New item descriptions 1–3."},"AddlItemName":{"type":"string","description":"New additional item name."}}}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status and Message.","content":{"application/json":{"schema":{"type":"object","properties":{"Status":{"type":"boolean","description":"`true` when the item was saved, `false` when it was not – read `Message`."},"Message":{"type":"string","description":"Empty when saved; otherwise the reason."},"LastSavedCode":{"type":"integer","description":"Logic ERP's internal number of the item code that was changed (`ItemDetailCode` in Get Item Master)."},"request_ID":{"type":"string","description":"As described in How Every API Call Works. Empty when `LogicUserCode` was missing."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response**

| Field           | Meaning for this endpoint                                                                            |
| --------------- | ---------------------------------------------------------------------------------------------------- |
| `Status`        | `true` when the item was saved, `false` when it was not – read `Message`.                            |
| `Message`       | Empty when saved; otherwise the reason.                                                              |
| `LastSavedCode` | Logic ERP's internal number of the item code that was changed (`ItemDetailCode` in Get Item Master). |
| `request_ID`    | As described in How Every API Call Works. Empty when `LogicUserCode` was missing.                    |

### **Example response**

```json
{
  "Status": true,
  "Message": "",
  "LastSavedCode": 0,
  "request_ID": "c71e0a4d-2f6b-4b8e-9d13-5a8e2b7f4c90"
}
```

### **Messages you may see**

| Message                                                                                                | Meaning                                                                                                     | What to do                                        |
| ------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `Invalid LogicUserCode...` (with `Status: false`)                                                      | `LogicUserCode` is empty or missing.                                                                        | Send the item code.                               |
| `Unable to found LogicUserCode : …` (with the code; `Status: false`)                                   | No item code in Logic ERP matches.                                                                          | Check the code with Get Item Master (`UserCode`). |
| A message containing `Invalid EAN-13 Code` or `Invalid EAN Code... Last Digit Calculation Incorrect..` | Your Logic ERP builds item codes as EAN-13 barcodes and one of the item's codes is not a valid EAN-13 code. | Ask your Logic ERP support team.                  |
| A message containing `Item not saved for LogicUserCode : …` (with `Status: false`)                     | An approval or audit step in Logic ERP stopped the save. Nothing was changed.                               | Check the item in Logic ERP.                      |
| Other technical text (with `Status: false`)                                                            | The save failed, for example a value longer than Logic ERP allows. Nothing was changed.                     | 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-barcode-packing-and-descriptions.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.
