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

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. 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 company name is used (a name longer than 25 characters then makes the request fail – send a short name).

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 shade name is used (a name longer than 14 characters then makes the request fail – send a short name). 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". Must be a whole number written in digits only (no spaces, dots or letters) – anything else makes the request fail, even for an HSN code that already exists. 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" also writes the save to the API site's log file, for your support team. It does not change the response.

ItemHDName and HS_Serial_No are accepted but ignored (the HSN serial number is always taken from 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 in practice

""

Size or pack name, for example "M", "L", "8 (42)". Matched with the sizes in Logic ERP; created if not found. Not checked – an empty name creates or uses a size with no name.

Pack_Short_Name

text (8)

No

""

Short name, used only when the size is created. Empty = Pack_Name is used (a size name longer than 8 characters then makes the request fail – send a short name).

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 the known issue below – on a new item they are not saved.

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.

  • For a new item, every User_Code you send is checked against the item codes and barcodes of all items. If one is already in use, nothing is saved and you get User code already present in Logic. : … with that code. Addl_Item_Code is not checked: a barcode already used by another item is accepted.

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 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.

  • The checks for an existing item code are not made on an update. A new size whose User_Code belongs to another item is saved with the next free number instead – silently.

Known issue – re-sending without User_Code changes the item code. On an existing item, a size sent with an empty User_Code (matched by Pack_Name) gets a new item code – the next free number – instead of keeping its own. Always send the item code of every existing size when you re-send an item.

Known issue – new company or shade turns an existing item into the new one. If you send a CompName or ColorName that does not exist in Logic ERP yet, and an item with the same ItemName and no company (or no shade) exists, that item is moved to the new company / shade and renamed, instead of a new item being created. Create the item with its company and shade from the start, or create the new company / shade in Logic ERP before you push.

Known issue – re-sending can change the tax group. If your Logic ERP item setup uses a tax region other than the first, re-sending an existing item can overwrite its tax group with the one from the first region. Check with your Logic ERP team before re-sending items; if this applies to you, create items once and change them in Logic ERP.

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.

Known issue – some failures answer Status: true. When the save itself fails (for example This item Already Exists, a wrong custom field name, a name too long for Logic ERP), the answer has Status: true, LastSavedCode: 0 and the reason – with technical detail – in Message. Nothing was saved. In rare cases (an approval or audit step that stops the save) part of the item can be saved with Status: true, an empty Message and LastSavedCode: 0. Treat the item as saved only when Status is true, Message is empty and LastSavedCode is above 0. If LastSavedCode is 0 with an empty Message, check the item in Logic ERP.

Known issue – apostrophes in names. A ' in ItemName, CompName, ColorName, HS_Code, a group name, Pack_Name, User_Code or a custom field name makes the request fail with a database error – with Status: false for the item name, for the company or shade when an item with that ItemName already exists, and for item codes on a new item; with Status: true and LastSavedCode: 0 in the other cases. Leave apostrophes out (for example MENS WEAR, not MEN'S WEAR).

Known issue – pack dimensions on a new item. Pack_Length, Pack_Breadth and Pack_Weight are saved as 0 on a new item, because the item has no unit for them yet. On an existing size whose units are set in Logic ERP, they are saved in those units. Enter dimensions in Logic ERP.

Example request

A new item in two sizes:

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

post

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.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
ItemNamestringOptional

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.

CompNamestringOptional

Company (brand) name. Matched with the company names in Logic ERP; created if not found. Empty or "(NIL)" = no company.

ColorNamestringOptional

Shade (colour) name. Matched with the shades in Logic ERP; created if not found. Empty or "(NIL)" = no shade.

GroupName1stringOptional

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.

GroupName5stringOptional

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.

GroupName6stringOptional

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.

GroupName7stringOptional

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.

GroupName8stringOptional

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.

GroupName25stringOptional

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.

GroupName30stringOptional

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_CodestringOptional

HSN (goods) or SAC (services) code, for example "61091000". Must be a whole number written in digits only (no spaces, dots or letters) – anything else makes the request fail, even for an HSN code that already exists. Matched with the HSN codes in Logic ERP; created if not found. Empty or "(NIL)" = no HSN.

ItemDesc_1stringOptional

Item descriptions 1–3.

RawOrFinishedstringOptional

"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_ItembooleanOptional

true for a perishable item.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
StatusbooleanOptional

true when the request was processed – also for some failures, see the known issue above. false for the checks made before saving (rights, missing name, no sizes, item code in use) and for database errors while looking up the item.

MessagestringOptional

Empty when the item was saved; otherwise the reason.

LastSavedCodeintegerOptional

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_IDstringOptional

As described in How Every API Call Works.

post/SaveItem
POST /api/SaveItem HTTP/1.1
Host: demo.logicerp.com
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 555

{
  "ItemName": "API TEST SHOE",
  "CompName": "PAVERS ENGLAND",
  "ColorName": "BROWN",
  "GroupName1": "SLIPON",
  "GroupName5": "KAMPS FOOTWEAR",
  "GroupName6": "CONTINUED",
  "GroupName7": "INR",
  "GroupName8": "2 NOS",
  "GroupName25": "64039990",
  "GroupName30": "GST FOOTWEAR",
  "HS_Code": "64039990",
  "ItemDesc_1": "API TEST ITEM - DO NOT USE",
  "RawOrFinished": "FI",
  "Perishable_Item": false,
  "PackList": [
    {
      "Pack_Name": "11 (45)",
      "User_Code": "APITEST0001",
      "Addl_Item_Code": "APITEST0001",
      "Cf_1": 1,
      "Cf_2": 1,
      "Cf_3": 1,
      "Packing": "PAIR",
      "MRP": 2999,
      "Sale_Rate": 2999,
      "Basic_Rate": 1200,
      "Pur_Rate": 1200
    }
  ]
}
{
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

Response

Field
Meaning for this endpoint

Status

true when the request was processed – also for some failures, see the known issue above. false for the checks made before saving (rights, missing name, no sizes, item code in use) and for database errors while looking up the item.

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

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 of a new item is already used as an item code or barcode.

Use another code, or leave User_Code empty to get the next number.

A message containing This item Already Exists (with Status: true)

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: true)

A FieldName is not a 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: true)

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).

Ask your Logic ERP support team to check the EAN prefix.

Other technical text (with Status: true and LastSavedCode: 0)

The save failed, for example a value longer than Logic ERP allows (see the lengths in the tables) or an HS_Code that is not a number. Nothing was saved. The reason may be followed by technical detail – read the first line.

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). The reason may be followed by technical detail – read the first line.

Remove the apostrophe.

Last updated