> 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/pull/get-item-images.md).

# 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**, its **barcode**, or its company, name and colour.

### **Endpoint**

| Name          | Detail                                 |
| ------------- | -------------------------------------- |
| Address       | `https://your-server/api/GetItemImage` |
| Method        | `POST`                                 |
| Authorization | Basic Auth                             |

The response is 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). 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](https://kb.logicerp.com/logic-erp-learning-hub-tutorials-and-best-practices/api-documentation/masters/pull/get-item-master.md). |
| `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.                                                                                                                                                  |
| `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.

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

### **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**

```json
{
  "ItemCode": "",
  "EANCode": "8901234567908",
  "CompanyName": "",
  "ItemName": "",
  "ColorName": ""
}
```

### **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`, by `EANCode`, or by `CompanyName` + `ItemName` + `ColorName`.

## 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, its barcode, or its company, name and colour.

```json
{"openapi":"3.0.3","info":{"title":"Logic ERP API","version":"1.0"},"tags":[{"name":"Masters - Pull"}],"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":{"/GetItemImage":{"post":{"tags":["Masters - Pull"],"operationId":"GetItemImage","summary":"Get Item Images","description":"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, its barcode, or its company, name and colour.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ItemCode":{"type":"string","description":"The item code, as `UserCode` in Get Item Master."},"EANCode":{"type":"string","description":"The item's main barcode / EAN, as `AddlItemCode` in Get Item Master. Further barcodes of the item (`ListEANCode`) are not searched."},"CompanyName":{"type":"string","description":"Company (brand) name, exact."},"ItemName":{"type":"string","description":"Item name without colour, exact."},"ColorName":{"type":"string","description":"Colour name, exact."}}}}}},"responses":{"200":{"description":"Always HTTP 200. Check Status, Message and GetData.","content":{"application/json":{"schema":{"type":"object","properties":{"GetData":{"type":"object","properties":{"ItemName":{"type":"string","description":"Item name, without colour."},"CompanyName":{"type":"string","description":"Company (brand)."},"ColorName":{"type":"string","description":"Colour."},"ItemHDCode":{"type":"integer","description":"Logic ERP's number for the item in this colour."},"ItemNameCode":{"type":"integer","description":"Logic ERP's number for the item name (shared by all colours)."},"ListImages":{"type":"array","items":{"type":"object"},"description":"Web addresses of the pictures, in display order."}},"nullable":true,"description":"The records found; null when the call failed or nothing was found - read Message."},"Status":{"type":"boolean","description":"See the Status rules on this page and on How Every API Call Works."},"Message":{"type":"string","description":"Why the call failed, or a note. The reason may be followed by technical detail - read the first line."},"LastGlobalModifyCode":{"type":"integer","description":"The change-log bookmark (see How Every API Call Works)."},"resultSize":{"type":"string","description":"Size of the answer, for example \"2 KB\"."}}}}}},"401":{"description":"No login was sent."}}}}}}
```

### **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**

```json
{
  "GetData": {
    "ItemName": "KURTA KRT1042",
    "CompanyName": "RANGRITI",
    "ColorName": "BLUE",
    "ItemHDCode": 3816,
    "ItemNameCode": 1207,
    "ListImages": [
      "https://erp.example.com/ABC/Images/KRT1042-BLU-1.jpg",
      "https://erp.example.com/ABC/Images/KRT1042-BLU-2.jpg"
    ]
  },
  "Status": true,
  "Message": "",
  "LastGlobalModifyCode": 0,
  "resultSize": "1 KB"
}
```

### **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`.                                  |
| Another text with `Status: false`                          | The request could not be processed.                                                                                                        | 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.


---

# 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/pull/get-item-images.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.
