> 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/create-or-update-an-item.md).

# Create or Update an Item

Creates an **item** in Logic ERP's item master – one item (name + company + shade) with one or more **sizes / packs**, each with its own **item code**, barcode, conversion factors and rates. The company, shade, HSN code, item groups and sizes you name are **created automatically** when they do not exist yet. If the item already exists, the same request **updates** it and adds any new sizes. Use it to set up new articles from your PLM, e-commerce or purchase system before you push purchases or sales for them.

### **Endpoint**

| Name          | Detail                             |
| ------------- | ---------------------------------- |
| Address       | `https://your-server/api/SaveItem` |
| 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**

Field names are matched without regard to capitals. One request = one item (one shade). Send one request per shade.

| Field                                                                                                                                                    | Type         | Required               | Default   | Meaning                                                                                                                                                                                                                                                        |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ---------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ItemName`                                                                                                                                               | text (80)    | **Yes**                | –         | Item name **without** the shade, for example `"POLO T-SHIRT"`. Logic ERP adds the shade short name to it (see the rules). Together with `CompName` and `ColorName` it decides whether the item already exists.                                                 |
| `CompName`                                                                                                                                               | text (80)    | No                     | `""`      | Company (brand) name. Matched with the company names in Logic ERP; **created** if not found. Empty or `"(NIL)"` = no company.                                                                                                                                  |
| `CompShortName`                                                                                                                                          | text (25)    | No                     | `""`      | Short name, used **only when the company is created**. Empty = the first 25 characters of the company name are used.                                                                                                                                           |
| `ColorName`                                                                                                                                              | text (35)    | No                     | `""`      | Shade (colour) name. Matched with the shades in Logic ERP; **created** if not found. Empty or `"(NIL)"` = no shade.                                                                                                                                            |
| `ColorShortName`                                                                                                                                         | text (14)    | No                     | `""`      | Short name, used **only when the shade is created**. Empty = the first 14 characters of the shade name are used. The shade short name becomes part of the item name.                                                                                           |
| `GroupName1` … `GroupName30`                                                                                                                             | text (80)    | No                     | `""`      | Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name **at that level**; **created** at that level if not found. Empty or `"(NIL)"` = no group at that level. |
| `GroupShort1` … `GroupShort30`                                                                                                                           | text (60)    | No                     | `""`      | Short name of the group, used **only when the group is created**.                                                                                                                                                                                              |
| `HS_Code`                                                                                                                                                | text (20)    | No                     | `""`      | HSN (goods) or SAC (services) code, for example `"61091000"`. Matched with the HSN codes in Logic ERP; **created** if not found. Empty or `"(NIL)"` = no HSN.                                                                                                  |
| `HS_Desc`                                                                                                                                                | text (200)   | No                     | `""`      | HSN description – used only when the HSN code is created.                                                                                                                                                                                                      |
| `HS_Short_Desc`                                                                                                                                          | text (30)    | No                     | `""`      | Short description – only when the HSN code is created.                                                                                                                                                                                                         |
| `HS_Type`                                                                                                                                                | number       | No                     | `0`       | `0` = HSN (goods), `1` = SAC (services) – only when the HSN code is created.                                                                                                                                                                                   |
| `HS_UQC`                                                                                                                                                 | text (100)   | No                     | `""`      | Unit quantity code for GST returns, for example `"PCS-PIECES"` – only when the HSN code is created.                                                                                                                                                            |
| `HS_Sion_No`, `HS_Sion_Rate`                                                                                                                             | text, number | No                     | `""`, `0` | SION number and rate – only when the HSN code is created.                                                                                                                                                                                                      |
| `ItemDesc_1`, `ItemDesc_2`, `ItemDesc_3`                                                                                                                 | text         | No                     | `""`      | Item descriptions 1–3.                                                                                                                                                                                                                                         |
| `AddlItemName`                                                                                                                                           | text (80)    | No                     | `""`      | Additional item name, for example a name in another language or on the label.                                                                                                                                                                                  |
| `RawOrFinished`                                                                                                                                          | text (6)     | No                     | `"FI"`    | `"FI"` = finished item, `"RA"` = raw material, or a raw/finished category code set up in Logic ERP. Not checked – send one of these, in capitals.                                                                                                              |
| `Perishable_Item`                                                                                                                                        | true / false | No                     | `false`   | `true` for a perishable item.                                                                                                                                                                                                                                  |
| `DNA_Decimals`                                                                                                                                           | text         | No                     | `null`    | `"1"` = quantities of this item may not have decimals. Anything else = decimals allowed.                                                                                                                                                                       |
| `InActive_For_SL`, `InActive_For_PU`, `InActive_For_SR`, `InActive_For_PR`, `InActive_For_PO`, `InActive_For_SO`, `InActive_For_STI`, `InActive_For_STO` | true / false | No                     | `false`   | Block the item for sale bills, purchases, sale returns, purchase returns, purchase orders, sale orders, stock transfers in and stock transfers out.                                                                                                            |
| `PackList`                                                                                                                                               | list         | **Yes** (at least one) | –         | The item's sizes / packs. See below.                                                                                                                                                                                                                           |
| `DisplayError`                                                                                                                                           | text         | No                     | `"0"`     | `"1"` = when the save fails, `Message` holds the reason followed by the full technical detail, for your support team. Use only while testing.                                                                                                                  |

`ItemHDName` is accepted but **ignored**. `HS_Serial_No` (a number) is used only when the HSN code is created; `0` or left out = the number written in `HS_Code`.

#### `PackList`

One entry per size / pack. Each entry becomes one **item code** in Logic ERP.

| Field                                          | Type      | Required               | Default | Meaning                                                                                                                                                                                                                |
| ---------------------------------------------- | --------- | ---------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Pack_Name`                                    | text (30) | **Yes** for a new size | `""`    | Size or pack name, for example `"M"`, `"L"`, `"8 (42)"`. Matched with the sizes in Logic ERP; **created** if not found. A new size with an empty name is refused (`Pack Name is Missing!! User Code : …`).             |
| `Pack_Short_Name`                              | text (8)  | No                     | `""`    | Short name, used **only when the size is created**. Empty = the first 8 characters of `Pack_Name` are used.                                                                                                            |
| `User_Code`                                    | text (24) | No                     | `""`    | The **item code** for this size, as users see and type it in Logic ERP (`UserCode` in Get Item Master). Empty = Logic ERP gives the next number. Your Logic ERP may be set to build item codes itself – see the rules. |
| `Addl_Item_Code`                               | text (30) | No                     | `""`    | Additional item code, usually the **EAN barcode** (`AddlItemCode` in Get Item Master).                                                                                                                                 |
| `Cf_1`, `Cf_2`, `Cf_3`                         | number    | No                     | `1`     | Conversion factors: how many base units make one of the alternate unit named in the matching `Cf_…_Desc`. `0` is saved as `1`.                                                                                         |
| `Cf_1_Desc`, `Cf_2_Desc`, `Cf_3_Desc`          | text (15) | No                     | `""`    | Name of each alternate unit, for example `"BOX"`.                                                                                                                                                                      |
| `Packing`                                      | text (30) | No                     | `""`    | Packing unit, for example `"PCS"`, `"PAIR"`.                                                                                                                                                                           |
| `MRP`                                          | number    | No                     | `0`     | Maximum retail price (₹).                                                                                                                                                                                              |
| `Sale_Rate`                                    | number    | No                     | `0`     | Sale rate.                                                                                                                                                                                                             |
| `Basic_Rate`                                   | number    | No                     | `0`     | Basic rate.                                                                                                                                                                                                            |
| `Pur_Rate`                                     | number    | No                     | `0`     | Purchase rate.                                                                                                                                                                                                         |
| `SP_Rate1` … `SP_Rate5`                        | number    | No                     | `0`     | Special rates 1–5, as named in your Logic ERP setup.                                                                                                                                                                   |
| `Expiry_Days`                                  | number    | No                     | `0`     | Shelf life in days.                                                                                                                                                                                                    |
| `Pack_Extra_1`, `Pack_Extra_2`, `Pack_Extra_3` | text (15) | No                     | `""`    | Extra item parameters 1–3, as named in your Logic ERP setup (`Extra_1`…`3` in Get Item Master).                                                                                                                        |
| `Pack_Length`, `Pack_Breadth`, `Pack_Weight`   | number    | No                     | `0`     | Pack dimensions and weight. See "Pack dimensions" below the rules.                                                                                                                                                     |
| `ListCustomFields`                             | list      | No                     | empty   | Values for the custom fields defined for items. See below.                                                                                                                                                             |

#### `ListCustomFields`

| Field          | Type       | Required            | Default | Meaning                                                                                                                                        |
| -------------- | ---------- | ------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `FieldName`    | text       | Yes (in each entry) | –       | Name of an item custom field as set up in Logic ERP (`FieldName` in Get Item Master). Spaces around it are ignored and capitals do not matter. |
| `FieldValue_1` | text (255) | No                  | `null`  | The value.                                                                                                                                     |
| `FieldValue_2` | text (255) | No                  | `null`  | A second value, for fields that have one.                                                                                                      |

Custom field values are saved only for the sizes that carry them; the values of other sizes are left as they are.

### **Rules Logic ERP applies**

**Before saving**

* The Logic ERP user linked to your API site must be allowed to create items; otherwise you get *Item Creation rights not available...*.
* `ItemName` must not be empty and `PackList` must hold at least one size.
* Every `User_Code` you send is checked against the item codes **and barcodes** of all items – for a new item and when an existing item is updated (a size's own code is allowed). If one is used by another item, nothing is saved and you get *User code already present in Logic. : …* with that code. For a **new size**, `Addl_Item_Code` is checked the same way: a barcode already used by another item gives *Barcode already present in Logic. : …* and nothing is saved.

**New item or existing item**

* Logic ERP looks for an item with the same `ItemName`, the same company and the same shade (names compared without regard to capitals).
  * **Not found** → a new item is created with all the sizes in `PackList`.
  * **Found** → that item is **updated** (see below), and sizes not yet on it are added.
* A **new item** gets the name `ItemName` + the shade short name (for example `POLO T-SHIRT NVY`), with a space, a hyphen or nothing in between, and shade before or after the group, as set in your Logic ERP item setup. If your setup appends the level-10 group to item names, its short name is added too. The full name must fit in 80 characters. If an item with that full name already exists for the same company, the request fails with *This item Already Exists*.
* **Created automatically when not found:** company, shade, HSN code, item groups (at the level you sent them) and sizes. The short names and HSN details you send are used only at that moment; an existing company, shade, group, size or HSN code is never changed.
* **Not set by this endpoint:** the item's tax group (left empty on a new item), stock levels, pack height, item images, linked suppliers. Set them in Logic ERP.
* Item-name, barcode and MRP **formulas** set up in Logic ERP are **not** applied to items created through the API.
* If your Logic ERP is set to **create an item group from the item name** at one group level, leave that `GroupName…` empty: a group you send at that level is **renamed** to the item name.

**Item codes**

* `User_Code` empty → Logic ERP gives the next number: the highest numeric item code + 1, or the last item code created + 1, depending on your setup. With "last item code + 1", the most recently created item code must be a number; if it contains letters, the request fails – send `User_Code` yourself.
* If your Logic ERP builds item codes **from the company short name**, **as EAN-13 barcodes** or **from an EAN prefix**, every new size gets a code built that way and the `User_Code` you send is **replaced**. With EAN-13 codes, the prefix set in Logic ERP must be 7 digits, otherwise the save fails.
* If your setup copies the item code into an empty barcode, a size sent without `Addl_Item_Code` gets its item code as barcode.
* Codes Logic ERP gives are **not returned** in the response. Read them back with [Get Item Master](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md) for a period that includes today.

**Re-sending an existing item (update)**

* Each size you send is matched to a size already on the item: **by `User_Code`** when you send one (exact capitals), otherwise **by `Pack_Name`** (exact capitals). A size that matches nothing is **added** as a new size – even if a size with the same name is already there.
* For a matched size, **every** pack field is overwritten with what you send – rates, MRP, conversion factors, `Packing`, `Pack_Extra_…`, `Expiry_Days` – **including empty values and zeros**. An empty `Addl_Item_Code` leaves the existing barcode as it is. Changes of basic rate, purchase rate, sale rate and MRP are recorded in the item's rate history. The size itself cannot be changed.
* Item fields are overwritten too: **all 30 groups** (an empty `GroupName…` **removes** that group from the item), HSN code (empty **removes** it), descriptions, additional name, raw/finished, perishable, decimals and the eight blocking flags. Send the complete item every time, not only what changed.
* Sizes on the item that are **not in your request** are kept unchanged. Nothing is ever deleted.

**Approval, all-or-nothing, after saving**

* If your Logic ERP requires **approval of new items**, the item is saved but not usable – and not returned by Get Item Master – until it is approved in Logic ERP.
* The item, its sizes and anything created automatically are saved together: when the request fails, nothing is saved.
* The item and every size get today's date as created / modified date, so they appear in Get Item Master for a period that includes today.
* When the save fails, the answer has `Status: false`, `LastSavedCode: 0` and the reason in `Message` (with `"DisplayError": "1"`, followed by the full technical detail). Nothing is saved, also when an approval or audit step in Logic ERP stops the save (the message then contains `Item could not be saved.`).

> **Known issue – apostrophes.** A `'` in `Addl_Item_Code` makes the request fail with a database error (`Status: false`, nothing saved), and a `'` in another name or code can still do so with some Logic ERP setups. Leave apostrophes out (for example `MENS WEAR`, not `MEN'S WEAR`).

**Pack dimensions.** When a size has no units for its dimensions yet (for example a new item), `Pack_Length` and `Pack_Breadth` are saved in centimetres and `Pack_Weight` in kilograms. On an existing size whose units are set in Logic ERP, they are saved in those units.

### **Example request**

A new item in two sizes:

```json
{
  "ItemName": "POLO T-SHIRT",
  "CompName": "URBAN WEAVE",
  "CompShortName": "UW",
  "ColorName": "NAVY BLUE",
  "ColorShortName": "NVY",
  "GroupName1": "T-SHIRTS",
  "GroupName2": "MENS",
  "GroupName3": "SUMMER 2026",
  "GroupShort1": "TSH",
  "GroupShort2": "MEN",
  "GroupShort3": "SS26",
  "HS_Code": "61091000",
  "HS_Desc": "T-shirts, singlets and other vests, of cotton, knitted",
  "HS_Type": 0,
  "HS_UQC": "PCS-PIECES",
  "ItemDesc_1": "100% cotton pique, regular fit",
  "AddlItemName": "",
  "RawOrFinished": "FI",
  "Perishable_Item": false,
  "InActive_For_SL": false,
  "InActive_For_PU": false,
  "PackList": [
    {
      "Pack_Name": "M",
      "User_Code": "UW260041",
      "Addl_Item_Code": "8906123450415",
      "Cf_1": 1, "Cf_2": 1, "Cf_3": 1,
      "Packing": "PCS",
      "MRP": 1299.00,
      "Sale_Rate": 1199.00,
      "Basic_Rate": 1015.25,
      "Pur_Rate": 610.00
    },
    {
      "Pack_Name": "L",
      "User_Code": "UW260042",
      "Addl_Item_Code": "8906123450422",
      "Cf_1": 1, "Cf_2": 1, "Cf_3": 1,
      "Packing": "PCS",
      "MRP": 1299.00,
      "Sale_Rate": 1199.00,
      "Basic_Rate": 1015.25,
      "Pur_Rate": 610.00
    }
  ]
}
```

### **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 creates (or, when sent again, updates) the sandbox's test item `APITEST0001`. Change `ItemName` and `User_Code` to create a new item.

## Create or Update an Item

> Creates an item in Logic ERP's item master – one item (name + company + shade) with one or more sizes / packs, each with its own item code, barcode, conversion factors and rates. The company, shade, HSN code, item groups and sizes you name are created automatically when they do not exist yet. If the item already exists, the same request updates it and adds any new sizes. Use it to set up new articles from your PLM, e-commerce or purchase system before you push purchases or sales for them.

```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":{"/SaveItem":{"post":{"tags":["Masters - Push"],"operationId":"SaveItem","summary":"Create or Update an Item","description":"Creates an item in Logic ERP's item master – one item (name + company + shade) with one or more sizes / packs, each with its own item code, barcode, conversion factors and rates. The company, shade, HSN code, item groups and sizes you name are created automatically when they do not exist yet. If the item already exists, the same request updates it and adds any new sizes. Use it to set up new articles from your PLM, e-commerce or purchase system before you push purchases or sales for them.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ItemName":{"type":"string","description":"Item name without the shade, for example `\"POLO T-SHIRT\"`. Logic ERP adds the shade short name to it (see the rules). Together with `CompName` and `ColorName` it decides whether the item already exists."},"CompName":{"type":"string","description":"Company (brand) name. Matched with the company names in Logic ERP; created if not found. Empty or `\"(NIL)\"` = no company."},"ColorName":{"type":"string","description":"Shade (colour) name. Matched with the shades in Logic ERP; created if not found. Empty or `\"(NIL)\"` = no shade."},"GroupName1":{"type":"string","description":"Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name at that level; created at that level if not found. Empty or `\"(NIL)\"` = no group at that level."},"GroupName5":{"type":"string","description":"Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name at that level; created at that level if not found. Empty or `\"(NIL)\"` = no group at that level."},"GroupName6":{"type":"string","description":"Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name at that level; created at that level if not found. Empty or `\"(NIL)\"` = no group at that level."},"GroupName7":{"type":"string","description":"Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name at that level; created at that level if not found. Empty or `\"(NIL)\"` = no group at that level."},"GroupName8":{"type":"string","description":"Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name at that level; created at that level if not found. Empty or `\"(NIL)\"` = no group at that level."},"GroupName25":{"type":"string","description":"Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name at that level; created at that level if not found. Empty or `\"(NIL)\"` = no group at that level."},"GroupName30":{"type":"string","description":"Item group at each of the 30 group levels (`GroupName1` = level 1, and so on – what each level means depends on your Logic ERP setup). Matched by name at that level; created at that level if not found. Empty or `\"(NIL)\"` = no group at that level."},"HS_Code":{"type":"string","description":"HSN (goods) or SAC (services) code, for example `\"61091000\"`. Matched with the HSN codes in Logic ERP; created if not found. Empty or `\"(NIL)\"` = no HSN."},"ItemDesc_1":{"type":"string","description":"Item descriptions 1–3."},"RawOrFinished":{"type":"string","description":"`\"FI\"` = finished item, `\"RA\"` = raw material, or a raw/finished category code set up in Logic ERP. Not checked – send one of these, in capitals."},"Perishable_Item":{"type":"boolean","description":"`true` for a perishable item."},"PackList":{"type":"array","items":{"type":"object","properties":{"Pack_Name":{"type":"string","description":"Size or pack name, for example `\"M\"`, `\"L\"`, `\"8 (42)\"`. Matched with the sizes in Logic ERP; created if not found. A new size with an empty name is refused (`Pack Name is Missing!! User Code : …`)."},"User_Code":{"type":"string","description":"The item code for this size, as users see and type it in Logic ERP (`UserCode` in Get Item Master). Empty = Logic ERP gives the next number. Your Logic ERP may be set to build item codes itself – see the rules."},"Addl_Item_Code":{"type":"string","description":"Additional item code, usually the EAN barcode (`AddlItemCode` in Get Item Master)."},"Cf_1":{"type":"integer","description":"Conversion factors: how many base units make one of the alternate unit named in the matching `Cf_…_Desc`. `0` is saved as `1`."},"Cf_2":{"type":"integer","description":"Conversion factors: how many base units make one of the alternate unit named in the matching `Cf_…_Desc`. `0` is saved as `1`."},"Cf_3":{"type":"integer","description":"Conversion factors: how many base units make one of the alternate unit named in the matching `Cf_…_Desc`. `0` is saved as `1`."},"Packing":{"type":"string","description":"Packing unit, for example `\"PCS\"`, `\"PAIR\"`."},"MRP":{"type":"integer","description":"Maximum retail price (₹)."},"Sale_Rate":{"type":"integer","description":"Sale rate."},"Basic_Rate":{"type":"integer","description":"Basic rate."},"Pur_Rate":{"type":"integer","description":"Purchase rate."}}},"description":"The item's sizes / packs. See below."}}}}}},"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 nothing was saved – read `Message`."},"Message":{"type":"string","description":"Empty when the item was saved; otherwise the reason."},"LastSavedCode":{"type":"integer","description":"Logic ERP's internal number of the item (name + company + shade) – `ItemHDCode` in Get Item Master. The same number comes back when you update the item. `0` when nothing was saved. The item codes of the sizes are not returned."},"request_ID":{"type":"string","description":"As described in How Every API Call Works."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **Response**

| Field           | Meaning for this endpoint                                                                                                                                                                                                          |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Status`        | `true` when the item was saved. `false` when nothing was saved – read `Message`.                                                                                                                                                   |
| `Message`       | Empty when the item was saved; otherwise the reason.                                                                                                                                                                               |
| `LastSavedCode` | Logic ERP's internal number of the item (name + company + shade) – `ItemHDCode` in Get Item Master. The same number comes back when you update the item. `0` when nothing was saved. The item codes of the sizes are not returned. |
| `request_ID`    | As described in How Every API Call Works.                                                                                                                                                                                          |

### **Example response**

```json
{
  "Status": true,
  "Message": "",
  "LastSavedCode": 6119,
  "request_ID": "4b2f8c1e-7a90-4d3b-b6e2-91c05d7f3a18"
}
```

### **Messages you may see**

| Message                                                                                                                       | Meaning                                                                                                                                                           | What to do                                                           |
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
| `Item Creation rights not available...`                                                                                       | The Logic ERP user linked to your API site may not create items.                                                                                                  | Ask your Logic ERP support team.                                     |
| `Item Name is Missing!!`                                                                                                      | `ItemName` is empty or missing.                                                                                                                                   | Send the item name.                                                  |
| `No Pack/Size Defined!!`                                                                                                      | `PackList` is empty.                                                                                                                                              | Send at least one size.                                              |
| `User code already present in Logic. : …` (with the code)                                                                     | A `User_Code` you sent is already used as an item code or barcode by another item.                                                                                | Use another code, or leave `User_Code` empty to get the next number. |
| `Barcode already present in Logic. : …` (with the barcode)                                                                    | The `Addl_Item_Code` of a new size is already used by another item. Nothing was saved.                                                                            | Use another barcode.                                                 |
| A message containing `Pack Name is Missing!! User Code : …` (with `Status: false`)                                            | A new size was sent with an empty `Pack_Name`. Nothing was saved.                                                                                                 | Send the size name.                                                  |
| A message containing `Item could not be saved.` (with `Status: false`)                                                        | An approval or audit step in Logic ERP stopped the save. Nothing was saved.                                                                                       | Check the item in Logic ERP, or ask your Logic ERP team.             |
| A message containing `This item Already Exists` (with `Status: false`)                                                        | An item with the same full name (name + shade short name) already exists for this company. Nothing was saved.                                                     | Check the item in Logic ERP; change the name or shade.               |
| A message containing `Invalid Custom Field Name : …` (with `Status: false`)                                                   | A `FieldName` is not an item custom field in Logic ERP, or is empty (`Invalid Custom Field Name..`). Nothing was saved.                                           | Use the names returned in `ListCustomFields` by Get Item Master.     |
| A message containing `Invalid EAN-13 Code` or `Invalid EAN Code... Last Digit Calculation Incorrect..` (with `Status: false`) | Your Logic ERP builds item codes as EAN-13 barcodes and the code is not valid (length, prefix or digits; the second text = wrong check digit). Nothing was saved. | Ask your Logic ERP support team to check the EAN prefix.             |
| Other error text (with `Status: false` and `LastSavedCode: 0`)                                                                | The save failed, for example a value longer than Logic ERP allows (see the lengths in the tables). Nothing was saved.                                             | Correct the request and send it again.                               |
| A database error, for example `Incorrect syntax near …`                                                                       | A name or code contained a `'` (see the known issue).                                                                                                             | Remove the apostrophe.                                               |


---

# 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/create-or-update-an-item.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.
