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

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. 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), for example "UW260041". Send it with the same capitals as in Logic ERP – see the known issue.

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.

Known issue – capitals in LogicUserCode. The item code is found without regard to capitals, but the barcode and packing are applied only when LogicUserCode has exactly the same capitals as in Logic ERP, with no extra spaces. With different capitals or added spaces the answer is Status: true and the descriptions and additional name are changed, but the barcode and packing are not. Send the item code exactly as Get Item Master returns it.

Known issue – LastSavedCode is always 0. This endpoint does not return the number of the item it changed. Use Status and Message to know the result.

Known issue – a stopped save can be partly kept. If an approval or audit step in Logic ERP stops the save, the sizes saved up to that point are kept and the answer is still Status: true with an empty Message. If a change does not show in Get Item Master, check the item in Logic ERP.

Known issue – apostrophes. A ' in LogicUserCode makes the request fail with a database error. Item codes with apostrophes cannot be edited with this endpoint.

Example request

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

post

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.

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
LogicUserCodestringOptional

The item code as users see and type it in Logic ERP (UserCode in Get Item Master), for example "UW260041". Send it with the same capitals as in Logic ERP – see the known issue.

EANCodestringOptional

New barcode (additional item code) for this item code – AddlItemCode in Get Item Master.

PackingstringOptional

New packing unit for this item code, for example "PCS", "BOX".

ItemDesc_1stringOptional

New item descriptions 1–3.

ItemDesc_2stringOptional

New item descriptions 1–3.

ItemDesc_3stringOptional

New item descriptions 1–3.

AddlItemNamestringOptional

New additional item name.

Responses
200

Always HTTP 200. Check Status and Message.

application/json
StatusbooleanOptional

true when the item was saved, false when it was not – read Message.

MessagestringOptional

Empty when saved; otherwise the reason, with technical detail.

LastSavedCodeintegerOptional

Always 0 (see the known issue).

request_IDstringOptional

As described in How Every API Call Works. Empty when the request failed before the item was saved (for example an unknown item code).

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

{
  "LogicUserCode": "APITEST0001",
  "EANCode": "APITEST0001B",
  "Packing": "PAIR",
  "ItemDesc_1": "API TEST ITEM - DO NOT USE",
  "ItemDesc_2": "Edited by EditItems test",
  "ItemDesc_3": "",
  "AddlItemName": ""
}
{
  "Status": true,
  "Message": "text",
  "LastSavedCode": 1,
  "request_ID": "text"
}

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, with technical detail.

LastSavedCode

Always 0 (see the known issue).

request_ID

As described in How Every API Call Works. Empty when the request failed before the item was saved (for example an unknown item code).

Example response

Messages you may see

Message
Meaning
What to do

A message containing Invalid LogicUserCode...

LogicUserCode is empty or missing. The reason is followed by technical detail.

Send the item code.

A message containing Unable to found LogicUserCode : … (with the code)

No item code in Logic ERP matches. The reason is followed by technical detail.

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.

Other technical text (with Status: false)

The save failed, for example a value longer than Logic ERP allows or a ' in LogicUserCode. Nothing was changed. The reason may be followed by technical detail – read the first line.

Correct the request and send it again.