Product Management API

This API allows merchants to manage products within the platform. Supported actions include listing, retrieving, creating, updating, and deleting products.

URL:

https://api.tec.delivery/common/merchant/1.0/

Authentication

All requests must include a valid token parameter in the query string or JSON body, identifying the authenticated merchant session.

Token Access:
You can obtain or refresh the API token by navigating to
Merchant → Select a Merchant → Settings → Token field
in the admin panel.

Field Reference

Field Type Description
merchant_id integer Associated merchant ID
name object Product name
description object Description
image string Product image URL
addons array Product add-on options
parent_id integer ID of parent product/category
unset_parent boolean
Do not apply the parent_id value if the product already exists. Can be used to update data without changing the tree structure.
Default: false
price float Base price of the product
discount_type integer 1 = fixed, 2 = percentage, default: 1
discount float Discount value, default: 0
enable boolean Availability status, default: true
sort_order integer Display order
created_at string Creation timestamp
updated_at string Last update timestamp
weight integer Product weight
energy integer Energy in kcal
preparation_time integer Time in seconds
homepage_show boolean Show on homepage
homepage_image string Image for homepage card
homepage_size integer Display size category
homepage_colors array UI color palette for display
alcohol_warning boolean Show alcohol warning, default: false
store_balance integer Available quantity, default: 1
external_id string External system reference ID
external_key string External system reference Key
product_id integer Unique product ID, default: 0

Response Structure

{
  "auth": {
    "status": "OK",
    "merchant": {
      "id": "423",
      "name": {
        "EN": "Cafe Lebowski",
        "IL": "קפה לבובסקי",
        "ES": "Cafe Lebowski",
      },
      "company": "228"
    },
    "languages": [
      {"code": "EN", "name": "English"},
      {"code": "IL", "name": "עברית"},
      {"code": "ES", "name": "Español"},
    ]
  },
  "payload": {
    "status": "OK",
    "error": "",
    "request_id": 13,
    "data": [...]
  }
}

1. Get All Products

Returns a flat list of all products for a merchant.

Request

Methods: GET / POST
URL: https://api.tec.delivery/common/merchant/1.0/?api=product&method=get-all&token={token}&limit={limit}&offset={offset}

Required Query Parameters

Name Type Description Required
api string product Yes
method string get-all Yes
token string Authentication token Yes
limit integer Max number of products (default: 20) No
offset integer Offset for pagination (default: 0) No

Response

Returns product list with metadata and language-specific fields.

2. Get All Product Trees

Returns hierarchical structure of products including children.

Request

Method: GET / POST
URL: https://api.tec.delivery/common/merchant/1.0/?api=product&method=get-all-tree&token={token}

Required Query Parameters

Name Type Description Required
api string product Yes
method string get-all-tree Yes
token string Authentication token Yes

3. Get Product Groups

Retrieves product groups based on parent-child relationships.

Request

Method: GET / POST
URL: https://api.tec.delivery/common/merchant/1.0/?api=product&method=get-groups&token={token}

Query Parameters

Name Type Description Required
api string product Yes
method string get-groups Yes
token string Authentication token Yes

4. Get Product Details

Returns detailed information for a specific product.

Request

Method: GET / POST
URL: https://api.tec.delivery/common/merchant/1.0/?api=product&method=get-product&token={token}&product_id={product_id}

Query Parameters

Name Type Description Required
api string product Yes
method string get-product Yes
token string Authentication token Yes
product_id integer Product ID Yes

5. Create / Update Products

Creates or updates product data.

https://api.tec.delivery/common/merchant/1.0/

Note: The request body must be sent as raw JSON (Content-Type: application/json).

Query Parameters

Name Type Description Required
api string product Yes
method string get-product Yes
token string Authentication token Yes
payload array Products data Yes
language string Language code No
translate boolean Translate automatically No
webhook string Webhook URL Notifications No

Payload Example

{
    "api": "product",
    "method": "put-products",
    "token": "...",
    "language": "EN",
    "translate": true,
    "webhook": "https://webhook.site/4082430c-24eb-4df8-9903-d895fa668b5f",
    "payload": [...]
}

If the request includes product_id or external_id of an existing product, the record will be updated. If such an entity does not exist, a new one will be created automatically.

There are two ways to create product hierarchies (trees):

  1. Using child nesting:
    This allows you to define nested products within a parent directly:
    "payload": [
        {
            "name": "New Category",
            "external_id": "ext_id_cat_1",
            "description": {"EN": "Category Description"},
            "image": "https://...",
            "child": [
                {
                    "name": "Product 1",
                    "external_id": "ext_id_prod_1",
                    "description": {"EN": "Description for Product 1"},
                    "image": "https://..."
                },
                {
                    "name": "Product 2",
                    "external_id": "ext_id_prod_2",
                    "description": {"EN": "Description for Product 2"},
                    "image": "https://..."
                }
            ]
        }
    ]
  2. By specifying parent_id:
    This method allows you to add a product under an already existing parent category:
    {
        "name": "Child Product",
        "external_id": "ext_id_new_child",
        "parent_id": 12345
    }

Language and Translation

The language parameter specifies the base language of the submitted content. If translate is set to true, the system will automatically translate the base content into all other languages configured for the merchant's company.

You can provide the content either as a plain string or as a language-specific object:

  • "name": "Some text"
  • "name": { "EN": "Some text" }

When partial translations are provided, only missing languages will be auto-translated. For example, if the company supports EN, ES, and IL and you send:

{
  "name": {
    "EN": "Some text",
    "ES": "Un poco de texto"
  }
}

Then only the missing IL translation will be generated automatically.

Webhook Notifications

The webhook field allows you to specify a callback URL that will receive a POST request when:

  • Uploaded images (e.g. image, homepage_image) are processed and ready;
  • Automatic translations (triggered via translate: true) are completed.

This is useful for keeping your client application updated when asynchronous processing is involved.

Webhook Payload

Once the image processing and translation tasks are completed, the system sends a POST request to the provided webhook URL with the following payload:

{
  "request_id": "13",
  "status": "OK"
}
  • request_id — corresponds to the payload.request_id returned from the put-products API call
  • status — either OK (success) or ERROR (failure during processing)

Important Notes on Image URLs

Fields image and homepage_image must contain valid publicly accessible URLs pointing to actual image files. These URLs are used to download and process the images on the server side.

6. Delete Specific Products

https://api.tec.delivery/common/merchant/1.0/

Note: The request body must be sent as raw JSON (Content-Type: application/json).

Query Parameters

Name Type Description Required
api string product Yes
method string delete-products Yes
token string Authentication token Yes
payload array ID(s) Yes

Deletes one or more products by product ID.

Payload Example

{
    "api": "product",
    "method": "delete-products",
    "token": "...",
    "use_external_id": true,
    "payload": [12345, 54321]
}

Deletes one or more products by external ID.

Payload Example

{
    "api": "product",
    "method": "delete-products",
    "token": "...",
    "use_external_id": true,
    "payload": ["external_id_1"]
}

7. Delete All Products

Deletes all products for a merchant.

URL

https://api.tec.delivery/common/merchant/1.0/?api=product&method=delete-all&token={token}

Query Parameters

Name Type Description Required
api string product Yes
method string delete-all Yes
token string Authentication token Yes

Warning: This action will remove all products associated with the merchant. Please ensure data is backed up before proceeding.