# AI and downloadable resources Use the same documentation in your browser, coding assistant or API tooling. The downloadable files are generated from the published guides and API schema during each build. ## Choose a format | Resource | Use it for | |---|---| | [OpenAPI JSON](https://apidocs.istores.co.il/openapi.json) | Exact paths, methods, operation IDs, parameters, request schemas and responses | | [AI documentation index](https://apidocs.istores.co.il/llms.txt) | Find the relevant guide before loading more context | | [All guides as text](https://apidocs.istores.co.il/llms-full.txt) | Read the complete guides, including expandable content, in one file | | [Quickstart as Markdown](https://apidocs.istores.co.il/authentication.md) | Authentication and the first request | | [API conventions as Markdown](https://apidocs.istores.co.il/api-conventions.md) | Response envelopes, pagination, partial updates and retries | | [MCP guide as Markdown](https://apidocs.istores.co.il/mcp.md) | Connect an assistant to your store | | [Minimal MCP bot guide](https://apidocs.istores.co.il/mcp-bots.md) | Public endpoints, authentication flow and tool discovery for assistants | For an individual guide, append `.md` to its page path, for example `/modules.md` or `/design.md`. In the browser, **Copy for AI** copies the page as Markdown, including expandable guide sections. **Download schema** downloads the OpenAPI JSON. Its dropdown lets you open the schema in a new tab, copy it to the clipboard, or use it in Claude or ChatGPT. The AI links contain public documentation links and a short prompt; they do not include API credentials or store data. ## REST API and MCP The REST API uses your API bearer token. MCP uses a separate OAuth connection and exposes named tools. An API endpoint does not automatically imply an MCP tool exists for it. For MCP, use the connected server's `tools/list` result to confirm tool names, required arguments and permissions. ## Suggested integration brief ```text Use the iStores authentication guide, API conventions and OpenAPI schema. Find the exact operation and its required fields before writing integration code. Use IDs read from my store and keep credentials out of generated examples and logs. Respect the documented request rate and handle validation and permission errors. Read current values before updates and preserve fields I did not ask to change. Show me the proposed payload and wait for approval before changing live data. If a required detail is undocumented, identify what is missing instead of guessing. ``` Examples are illustrative. Check the operation's schema for accepted values, and keep API credentials in your application's private configuration. Source: https://apidocs.istores.co.il/ai-resources --- # AI storefront designer Use an AI assistant connected through MCP to inspect your current storefront and plan design improvements. 1. Follow the [MCP connection guide](https://apidocs.istores.co.il/mcp). 2. Read the [Store design guide](https://apidocs.istores.co.il/design) for general appearance, mobile options, layouts and shared header/footer settings. 3. Use [Modules and banners](https://apidocs.istores.co.il/modules) to edit content blocks, images and their order. ## Start with this request ~~~text Inspect my current storefront, design settings, layouts and modules. Propose improvements using my existing branding. Show me the exact changes and wait for approval before saving anything. Keep settings and banners that I did not ask to change. Save the current values before editing. Create a CSS/JS snapshot before custom code changes and keep template-file backups enabled. After saving, check the affected pages in a browser on desktop and mobile. ~~~ Design and module changes take effect immediately. A storefront preview link shows the current store; it does not isolate proposed edits. CSS/JS snapshots restore custom CSS/JS only, and template files use separate backups. There is no full design rollback for settings, layouts, modules and banners. Source: https://apidocs.istores.co.il/ai-storefront-designer --- # Requests, responses and retries Use this guide alongside the [authentication quickstart](https://apidocs.istores.co.il/authentication) and the schema for your chosen [API operation](https://apidocs.istores.co.il/explore). ## Choose the exact operation Use the documented HTTP method and path. Some list operations use `POST` to accept filters, including customer and order lists. Read the operation description to understand whether it reads or changes data. Path parameters identify resources, such as `product_id` or `layout_module_id`. Use IDs returned by your own store. Example IDs and image URLs are placeholders. Send JSON for JSON request bodies. The [media upload operation](https://apidocs.istores.co.il/api/store-themes#upload-store-theme-media) uses `multipart/form-data` instead; let your HTTP client generate its multipart boundary. ## Read the response Response property names are case-sensitive. The data key depends on the operation: examples include `products`, `product`, `response`, `languages` and `currencies`. Do not assume every operation returns the same envelope. A successful product list may look like this simplified example: ```json { "success": true, "products": [ { "product_id": 123, "sku": "EXAMPLE-SKU" } ], "results": 25, "pages": 3, "page": 1, "per_page": 10, "request_id": "example-request-id" } ``` The `products` array is abbreviated here. Check both the HTTP status and any returned `success` value. Record `request_id` when available to help support investigate a failed request. Error responses can contain `message`, `error` or field-level `errors`; use the endpoint's documented response shape. ## Pagination and empty results Pagination differs by resource. Products use `GET /products/{limit}/{page}` with up to 100 products per page. Modules use `page` and `limit` query parameters. Other list operations accept filters in a JSON body or have a fixed result limit. Where returned, `results` is the total count, `pages` is the page count, `page` is the current page and `per_page` is the page size. Start at page 1 and stop when the page count is reached. A page count of 0 means there are no results. Do not assume every empty list returns `200`: some operations return `404` when nothing is found. Check the resource reference before treating that response as an authentication or connection failure. ## Updates and omitted fields Update behavior is specific to each resource. Design settings and module updates preserve omitted fields. A Points rank update requires a complete payload and replaces its settings object. Read the resource first, then follow that operation's schema. An omitted field, `null`, an empty string and an empty array can have different meanings. For example, `banners: []` retains saved banners; use the banner delete operation to remove one. Do not copy a read response directly into a write request: it can include response-only fields and different translation formats. ## Rate limits and retries Keep integration traffic at **2 requests per second**. Queue requests instead of sending large parallel batches. For `429`, honor `Retry-After` when present and otherwise use increasing delays between retries. Handle failures without repeating a completed action - For `401` or `403`, correct authentication or permissions before retrying. - For `400` or `422`, correct the request using the returned message or field errors. - For a read timeout or temporary server failure, retry with a bounded number of attempts and backoff. - After a write times out, read the current state first: the write may already have completed. - Before retrying a create, delete, payment, invoice or shipment operation, verify its result. Do not assume it is safe to repeat or that an idempotency header is supported. ## Prepare changes with an AI assistant Give the assistant the relevant guide and operation schema. Start with a read, review the proposed payload, and approve changes before execution. Require separate approval for payments, deletions and paid image generation. The [AI resources page](https://apidocs.istores.co.il/ai-resources) provides downloadable schemas and Markdown guides. Source: https://apidocs.istores.co.il/api-conventions --- # Authentication and quickstart Use an iStores API bearer token to connect your server to your store. ## 1. Get your credentials Open [API settings in your dashboard](https://app.istores.co.il/client/settings/company) and obtain your integration credentials. Enable the permissions needed for the operations you plan to use. Keep your token private. ## 2. Set your headers | Header | Value | |---|---| | `Authorization` | `Bearer YOUR_TOKEN` | | `User-Agent` | Your integration name and version, such as `catalog-sync/1.0` | | `Content-Type` | `application/json` when sending a JSON body | ## 3. Read your catalog This request reads the first ten products without changing your store: ```bash curl "https://api.istores.co.il/products/10/1" \ -H "Authorization: Bearer YOUR_TOKEN" \ -H "User-Agent: catalog-sync/1.0" ``` Replace `YOUR_TOKEN` with your bearer token. See [Products](https://apidocs.istores.co.il/api/products) for the response fields and pagination parameters. ## 4. Choose your next operation Browse [API resources](https://apidocs.istores.co.il/explore), open a resource and choose an operation. Check its required permissions and fields before sending a request. In the API playground, use your own credentials and review the method and body before running it: write operations affect your live store. ## Troubleshooting Authentication and permission errors | Status | Action | |---|---| | `401` | Check the bearer token and obtain valid credentials if needed. | | `402` | Review outstanding payments in your dashboard. | | `403` | Check that your credentials allow the requested operation. | Validation, rate limits and retries | Status | Action | |---|---| | `400` | Check JSON syntax and the endpoint's request format. | | `404` | Check the resource ID and whether the feature is available for your store. | | `422` | Read the returned field errors and correct the request. | | `429` | Wait before retrying. Honor `Retry-After` when present; otherwise use backoff. | Keep requests at 2 per second. After a write times out, read the resource before retrying so you do not create duplicate records or repeat a payment. Continue with [Requests, responses and retries](https://apidocs.istores.co.il/api-conventions). For AI assistants, follow the separate [MCP connection guide](https://apidocs.istores.co.il/mcp). Source: https://apidocs.istores.co.il/authentication --- # Store design Manage your store's appearance through the API or an AI assistant connected through MCP. Start by reading the current design, then send only the values you want to change. ## Choose what to change | Area | What it controls | Start with | |---|---|---| | General design | Theme, main color, typography, mobile display and store-wide options | `GET /store_themes/settings` | | Header and footer | Shared header/footer settings | `GET /modules/global_settings/header` or `/footer` | | Page layouts | Settings for existing page types, such as category and product pages | `GET /layouts` | | Modules and banners | Content blocks, images and their order | `GET /modules` | | Custom code | Custom CSS/JS, saved versions and supported template files | [Saved CSS/JS versions](#saved-cssjs-versions) | A **layout** is a page type, such as the homepage or category page. A **module** is a content block placed inside a layout, header or footer. An individual product or category still needs its own page ID when opening its URL. Saving design settings, modules or banners changes the live store immediately. There is no separate publish step or draft preview for these operations. Review the proposed change before saving, then check the storefront in a browser on desktop and mobile. ## Make a small change safely 1. Read the current settings or module and keep a copy of the response. 2. Select the existing layout, module or banner by its returned ID. 3. Send only the fields you intend to change. 4. Check the response for success and read the updated values again. 5. Open the affected pages on desktop and mobile. Fields left out of a partial update keep their saved values. For example, changing the mobile grid does not require resending your color, theme or font. If an option has never been saved, the API may return the existing theme defaults. For the design, layout and global-settings endpoints below, both `PUT` and `PATCH` accept partial updates. Module updates also preserve omitted fields; the [Modules and banners guide](https://apidocs.istores.co.il/modules) explains how nested settings and image lists behave. ## General design Read `GET /store_themes/settings` to get `theme_id`, `color`, `theme_options`, and the available themes and colors. Use the returned theme IDs rather than guessing them. Font choices are included as `fonts` when available. Fields and example requests To display two product columns on mobile, send `PATCH /store_themes/settings`: ~~~json { "theme_options": { "mobile_grid": 2 } } ~~~ To change only the main color, send: ~~~json { "color": "#336699" } ~~~ The update response contains the resulting `theme_id`, `color` and `theme_options`. Available themes and colors are included on the read response. | Field | Accepted value | |---|---| | `theme_id` | An existing theme ID returned by the read endpoint | | `color` | Hex color, such as `#369` or `#336699` | | `theme_options.mobile_grid` | `1` or `2` | | `theme_options.mobile_nav_style` | `side` or `bottom` | | `theme_options.type_contact` | `email` or `phone` | | `theme_options.theme_font` | A supported font key; keep the current value unless intentionally changing typography | | `theme_options.theme_mail` | `classic` or `dynamic` | | `theme_options.show_price_range` | `0`, `1` or `2` | | `theme_options.product_images_hover` | `1`, `2`, `3` or `4` | Other supported options, such as `search`, `sticky`, `top_bar`, `categories_bar`, `show_breadcrumbs` and `quick_view`, accept boolean values. The API reference lists the supported keys. How an option appears depends on the active theme. ## Header and footer Read the shared settings with: Settings and example request - `GET /modules/global_settings/header` - `GET /modules/global_settings/footer` The response includes `position`, `settings` and `allowed_modules`. These settings are separate from the content modules placed in the header or footer. To enable a sticky header, send `PATCH /modules/global_settings/header`: ~~~json { "sticky": 1 } ~~~ Send the fields directly, without a `settings` wrapper. | Position | Settings | |---|---| | Header | `top_bar`, `sticky`, `search`, `categories_bar`, `flex_menu_display`, `overflow_menu`: `0` or `1`; `type_contact`: `email` or `phone` | | Footer | `bottom_bar`: a list containing any of `about_us`, `account`, `newsletter`, `customer_service` | A supplied `bottom_bar` replaces that list. Sending `{"bottom_bar": []}` clears it; leaving it out keeps the saved list. ## Page layouts Use `GET /layouts` to discover editable layouts. Each entry includes its `layout_id`, `name`, `route`, saved `settings`, allowed module codes and positions. `GET /layouts/{layout_id}` also includes the layout's modules and banners. Supported settings and example request When a layout points to a specific product, category or information page, `url` can be null. Use `url_template` and its `entity_parameter`, replacing the placeholder with a real page ID. Wildcard routes can have no direct URL. To change a category layout's product limit, send `PATCH /layouts/{layout_id}/settings` with the ID returned for `product/category`: ~~~json { "product_limit": 24 } ~~~ Send settings directly, without a `settings` wrapper. Only settings supported by that page type are accepted for saving. | Layout route | Editable settings | |---|---| | `product/category` | `subcategory_type` (`side`/`top`/`none`), `show_thumb`, `categories_mode`, `price_filter_status`, `brands_filter_status`, `filter_status`, `options_filter_status`, `bogo_filter_status`, `product_limit` (3–300), `sort` (`sales`/`p.viewed`, or null) | | `product/product` | `show_purchase_now_button`, `image_slider_infinite_loop` | | `product/search` | `price_filter_status`, `brands_filter_status`, `product_limit` (3–300) | | `product/special` | `price_filter_status`, `show_bogo_products`, `selected_bogo` (IDs belonging to the store, or null) | Switches accept `0` or `1`. A supplied `selected_bogo` list replaces the saved list. Other layouts can still be read and contain modules, but may have no editable layout settings. These endpoints manage existing layouts. Creating, duplicating or assigning new layouts is not available through them. ## Modules and banners Use the [Modules and banners guide](https://apidocs.istores.co.il/modules) for creating content blocks, editing individual banner fields, moving modules and changing their order. Example: hide a module For example, hide one module with `PATCH /modules/{layout_module_id}`: ~~~json { "settings": { "status": 0 } } ~~~ Its other settings and banners remain saved. To remove a banner, use the explicit banner delete endpoint; leaving a banner out of an update does not delete it. ## Saved CSS/JS versions Read saved versions of your custom CSS or JavaScript. Use version IDs returned for the same store and code type. Response fields and examples | Operation | Endpoint | |---|---| | List saved CSS versions | `GET /store_themes/css/versions` | | List saved JS versions | `GET /store_themes/js/versions` | | Read current or saved CSS | `GET /store_themes/css` | | Read current or saved JS | `GET /store_themes/js` | CSS reads require the `themesCss` permission; JS reads require `themesJs`. Authenticate with your API bearer token. A versions list returns at most 30 available entries, newest saved date first, then highest ID. Each item contains only these fields: ~~~json { "success": true, "response": [ { "date": "2026-10-31T12:00:00.000000Z", "version": 123, "version_id": 123 } ] } ~~~ The normal response envelope may also include `request_id`. `version` is the saved version number shown in the editor and equals `version_id`; it is not a sequential position in the list. Empty history returns `response: []`. Lists have no code content or pagination. To read one version's content, use `GET /store_themes/css?version_id=123` (or the matching JS path). The response keeps the existing shape: ~~~json { "success": true, "response": { "code": ".example { color: #336699; }" } } ~~~ Omitting `version_id` keeps the existing latest/current read behavior; no current code returns `code: ""`. A supplied ID must be a non-empty positive integer. Invalid IDs and IDs missing from this store/code type return HTTP 422; they never silently select the latest version. Reading a version does not activate it. In the editor, **Use version** loads that version into the editable draft; **Save** creates a new saved version and makes that saved content current. The existing `PUT /store_themes/css` and `PUT /store_themes/js` writes remain unchanged. Saved version history is separate from MCP snapshots and template-file backups. ### Read versions through MCP Use `list_theme_versions` with required `kind` (`css` or `js`), then pass a returned `version_id` to `read_theme`. Both are read-only. Omit `version_id` on `read_theme` for its existing current-code behavior. ~~~json { "name": "list_theme_versions", "arguments": { "kind": "css" } } ~~~ ~~~json { "name": "read_theme", "arguments": { "kind": "css", "version_id": 123 } } ~~~ `list_theme_versions` returns the metadata list in the API response envelope; `read_theme` returns its existing `kind`, `code` and `bytes` fields. Use the returned IDs for this store, rather than copying the example ID. ## Use an AI assistant through MCP Connect using the [MCP connection guide](https://apidocs.istores.co.il/mcp). Your connection identifies the store automatically. Tools, arguments and example request A useful starting request: ~~~text Read my store's current design, layouts and modules. Show me the current mobile grid and the homepage modules. Propose only the changes needed to improve mobile readability. Explain which pages will change and wait for my approval before saving. Keep all settings and banners I did not ask to change. After saving, check the affected pages in a browser on desktop and mobile. ~~~ | Task | MCP tools | |---|---| | Read/change general design | `read_design_settings`, `update_design_settings` | | Discover layouts and read one | `list_layouts`, `get_layout` | | Change page-type settings | `update_layout_settings` | | Read/change header or footer | `read_global_settings`, `update_global_settings` | | Read content modules | `list_modules`, `get_module` | | Add/edit content | `create_module`, `update_module` | | Move or reorder content | `reorder_modules` | | Remove a module or banner | `delete_module`, `delete_banner` | Example MCP call to change just the mobile grid: ~~~json { "name": "update_design_settings", "arguments": { "payload": { "theme_options": { "mobile_grid": 2 } } } } ~~~ MCP deletions require `confirmed: true` after you approve the exact module or banner. If a tool reports a missing OAuth scope, reconnect and grant the required permission. ### MCP arguments | Tool | Arguments | |---|---| | `read_design_settings`, `list_layouts` | No required arguments | | `get_layout` | `layoutId` | | `update_design_settings` | `payload` containing only changed design fields | | `update_layout_settings` | `layoutId`, `payload` containing direct layout-setting fields | | `read_global_settings` | `position`: `header` or `footer` | | `update_global_settings` | `position`, `payload` containing direct header/footer fields | | `list_modules` | Optional `layoutId`, `position`, `page` and `limit` (1–100) | | `get_module` | `layoutModuleId` | | `create_module` | `payload` containing a complete new-module body | | `update_module` | `layoutModuleId`, `payload` containing only changed module fields | | `reorder_modules` | `payload` containing `layout_id`, `sorted_modules` and, when moving from another layout, `layout_module_id` | | `delete_module` | `layoutModuleId`, `confirmed: true` | | `delete_banner` | `layoutModuleId`, `bannerImageId`, `confirmed: true` | Top-level MCP arguments use names such as `layoutId`; fields inside `payload` use the API names such as `layout_id`. Use your store's returned IDs, never the example IDs unchanged. ## Authentication and API coverage Use the base URL in this site's API reference. API requests use `Authorization: Bearer YOUR_TOKEN`; JSON writes also need `Content-Type: application/json`. Include a `User-Agent` header identifying your integration. API permissions and MCP scopes | Feature | API permission | MCP OAuth scopes | |---|---|---| | General design | `themesModify` | `themes:read`, `themes:update` | | Layouts and global settings | `themesModules` | `modules:read`, `modules:update` | | Modules and banners | `themesModules` | `modules:read`, `modules:create`, `modules:update`, `modules:delete` as needed | ## Preview, backups and simultaneous edits Editing and recovery guidance - A storefront preview link shows the store's current state. It does not provide an isolated preview of these proposed changes. - CSS/JS snapshots restore custom CSS/JS only. They do not restore design settings, layouts, modules or banners. Template files use separate file backups. - Keeping read responses helps you put earlier values back through the matching update endpoints. It is not a full-store backup and cannot automatically recover deleted modules or banners. - Partial updates preserve fields you leave out. There is no version check or `If-Match` support for these writes. If two people change the same field, the later save can overwrite it. Read again before saving and coordinate edits. - After a timeout, read the current state before retrying a write, especially module creation. The first request may already have completed. ## Common errors Status codes and next steps | Status | What to do | |---|---| | 400 | Check the ordering request for duplicate IDs, invalid positions or a moved module missing from the order. Also check for repeated banner IDs. | | 401 | Authenticate again. | | 403 | Check permissions and access to the selected layout. | | 404 | Read the module, layout or banner list again and use an ID belonging to this store. | | 422 | Read the field errors and correct the supplied values. A theme update can also report a save failure. | | 429 | Honor `Retry-After` when present; otherwise wait and use backoff. | For support, include the response's `request_id` and the operation that failed. Never include your token. Source: https://apidocs.istores.co.il/design --- # Explore the API Choose a resource to open its reference, then select an operation to see parameters, request bodies, responses and runnable examples. ## Catalog - [Products](https://apidocs.istores.co.il/api/products): List, create and update products, manage inventory and make bulk changes. - [Categories](https://apidocs.istores.co.il/api/categories): Organize products into categories and maintain category content. - [Product options](https://apidocs.istores.co.il/api/products-options): Manage options and the choices available on your products. - [Custom fields](https://apidocs.istores.co.il/api/custom-field): Define additional fields for your commerce data. ## Sales and customers - [Orders](https://apidocs.istores.co.il/api/orders): Read orders, update their status, create invoices and manage shipments. - [Customers](https://apidocs.istores.co.il/api/customers): Read and maintain customer profiles and assign loyalty ranks. - [Custom orders](https://apidocs.istores.co.il/api/custom-orders): Create pay-by-link orders and manage their payment details. - [Payment links](https://apidocs.istores.co.il/api/payment-links): Create and manage payment links, expiry dates and QR codes. - [Coupons](https://apidocs.istores.co.il/api/coupons): Find coupons and inspect their details. - [Points](https://apidocs.istores.co.il/api/points): Manage loyalty ranks and customer reward thresholds. ## Storefront - [Store design](https://apidocs.istores.co.il/api/store-design): Update appearance, mobile options, layouts and shared header/footer settings. - [Modules](https://apidocs.istores.co.il/api/modules): Create, edit and arrange content blocks and banners. - [Store themes](https://apidocs.istores.co.il/api/store-themes): Read and update custom CSS/JS, browse saved versions and upload media. - [Dynamic fields](https://apidocs.istores.co.il/api/dynamic-fields): Manage reusable fields for storefront content. ## Shipping and automation - [Shipping](https://apidocs.istores.co.il/api/shipping): Discover shipping methods and read their configuration. - [Webhooks](https://apidocs.istores.co.il/api/webhook): Subscribe to store events and manage webhook destinations. - [Reference data](https://apidocs.istores.co.il/api/misc): Look up languages, currencies, dimensions and stock statuses. Source: https://apidocs.istores.co.il/explore --- # Build with iStores Connect your applications to your store. Manage products, customers and orders, customize your storefront, and automate everyday commerce workflows through the iStores API. ## Start building - [Make your first request](https://apidocs.istores.co.il/authentication): Set up authentication and read your product catalog. - [Explore the API](https://apidocs.istores.co.il/explore): Find the resources, operations and examples for your integration. - [Customize your storefront](https://apidocs.istores.co.il/design): Work with design settings, page layouts, modules and banners. - [Connect an AI assistant](https://apidocs.istores.co.il/mcp): Use MCP to inspect your store and make changes with your approval. ## How the API works Send HTTPS requests to `https://api.istores.co.il`. Authenticate with a bearer token and send JSON when an operation accepts a request body. Each endpoint in the [API reference](https://apidocs.istores.co.il/api) includes its parameters, request schema and response examples. Your credentials determine which store and operations you can access. Keep tokens on your server and out of browser code, public repositories and support messages. ## Request limits Keep your integration at **2 requests per second** (120 per minute). Queue requests and avoid unbounded parallel calls. If you receive `429 Too Many Requests`, wait before retrying; honor `Retry-After` when present and use backoff otherwise. ## Find what you need Use **Guides** for setup and common workflows. Open **API reference** to browse resource groups, expand a resource and select an operation. Use the page contents to jump to a section, and expand examples or field details as needed. For help with a failed request, contact [iStores support](mailto:support@istores.co.il) with the operation, HTTP status and response `request_id` when available. Read [Requests, responses and retries](https://apidocs.istores.co.il/api-conventions) for pagination and update behavior. For coding assistants and API tooling, use the [downloadable resources](https://apidocs.istores.co.il/ai-resources). Source: https://apidocs.istores.co.il/introduction --- # MCP connection Connect ChatGPT, the Claude app, Claude Code, Codex, or another OAuth-capable MCP client to your iStores account. The assistant can inspect your storefront, manage your catalog, edit theme files, and generate branding assets through the hosted iStores Design Ops server. MCP stands for **Model Context Protocol**: it lets an assistant discover available iStores tools and call them on your behalf. You describe a task in normal language; the app selects a tool, asks for any required inputs and shows the result. You do not need to install or host an MCP server. Connecting an assistant gives it access to the store you authorize, so start with a read-only request before making changes. ## Choose your app | App | Start here | |---|---| | Codex desktop, CLI or IDE extension | [Codex connection steps](#connect-with-codex) | | ChatGPT | [ChatGPT connection steps](#connect-with-chatgpt) | | Claude desktop or web | [Claude app connection steps](#connect-with-the-claude-app-desktop--web) | | Claude Code | [Claude Code connection steps](#connect-with-claude-code) | | Another coding assistant | [Remote MCP requirements](#other-mcp-clients) | After connecting, follow [Verify your connection and explore tools](#verify-your-connection-and-explore-tools). For coding assistants, use the minimal [MCP bot guide](https://apidocs.istores.co.il/mcp-bots.md). ## Connection Details | Field | Value | |---|---| | Server name | `istores-design-ops` | | MCP URL | `https://api.istores.co.il/mcp` | | Transport | Streamable HTTP | | Authentication | OAuth 2.0 through your iStores account | | Company and store | Selected automatically from the company active when you approve access | Add the server URL without a manually configured `Authorization` header. Your MCP client obtains and sends the OAuth access token after you sign in. The API key from [Company settings](https://app.istores.co.il/client/settings/company) is for the regular API. It is not accepted by the current MCP authentication flow. ## Before Connecting 1. Use an MCP client that supports remote HTTP servers and OAuth. 2. Sign in to your iStores dashboard and select the company/store you want the assistant to use. 3. Add the MCP server using one of the instructions below. 4. Complete the browser login and approve the requested permissions. If your account manages several companies, select the intended company before approving access. Changing the company in the dashboard later does not change an existing MCP token. Sign out of the MCP connection and authenticate again to connect another company. The store user must sign in and approve access. If the browser already has an iStores session, it can go straight to the permission screen. Automatic client registration identifies the assistant application; it does not authorize access to a store. An OAuth authentication method of `none` means the application does not use a client secret, while user login, consent and PKCE are still required. ## Connect with ChatGPT Add a custom MCP app/connector using `https://api.istores.co.il/mcp` and OAuth authentication. Let ChatGPT identify or register its client automatically; leave manually configured API keys and client secrets empty. Complete the iStores browser login and approve access for the intended company, then enable the connection in your chat. See [OpenAI's MCP setup guide](https://learn.chatgpt.com/docs/extend/mcp) for the controls available in your ChatGPT version and workspace. ## Connect with the Claude App (Desktop / Web) No terminal commands are needed for this setup. Claude app setup instructions 1. Open Claude and go to **Customize → Connectors**, or open [Connectors](https://claude.ai/customize/connectors) in your browser using the same Claude account. 2. Choose **+ Add → Add custom connector**. 3. Enter **iStores Design Ops** as the name and `https://api.istores.co.il/mcp` as the remote MCP server URL. Click **Continue**. 4. Review the detected OAuth settings. Choose **Sign in now**. For **OAuth client**, use **Claude's published identity** or **Register automatically**. Leave your own client ID/secret and request headers empty; iStores supports automatic client identification. 5. Finish adding the connector. If it is not connected yet, click **Connect**. 6. In the browser, sign in to iStores, ensure the intended company is selected, and approve access. 7. Open a Claude chat, click **+ → Connectors**, and enable **iStores Design Ops**. Try: **Inspect my current store and list its products. Do not change anything yet.** For Team or Enterprise accounts, an authorized organization administrator must add the connector first; each member then connects individually. If the app does not show the add option, use the browser Connectors page above. See the [official Claude custom connector guide](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp). ## Connect with Claude Code Run in your terminal: Claude Code setup instructions ```bash claude mcp add --transport http --scope user istores-design-ops https://api.istores.co.il/mcp ``` Inside an interactive Claude Code session, open: ```text /mcp ``` Select `istores-design-ops`, start authentication, and complete the iStores login and permission approval in your browser. Then check the connection: ```bash claude mcp list ``` ### If You Already Added an API Key Remove the old user-scoped entry, then add it again without a header: ```bash claude mcp remove istores-design-ops --scope user claude mcp add --transport http --scope user istores-design-ops https://api.istores.co.il/mcp ``` Open `/mcp` again and authenticate. If the old entry was added with a different scope, remove that entry using its original scope. A configured `Authorization` header prevents Claude Code from falling back to OAuth when that header is rejected. See the [official Claude Code MCP documentation](https://code.claude.com/docs/en/mcp#authenticate-with-remote-mcp-servers). ## Connect with Codex Use the desktop app's MCP settings or configure the server from the CLI. For a local Codex host, the desktop app, CLI and IDE extension share MCP configuration. Codex setup instructions ### Desktop setup If your desktop client has **MCP servers** in Settings, add a server named `istores-design-ops`, select **Streamable HTTP** and enter `https://api.istores.co.il/mcp`. Save and restart the connection, then choose **Authenticate** to complete iStores sign-in. If these controls are unavailable in your version, use the CLI setup below. ### CLI setup Run these commands in the environment where your Codex client runs: ```bash codex mcp add istores-design-ops --url https://api.istores.co.il/mcp codex mcp login istores-design-ops codex mcp list ``` Complete the iStores login and permission approval in the browser opened by the login command. Then open a chat and ask the assistant to discover the connected tools. A configured server entry alone does not confirm that authentication or tool discovery succeeded. Codex can use its published client metadata automatically. Its local browser callback uses a temporary loopback port, which can change on each login. Do not manually register that port or replace the callback URL; let Codex manage it. ### Configure Manually Alternatively, add this entry to `~/.codex/config.toml`: ```toml [mcp_servers.istores-design-ops] url = "https://api.istores.co.il/mcp" enabled = true ``` Then run `codex mcp login istores-design-ops`. Reload your Codex session if the new server is not visible. For an existing entry, remove manually configured `Authorization` values from `http_headers` or `env_http_headers`, and remove `bearer_token_env_var` for this server before using OAuth. Keep only one definition of this server in the configuration that applies to your session. See the [official Codex MCP documentation](https://developers.openai.com/codex/mcp). ## Other MCP Clients Add a remote HTTP MCP server with URL `https://api.istores.co.il/mcp`, choose OAuth authentication, and follow the browser login flow. Leave custom API key and `Authorization` header fields empty. Connection requirements The client must support OAuth discovery and either dynamic client registration or a supported client metadata document. A client that only supports static API key headers cannot use this connection method. ## Verify your connection and explore tools Ask your assistant: ```text Discover the tools available on my istores-design-ops MCP connection. List what you can read and what would change my store. Read my available store languages and summarize the result. Do not create, update, delete, generate images or spend credits. If access is missing, explain what I need to reconnect or authorize. ``` The MCP client handles connection setup and tool discovery. `tools/list` returns tool names, descriptions and input schemas. The app may expose this catalog through its tool search or connection panel rather than a button named `tools/list`. A successful read with `list_languages` confirms that the assistant can call the connected server. Ask it to show a short summary rather than credentials or the full connection metadata. If tools are missing, reconnect, approve the required access and refresh the app's tool catalog. How an assistant should select and call a tool 1. Discover the tools exposed by the current connection. Do not infer a tool from a REST endpoint or from this guide alone. 2. Inspect the chosen tool's input schema. Use its exact argument names and required fields. 3. Read the current resource and use the returned IDs. For example, use `list_modules` before editing a module. 4. For a change, show the proposed arguments, explain the effect and obtain approval before calling the write tool. 5. Read the result and verify the changed resource. After a timeout, check the current state before retrying a write. The app sends tool calls through the MCP connection. A REST path such as `GET /modules` is documentation for the REST API; it is not a tool name. Similarly, `layoutId` in a tool schema and `layout_id` inside an API payload are not interchangeable. ## What the Server Can Do Available tools and usage guidance | Area | Available tools | |---|---| | Setup and inspection | `create_launch_plan`, `inspect_brand_assets`, `inspect_storefront` | | Store languages | `list_languages` | | Products | `list_products`, `get_product`, `create_product`, `update_product`, `delete_product` | | Categories | `list_categories`, `get_category`, `create_category`, `update_category`, `delete_category` | | Options | `list_options`, `get_option`, `create_option`, `update_option`, `delete_option` | | Custom CSS/JS and snapshots | `read_theme`, `list_theme_versions`, `update_theme`, `create_snapshot`, `list_snapshots`, `rollback_snapshot` | | Editable theme files | `list_theme_files`, `read_theme_file`, `update_theme_file`, `delete_theme_file` | | Branding and media | `upload_media`, `update_logo`, `update_banner` | | AI image generation | `check_demo_budget`, `list_brand_ai_prompts`, `generate_logo`, `generate_banner`, `generate_product_image`, `get_ai_generation_result` | Use the schemas returned by `tools/list` for each tool's required fields. OAuth scopes advertised by the server do not mean that a matching MCP tool exists for every regular API endpoint. For example, payment setup is handed off to the dashboard link returned by `create_launch_plan`. ### Start with a Read-Only Request After connecting, ask: ```text Use the iStores MCP connection to inspect my current store and list its products. Do not create, update, delete, generate, or publish anything yet. ``` For a storefront redesign workflow, see [iStores AI Storefront Designer](https://apidocs.istores.co.il/ai-storefront-designer). ### Changes, Media, and Backups - Ask the assistant to explain changes and obtain your approval before changing a live store. - `update_theme` replaces the full custom CSS value. Read the existing CSS first and keep `createBackup` enabled; it defaults to `true`. - Non-empty JavaScript is blocked by `update_theme`. Use the editable files returned by `list_theme_files` for supported theme JS changes. - `create_snapshot` and `rollback_snapshot` cover custom CSS and JS only. They do not back up products, categories, options, logos, banners, or the whole store. - Theme file updates and resets create separate file snapshots by default. `rollback_snapshot` does not restore those file snapshots. Resetting a file with `delete_theme_file` restores the system version, not an earlier custom version. - Product/category/option deletion requires `confirmed: true` after you approve the exact ID. Theme file reset requires confirmation of the exact path. - Use public, server-fetchable image URLs for product and branding updates. Chat-local files and session-only links are not accessible to the MCP server. `upload_media` accepts image data; its `filePath` refers to a file on the MCP host. - AI generation consumes credits. Check `check_demo_budget` first. An insufficient balance may trigger a paid credit top-up; approve spending before generation. - Image generation is asynchronous. Poll `get_ai_generation_result` with the same `resultId`, respecting `pollAfterSeconds` and `maxWaitSeconds`. Do not start another generation while the existing job is processing. Check the completed result's `data.applied` before applying branding again. ## Store design, layouts and modules You can ask the assistant to change general design settings, mobile options, existing page layouts, header/footer settings, modules and individual banners. Start with the [Store design guide](https://apidocs.istores.co.il/design) for examples and the [Modules and banners guide](https://apidocs.istores.co.il/modules) for content editing. Design tools, permissions and examples | Area | Tools | OAuth scope | |---|---|---| | General design | `read_design_settings` / `update_design_settings` | `themes:read` / `themes:update` | | Existing layouts | `list_layouts`, `get_layout` | `modules:read` | | Layout settings | `update_layout_settings` | `modules:update` | | Shared header/footer | `read_global_settings` / `update_global_settings` | `modules:read` / `modules:update` | | Read modules | `list_modules`, `get_module` | `modules:read` | | Add a module | `create_module` | `modules:create` | | Edit, move or reorder modules | `update_module`, `reorder_modules` | `modules:update` | | Remove a module/banner | `delete_module`, `delete_banner` | `modules:delete` | Read the current values first, then send only the fields you want to change. Omitted settings and banners remain saved. Supplied settings lists replace that list; banner removal uses `delete_banner`. Use the schemas returned by `tools/list` for exact arguments. If access is missing, reconnect and approve the required scope. Product lists and sliders support up to two banners between products. Use `create_module`/`update_module` with `payload.settings.banners_enabled` (0/1), `payload.settings.banners_interval` (integer >=1 when enabled), and `payload.banners` for desktop/mobile images. Interval 2 inserts banners after products 2 and 4, once each, including across list pagination. Omitted banners remain saved and count toward the two-banner limit. Disabling banners preserves their images. Set `payload.settings.banners_desktop_columns` to 1 (default) or 2 for all banners in the module on screens >=992 px; smaller screens keep one space. If a wide banner does not fit in the remaining grid columns, it starts on the next row and following products fill the gap. Its visible position may therefore be later than the configured product interval. Recommended artwork for 1 space: desktop/mobile 900 × 1200 px (3:4). For 2 spaces: desktop 1800 × 1200 px (3:2), mobile/tablet 900 × 1200 px. See [Banners between products](https://apidocs.istores.co.il/modules#banners-between-products). Read inline banner IDs through `get_module`/`list_modules`. Use `update_banner` to replace existing desktop/mobile images from public URLs, or `update_module` for banner fields using uploaded CDN URLs. Use `delete_banner` for explicit removal; `inspect_brand_assets` discovers the separate branding banner module. These writes affect the live store immediately. Ask the assistant to explain the specific changes and wait for approval, then inspect the affected pages in a browser on desktop and mobile. A storefront preview link shows the current state; it is not an isolated draft preview. CSS/JS snapshots do not back up design settings, layouts, modules or banners. Keep the current read responses before editing; they help restore earlier values but cannot automatically recover deleted content. Deletion tools require `confirmed: true` only after you approve the exact module or banner. Try this: ~~~text Read my current design and list my homepage modules. Show me how to display two product columns on mobile. Keep every setting and banner I did not ask to change. Wait for my approval before making this live change. ~~~ ## Troubleshooting Common connection errors | Message or symptom | What to do | |---|---| | `Token missing` / needs authentication | Complete OAuth login. An unauthenticated connection receives HTTP 401 so the client can discover the login flow. | | `Company not found` after using a settings API key | Remove the manually configured key/header and reconnect with OAuth. Use the MCP sign-in flow instead of an API settings token. | | `Company not found` after OAuth login | Authenticate again with the intended company selected. If it continues, contact support with the `request_id`. | | `Server rejected the configured Authorization header` / OAuth fallback disabled | Remove the manually configured `Authorization` header and authenticate again. | | `Invalid token` | Remove stale manual credentials and reconnect through OAuth. | | `Token expired` | Let the client refresh the token, or sign in again if refresh fails. | | `Invalid token audience` | Use the exact MCP URL above and obtain a token through this MCP connection. A token for another resource cannot be reused. | | HTTP 402 / `Payment owe detected` | Resolve the company's outstanding payment in the dashboard. | | HTTP 429 | Wait before retrying and reduce the frequency of requests. | | OAuth `invalid_grant` | Restart authentication. The authorization code may be expired/used, the refresh token unavailable, or the callback/PKCE values mismatched. | | OAuth `invalid_client` / `OAuth client is not registered` | Reconnect using automatic client identification or registration. If it repeats, contact support with the client name, version and attempt time; an incompatible client metadata document can also cause this error. | | OAuth `invalid_request` / `Redirect URI does not match registered client` | Use the callback generated by your MCP client. Temporary ports are supported for registered HTTP loopback callbacks; the rest of the callback must match. External callbacks must match exactly. Contact support if an unchanged client-generated callback is rejected. | | Storefront inspection blocked | Use the returned storefront URL in a browser. Bot protection can block server-side inspection; provide a screenshot or relevant HTML if needed. | When contacting support, include your client name, the MCP URL, the error, and `request_id` when present. Do not send access tokens, refresh tokens, API keys, or complete authorization callback URLs. ## OAuth Flow for Developers MCP clients handle these steps automatically; merchants do not need to create a client ID or exchange tokens manually. Discovery and token endpoints | Step | Endpoint / behavior | |---|---| | Discover the protected resource | `GET https://api.istores.co.il/.well-known/oauth-protected-resource/mcp` | | Discover authorization endpoints | `GET https://api.istores.co.il/.well-known/oauth-authorization-server` | | Register a client when needed | `POST https://api.istores.co.il/mcp/oauth/register` | | Request authorization | `GET https://api.istores.co.il/mcp/oauth/authorize`; redirects to the dashboard for login and consent | | Exchange the authorization code | `POST https://api.istores.co.il/mcp/oauth/token` with `grant_type=authorization_code`, `client_id`, `redirect_uri`, `code`, and `code_verifier` | | Call MCP | The client sends the issued access token as `Authorization: Bearer ` to `/mcp` | | Refresh access | The token endpoint accepts `grant_type=refresh_token`, `client_id`, and `refresh_token` | The flow uses Authorization Code with PKCE (`S256`). Authorization codes are single-use and valid for five minutes. Default access token lifetime is one hour; default refresh token lifetime is 90 days. Use the token response's expiry fields rather than hard-coding these defaults. Request only the scopes your workflow needs. Catalog tools use `products:read`, `products:create`, `products:update` and `products:delete` for products, categories and options. Custom CSS/JS and snapshots use `themes:read` or `themes:update`; editable theme files use `themes:files:read` or `themes:files:update`. Media uploads and logo updates require `themes:assets`; banner updates require `modules:update`. AI generation requires `themes:generate`, plus `themes:assets` to apply a logo or `modules:update` to apply a banner. Store inspection, AI prompt/result reads and budget inspection use `themes:read`. Missing scope errors require reconnecting with the needed permissions; a read-only grant cannot authorize these writes. Client identification supports both HTTPS Client ID Metadata Documents (CIMD) and dynamic client registration (DCR). Discover the current server capabilities instead of hard-coding a client ID. For CIMD, the client must support public-client authentication (`none`); when a document provides `token_endpoint_auth_methods_supported`, iStores uses that list rather than requiring its legacy singular preference to be `none`. A client offering only `private_key_jwt` is not supported. Authorization requests include `response_type=code`, `client_id`, `redirect_uri`, `code_challenge`, `code_challenge_method=S256`, and the MCP `resource`; use `state` to correlate the browser callback and `scope` to request the permissions needed. Keep the same exact `redirect_uri`, including its temporary port, when exchanging the authorization code. The user completes login and consent in their browser; assistants should not request their iStores password in chat. Use the MCP resource URL `https://api.istores.co.il/mcp` as the OAuth `resource`. Sign in with the store you want the assistant to access. ## Saved custom CSS/JS versions Use `list_theme_versions` with `kind: "css"` or `kind: "js"` to get up to 30 saved versions, newest first. Entries contain only `date`, `version` and `version_id`; no code is included. Empty history returns an empty list in the response envelope. Version history tools Pass a returned `version_id` with the same `kind` to `read_theme` to read that version's content. Omitting `version_id` preserves the existing current-code read. The response keeps `kind`, `code` and `bytes`. These tools only read; they do not activate, save or roll back a version. A supplied ID must be a positive integer belonging to this store and code type. See [Saved CSS/JS versions](https://apidocs.istores.co.il/design#saved-cssjs-versions) for examples, API equivalents and the difference between editor history and MCP snapshots. Use IDs returned for your connected store. Source: https://apidocs.istores.co.il/mcp --- # Modules and banners Create and manage the content blocks in your storefront layouts, header and footer. For general appearance, mobile options and page settings, start with [Store design](https://apidocs.istores.co.il/design). Changes take effect on the live store immediately. Read the existing module first and send only the fields you want to change. Check the result in a browser on desktop and mobile. ## Authentication and endpoints Use `https://api.istores.co.il` with your API bearer token and the `themesModules` permission. Send `Content-Type: application/json` for JSON writes. See [Authentication](https://apidocs.istores.co.il/authentication). | Operation | Endpoint | |---|---| | List | `GET /modules` | | Read | `GET /modules/{layout_module_id}` | | Create | `POST /modules` | | Update | `PUT` or `PATCH /modules/{layout_module_id}` | | Delete | `DELETE /modules/{layout_module_id}` | | Reorder or move | `POST /modules/order_change` | | Delete a banner | `DELETE /modules/{layout_module_id}/banners/{banner_image_id}` | ## List and read Optional query parameters: `layout_id` (integer, 0 or greater), `position` (content_top, content_bottom, header, footer), `page` (1 or greater, default 1), and `limit` (1–100, default 10). Omit layout_id to include all layouts; use 0 for global modules. Results sort by sort_order, then layout_module_id. Query parameters and response fields Example: `GET /modules?layout_id=0&position=header&page=1&limit=10`. List responses contain `success`, `response` (module array), `results`, `pages`, `page`, `per_page`, and `request_id`. An empty list is successful with response=[], results=0 and pages=0. Single reads put one module in response. Both include raw settings and banners with their description rows; banner read data is not the banner write payload. ## Create and update On creation, supply the required fields below. On update, send only the fields to change. The API loads the saved module and preserves omitted fields, nested settings and translations. The URL identifies the module; no body layout_module_id is needed. Both PUT and PATCH accept partial updates. Request fields and example payload Settings objects are merged by key. A supplied settings list, such as `questions` or `related_ids`, replaces that entire list. Leaving a list out keeps it. Do not send null or an empty value to mean “leave unchanged”; omit the field instead. For example, hide a module with `PATCH /modules/{layout_module_id}`: ~~~json { "settings": { "status": 0 } } ~~~ Its other settings and banners stay saved. The Required column below applies to creation. On update, these values can be omitted to retain their saved values. | Field | Required | Meaning | |---|---|---| | layout_id | Yes | 0 for global modules, or an existing layout ID owned by this store | | code | Yes | Module type allowed in that layout or global position | | component | Yes | layout for a positive layout_id; header/footer matching position for layout_id=0 | | position | Yes | content_top/content_bottom for layouts; header/footer for global modules | | sort_order | Yes | Integer, 0 or greater | | settings | Yes | Object containing status and module-specific fields | | settings.status | Yes | 0 or 1 | | settings.name | No | Display name; use this instead of the top-level name field | | settings.title | No | Text keyed by numeric language ID | | settings.related_ids | No | Related page IDs for layout modules | | banners | No | Image collection for code=banners, product_list or product_slide; see below | Create a header message: ~~~json { "layout_id": 0, "code": "custom_content", "component": "header", "position": "header", "sort_order": 1, "settings": { "status": 1, "text": { "1": "Welcome to our store" } } } ~~~ Language ID 1 is illustrative. Replace it with an accepted language ID. A layout text module uses code=short_content, component=layout, position=content_top (or content_bottom), and a positive layout_id belonging to the store. Creation returns HTTP 200 with `{ "success": true, "response": { "id": 123 }, "request_id": "..." }`. Update and delete return HTTP 200 with a message under response. Use the returned ID for subsequent reads, updates, or deletion. ## Module types and settings Header allows custom_content and announce. Footer also allows footer_widget. Layouts allow homefeaturedcategory, banners, category_slide, product_slide, embed, info_slider, brands, faq, custom_code, and short_content. product_list is allowed on the home layout (common/home) only. Layout availability is validated against the store's layout route. Supported modules and settings New modules require settings.status. Unless called optional below, the listed settings are required on creation. Localized text uses objects keyed by numeric language IDs. | Code | Settings | |---|---| | short_content / custom_content | Optional text: localized string map | | announce | announces array; each supplied text value must contain nonempty text, maximum 300 characters after HTML cleanup; optional url must be a URL | | footer_widget | links array; each link requires type (1, 2, 3, or 4); optional selected array, href URL, numeric id, and localized text | | custom_code | Optional html (must pass server Twig validation); optional vars array with name and localized value | | faq | questions array; localized question values max 255 characters, answer values max 1500 | | brands | limit (1–32); optional slider_disabled (0 or 1) | | info_slider | limit (1–32), source (blog/information_ids); information_ids array when source=information_ids | | homefeaturedcategory | limit (1–100), sort (c.sort_order/c.date_added/items_order), direction (asc/desc), source (category/all), show_details_btn (0/1); categories array (max 32) when source=category | | category_slide | limit (1–55), source (all/category/categories), sort (c.sort_order/c.date_added/items_order), direction (asc/desc); category and category_name when source=category; categories array (max 32) when source=categories; optional slider_disabled | | product_slide | limit (1–32), source (products/category), sort (p.sort_order/p.date_added/p.viewed/input_order), direction (asc/desc); products array (max 32) when source=products; category and category_name when source=category; optional slider_disabled and product banner settings below | | product_list | limit (1–99999), source (products/category/all), sort (p.sort_order/p.date_added/p.viewed/items_order), direction (asc/desc), mobile_grid (1/2); products array (max 32) when source=products; category and category_name when source=category; optional product banner settings below | | embed | link URL, video_attributes object, container_attributes object; container_attributes requires position (justify-content-start/justify-content-center/justify-content-end), full_width and full_height booleans; video_attributes optionally accepts numeric width/height, string src, and 0/1 allowfullscreen/autoplay | | banners | limit (1–32), style (0/1), banner_show_title (0/1), show_details_btn (0/1), banner_content_align (left/right/center); optional integer banner_type and string transformation/transformation_mobile | ## Banners between products Both `product_list` and `product_slide` accept the same top-level `banners` array as the banner module. The API and MCP use the same settings and validation. Banner settings, sizing and examples | Setting | Meaning | |---|---| | settings.banners_enabled | Optional 0/1. Disabled for new modules when omitted. Set 0 to hide banners while keeping their saved images. | | settings.banners_interval | Integer, at least 1; required when banners_enabled=1. Counts products, not banners. | | settings.banners_desktop_columns | Optional 1/2, default 1. Applies to every banner in this module on screens 992 px and wider. Smaller screens keep one product space. | | banners | Up to 2 saved banners per product module, including existing banners omitted from a partial update. Each new banner needs desktop and mobile CDN URLs. | An interval of 2 inserts banner 1 after product 2 and banner 2 after product 4. Each banner appears once; the sequence continues across product-list pagination. The product limit still counts products only. Banners beyond the available products are not shown. Disabled banners, an empty saved banner collection, or modules without these options keep the existing product rendering. By default, each banner occupies one product space in the current theme's grid or slider. Set `settings.banners_desktop_columns` to **2** for every banner in this module to span two product spaces on screens **992 px and wider**. The same setting applies to all banners; individual banner widths cannot differ. Mobile/tablet stays one product space. If a wide banner does not fit in the remaining grid columns, it starts on the next row and following products fill the gap. Its visible position may therefore be later than the configured product interval. For **1 space**, recommend desktop/mobile **900 × 1200 px (3:4)**, transformed to **450 × 600 px**. For **2 spaces**, recommend desktop **1800 × 1200 px (3:2)**, transformed to **900 × 600 px**; mobile/tablet stays **900 × 1200 px**, transformed to **450 × 600 px**. In wide mode the mobile image is selected below 992 px; in one-space mode it is selected below 768 px. Banner height follows the product row, so keep text away from edges that may be cropped. Create a homepage product list with one banner using `POST /modules`: ~~~json { "layout_id": 12, "code": "product_list", "component": "layout", "position": "content_top", "sort_order": 1, "settings": { "status": 1, "limit": 8, "source": "all", "sort": "p.sort_order", "direction": "asc", "mobile_grid": 2, "banners_enabled": 1, "banners_interval": 2 }, "banners": [ { "banner_image_id": 0, "image": "https://cdn.istores.co.il/image/upload/clients/YOUR_COMPANY/banner-desktop.jpg", "image_mob": "https://cdn.istores.co.il/image/upload/clients/YOUR_COMPANY/banner-mobile.jpg", "link": "https://example.com/sale" } ] } ~~~ Replace layout_id with this store's home layout ID and the image URLs with real uploaded CDN URLs. `product_slide` uses the same banner fields; supply its required product/category source settings from the table above. `product_list` remains limited to the home layout. Enable or change the interval of an existing module with `PATCH /modules/{layout_module_id}`: ~~~json { "settings": { "banners_enabled": 1, "banners_interval": 2, "banners_desktop_columns": 2 } } ~~~ Omitted settings and banners remain unchanged. Existing banner fields can be edited as described below. Adding a third saved banner fails validation, even when only one new banner is supplied alongside two retained banners. Delete a banner explicitly through the API endpoint (or MCP `delete_banner`) before adding its replacement. Set `banners_enabled=0` to hide the banners without deleting them. ## Banner writes Send images in the top-level banners array. New images require banner_image_id=0, image (desktop URL), and image_mob (mobile URL). An existing banner can be edited with just its banner_image_id and changed fields. Both URLs must match the configured CDN. Optional fields are link and title (a language-ID-to-text map). Image fields and update example Use banner_image_id=0 for new images. Positive IDs must already belong to the authenticated store and the module in the URL. A new module therefore uses 0 for every image. Read responses contain description rows; convert them to the title map when writing. Omitted banners are retained. Omitting `banners` or sending `banners: []` does not delete any images. A partial banner update preserves the current image order and appends new images. To reorder all images, include every existing banner ID in the intended order. Change just one banner link with `PATCH /modules/{layout_module_id}`: ~~~json { "banners": [ { "banner_image_id": 45, "link": "https://example.com/sale" } ] } ~~~ Replace 45 with an ID from the module read response. Existing desktop/mobile images and translations stay saved. A banner ID must belong to this module and cannot appear twice. To remove one image, use `DELETE /modules/{layout_module_id}/banners/{banner_image_id}`. Deleting a banners, product_list or product_slide module removes its related banner images. These deletions affect the live store and cannot be undone through CSS/JS snapshots. ## Languages and banner effects Use numeric language IDs accepted by your store. Read the language list before sending localized text; do not copy example IDs unchanged. Language IDs and effects Banners accept optional `settings.banner_effect_type` (`fade` or `slide`). ## Reorder and move modules Use `POST /modules/order_change` to arrange modules in a layout or in the global header/footer. Read the layout's allowed module codes and positions first. Ordering payload and move behavior ~~~json { "layout_id": 12, "sorted_modules": { "content_top": [105, 103] } } ~~~ The IDs above are examples. Use IDs from your store. Listed modules are placed first in that order; unlisted modules in each supplied position follow in their existing relative order. Positions left out are unchanged. For a move from another layout, also supply `layout_module_id` and include that ID in `sorted_modules`. Use `layout_id: 0` and `header`/`footer` positions for global modules. A module may appear only once and must be allowed in its destination. Moving between layouts clears its old `settings.related_ids`; review any page-specific targeting afterwards. ## MCP tools Use `list_modules` and `get_module` to read before editing. Use `create_module`, `update_module`, `reorder_modules`, `delete_module` and `delete_banner` for changes. Module IDs use the argument `layoutModuleId`; `delete_banner` also needs `bannerImageId`. Create, update and reorder calls take a `payload` object containing the matching API body. Tool names, permissions and arguments For product lists and sliders, pass `settings.banners_enabled`, `settings.banners_interval`, `settings.banners_desktop_columns` and the top-level `banners` array inside the `payload` of `create_module` or `update_module`. The two-banner limit includes retained images. Use `get_module` or `list_modules` to obtain inline banner IDs; `inspect_brand_assets` reads the separate branding banner module. `update_banner` can replace an existing inline banner's desktop/mobile image and imports public image URLs with the `banner` tag. New inline banners use uploaded CDN URLs in `create_module`/`update_module`. Deletion tools require `confirmed: true` after approval of the exact item. Read-only tools require `modules:read`; creation requires `modules:create`, edits and ordering require `modules:update`, and deletion requires `modules:delete`. The [Store design guide](https://apidocs.istores.co.il/design) covers the other design tools. ## Errors and scope Status codes and limitations - 400: duplicate banner/module IDs or an invalid ordering request. - 401: missing, invalid, or expired authentication. - 403: missing API permission or MCP scope, or a layout not accessible to the store. - 404: the requested module does not exist in this store. - 422: invalid payload or failed creation. Validation responses include message and errors; creation failures include success=false and message. For shared header/footer settings and per-layout settings, see [Store design](https://apidocs.istores.co.il/design). There is no draft/publish step or automatic version-conflict check. Source: https://apidocs.istores.co.il/modules --- # Points and loyalty Create loyalty ranks, define reward thresholds and assign a rank to a customer through the iStores API. ## Authentication and endpoints Use your API bearer token and send `Content-Type: application/json` for writes. The Points app must be active for your store. | Operation | Endpoint | Permission | |---|---|---| | List ranks | `GET /points` | `points` | | Read a rank | `GET /points/{point_rank_id}` | `points` | | Create a rank | `POST /points` | `points` | | Edit a rank | `PUT /points/{point_rank_id}` | `points` | | Delete a rank | `DELETE /points/{point_rank_id}` | `points` | | Set a customer's rank | `PUT /customer/{customer_id}/point_rank` | `customersEdit` | ## List and read ranks The list returns up to 100 ranks on the first page. These routes do not expose `page` or `limit` query parameters. The response includes `success`, `response`, `results`, `pages`, `page`, `per_page`, and `request_id`. Each list item contains `id`, `name`, and `points`. Response fields A single-rank response includes `id`, `name`, `points`, `status`, `image`, `settings`, and a `descriptions` array under `response`. Descriptions include their numeric `language_id`. For a write, convert that array into an object keyed by language ID. ## Create and edit ranks POST and PUT require the same complete payload. PUT replaces the settings object, so read the rank first and preserve any existing settings you want to retain. Fields and example payload | Field | Required | Meaning | |---|---|---| | descriptions | Yes | Object keyed by accepted numeric language IDs | | descriptions.*.name | Yes | Rank name | | descriptions.*.description | No | Description string or null | | status | Yes | 0 or 1 | | points | Yes | Numeric reward threshold, 0 or greater | | image | Yes | Image URL matching the configured CDN pattern | | settings | Yes | Complete settings object | | settings.min_usage | No | Minimum spendable points balance, 0 or greater; defaults to 0 | | settings.reward_rates | No | Reward percentages keyed by numeric customer-group IDs | | settings.replace_logo | No | Email logo replacement preference, 0 or 1; defaults to 0 | Example payload: ~~~json { "descriptions": { "1": { "name": "Gold", "description": "" } }, "status": 1, "points": 1000, "image": "https://res.cloudinary.com/YOUR_CLOUD/image/upload/YOUR_IMAGE.png", "settings": { "min_usage": 0, "reward_rates": { "1": 5 }, "replace_logo": 0 } } ~~~ Language ID, customer-group ID, and image URL are illustrative. Use accepted IDs and an image from the store's configured CDN. The existing default rank remains at a zero threshold and cannot be deleted. Create, edit, and delete return HTTP 200 with `{ "success": true, "response": { "id": 123 }, "request_id": "..." }`. ## Set a customer's rank Enable the points system in your store settings before assigning customer ranks. Pass an enabled rank belonging to the same store: Example request and reward behavior ~~~json { "point_rank_id": 123 } ~~~ The current rank is the highest enabled rank whose `points` threshold is no greater than the customer's non-expired reward total. A total of 0 is valid. Selection does not depend on reward rates or customer groups. Changing the rank adds a reward adjustment equal to the selected threshold minus the current reward total. The customer's spendable points balance stays unchanged. Saving the currently matching rank adds no reward adjustment. A successful change returns HTTP 200 with a message under `response`: ~~~json { "success": true, "response": { "message": "Customer 42 point rank updated successfully" }, "request_id": "..." } ~~~ ## Errors An inactive points app blocks every route with HTTP 404. Missing API permissions return 403. Invalid write payloads, a customer or enabled rank outside the authenticated store, deletion of the default rank, and customer rank changes while the points system is disabled return 422. Status codes and next steps An empty rank list and a missing rank on a read return 404. Updating or deleting a missing rank returns 422. Existing authentication and rate limits apply. Source: https://apidocs.istores.co.il/points