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
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
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:
ItemCode, orEANCode, orCompanyNameandItemNameandColorNametogether (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
ItemNamecurrently fails withStatus: false(the reason startsInvalid column name). Identifying the item by company + item name + colour therefore does not work. UseItemCodeorEANCodeinstead, and leaveItemNameempty.
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 examplehttps://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,
ListImagesis an empty list andStatusistrue.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
ListImagesin 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).
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).
The user name and password of your API site.
The item code, as UserCode in Get Item Master.
The item's main barcode / EAN, as AddlItemCode in Get Item Master. Further barcodes of the item (ListEANCode) are not searched.
Company (brand) name, exact.
Item name without colour, exact. Do not send at present – see the known issue below.
Colour name, exact.
Always HTTP 200. Check Status, Message and GetData.
See the Status rules on this page and on How Every API Call Works.
Why the call failed, or a note. The reason may be followed by technical detail - read the first line.
The change-log bookmark (see How Every API Call Works).
Size of the answer, for example "2 KB".
No login was sent.
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:
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
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.