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

Get Item Images

Returns the web addresses of an item's pictures, together with the item's name, company and colour. Use it to show product photos in your app, website or catalogue. You identify the item by its item code or its barcode (see the known issue below about identifying it by name).

Endpoint

Name
Detail

Address

https://your-server/api/GetItemImage

Method

POST

Authorization

Basic Auth

The response is explained in How Every API Call Works. This endpoint does not use the change log: GlobalModifyCode, DateFrom, DateTo, Doc_Codes and the branch fields are not read, and LastGlobalModifyCode is always 0.

Request fields

Field
Type
Required
Default
Meaning

ItemCode

text

One way of identifying the item is required (see below)

empty

The item code, as UserCode in Get Item Master.

EANCode

text

empty

The item's main barcode / EAN, as AddlItemCode in Get Item Master. Further barcodes of the item (ListEANCode) are not searched.

CompanyName

text

empty

Company (brand) name, exact.

ItemName

text

empty

Item name without colour, exact. Do not send at present – see the known issue below.

ColorName

text

empty

Colour name, exact.

Identify the item in one of these ways:

  1. ItemCode, or

  2. EANCode, or

  3. CompanyName and ItemName and ColorName together (does not work at present – see below).

Every field you fill must match: if you send EANCode and also ColorName, the item must have both.

Known issue – identifying the item by name. Any request that includes ItemName currently fails with Status: false (the reason starts Invalid column name). Identifying the item by company + item name + colour therefore does not work. Use ItemCode or EANCode instead, and leave ItemName empty.

Rules Logic ERP applies

  • The answer is about one item (one name in one colour of one company). Pictures are shared by all sizes of that item, so any size's item code or barcode gives the same pictures.

  • Which pictures: the pictures attached to the item in that colour. If that colour has none, the pictures attached to the item name (shared by all its colours) are returned instead.

  • Pictures are listed in the display order set in Logic ERP, then by picture name.

  • Only pictures that have a stored file are returned, and each comes as a web address, not as image data. The address is your Logic ERP web site, then your company's short code, then /Images/ and the file name, for example https://erp.example.com/ABC/Images/KRT1042-BLU-1.jpg. Download the picture from that address; its format and size are whatever was uploaded.

  • If your site's Logic ERP web address has not been set up, the address has no site part and starts with / – for example /ABC/Images/KRT1042-BLU-1.jpg. Put your Logic ERP web address in front of it, or ask your support team to set it up.

  • If the item exists but has no pictures, ListImages is an empty list and Status is true.

  • If more than one item matches (for example a company + name + colour shared by two item records), only one of them is returned; which one is not defined.

  • The pictures and addresses can differ from ListImages in Get Item Master, which lists web links stored on the item instead.

Example request

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. Identify the item by ItemCode or EANCode; do not send ItemName (see the known issues on this page).

Get Item Images

post

Returns the web addresses of an item's pictures, together with the item's name, company and colour. Use it to show product photos in your app, website or catalogue. You identify the item by its item code or its barcode (see the known issue below about identifying it by name).

Authorizations
AuthorizationstringRequired

The user name and password of your API site.

Body
ItemCodestringOptional

The item code, as UserCode in Get Item Master.

EANCodestringOptional

The item's main barcode / EAN, as AddlItemCode in Get Item Master. Further barcodes of the item (ListEANCode) are not searched.

CompanyNamestringOptional

Company (brand) name, exact.

ItemNamestringOptional

Item name without colour, exact. Do not send at present – see the known issue below.

ColorNamestringOptional

Colour name, exact.

Responses
200

Always HTTP 200. Check Status, Message and GetData.

application/json
StatusbooleanOptional

See the Status rules on this page and on How Every API Call Works.

MessagestringOptional

Why the call failed, or a note. The reason may be followed by technical detail - read the first line.

LastGlobalModifyCodeintegerOptional

The change-log bookmark (see How Every API Call Works).

resultSizestringOptional

Size of the answer, for example "2 KB".

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

{
  "ItemCode": "",
  "EANCode": "8903247344529",
  "CompanyName": "",
  "ItemName": "",
  "ColorName": ""
}
{
  "GetData": {
    "ItemName": "text",
    "CompanyName": "text",
    "ColorName": "text",
    "ItemHDCode": 1,
    "ItemNameCode": 1,
    "ListImages": [
      {}
    ]
  },
  "Status": true,
  "Message": "text",
  "LastGlobalModifyCode": 1,
  "resultSize": "text"
}

Response fields

GetData is a single record, not a list:

Field
Type
Meaning

ItemName

text

Item name, without colour.

CompanyName

text

Company (brand).

ColorName

text

Colour.

ItemHDCode

number

Logic ERP's number for the item in this colour.

ItemNameCode

number

Logic ERP's number for the item name (shared by all colours).

ListImages

list of text

Web addresses of the pictures, in display order.

Example response

Messages you may see

Message
Meaning
What to do

Invalid Item... (with Status: true)

No item matches what you sent. GetData is null.

Check the code or barcode.

Imvalid Item..... (spelt this way, with Status: false)

The request did not identify an item: none of ItemCode, EANCode, or all three of CompanyName, ItemName and ColorName was filled.

Fill ItemCode or EANCode.

Invalid column name '…' (with Status: false)

ItemName was sent – see the known issue above.

Leave ItemName empty; use ItemCode or EANCode.

Another text with Status: false

The request could not be processed – for example a value containing a '.

Correct the value. If it continues, send the text to your Logic ERP support team.

Error messages with Status: false can carry technical detail around the reason – read the first line and look for the reason quoted above.