Skip to content
This page is not yet translated. Showing English content.

Product Catalog ​

Products of the default (primary) shop; all endpoints are read-only except shop/save. Prices prefer the shared rule engine / variant result and fall back to sale_price when missing (raw price columns are only a fallback). Managing a partner's own shop products is covered in Shops and Cart Drafts.

Authentication and Conventions ​

Every /channel/api/v1/* endpoint is guarded by ChannelPartnerAuthMiddleware: send either request-token or Authorization: Bearer <token> (user session token or developer secret).

HeaderRequiredDescription
request-tokenone of twoChannel partner app token
Authorizationone of twoBearer <token>, user session token or developer secret
Content-Typeyesapplication/json

Required capability: none. product/* paths are not in the capability map, so a valid channel partner identity is enough (see app/channel/middleware/ChannelPartnerAuthMiddleware.php:39-46).

Common error codes:

codeMeaning
909Missing/invalid token, or not a channel partner
400Parameter or business validation failure
404Resource not found or outside the partner scope
500Server error

Pagination: page is 1-based; pageSize defaults to 20 and is capped at 100 (min(100, max(1, pageSize))).

Product List ​

POST/channel/api/v1/product/list

Auth: request-token (channel_partner)

Return a paginated product list of the default (primary) shop. Only in_stock = 1 products and variants are returned, ordered by variant ID descending. Each row is a variant: id / variant_id are the variant ID and item_id is the product ID.

Required capability: none

Request Body ​

FieldTypeRequiredDescription
pageintegernoPage number, 1-based. Default 1
pageSizeintegernoPage size, max 100. Default 20
keywordstringnoFuzzy search on variant shop_sku / sku / ean and product title / mpn

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "data": [
      {
        "id": 4001,
        "variant_id": 4001,
        "item_id": 501,
        "sku": "E2C-BAT-100",
        "name": "10 kWh Battery Module",
        "mpn": "BAT-10K",
        "item_type": "Battery",
        "catalog": "12",
        "price": 1299.00,
        "cover": "https://cdn.example.com/items/501/1.jpg",
        "variant_options": [{ "key": "capacity", "value": "10kWh" }],
        "weight": 48.5,
        "weight_unit": "kg",
        "length": 60,
        "width": 40,
        "height": 25,
        "length_unit": "cm",
        "stock_status": "in_stock",
        "vip_price_rule": "Partner Tier A"
      }
    ],
    "total": 1,
    "per_page": 20,
    "current_page": 1
  }
}
FieldTypeDescription
data[].id / data[].variant_idintegerVariant ID (both identical)
data[].item_idintegerProduct (t_item) ID
data[].skustringVariant sku, falling back to shop_sku
data[].namestringProduct title
data[].mpnstringProduct MPN
data[].item_typestringProduct type name
data[].catalogstringCatalog ID as a string
data[].pricenumberRule-engine final price, 2 decimals; falls back to variant sale_price when the engine returns no row for the variant
data[].coverstringFirst product image URL
data[].variant_optionsarrayParsed variant standard as [{key, value}], excluding id
data[].weight / weight_unitnumber / stringVariant weight and unit
data[].length / width / height / length_unitnumber / stringVariant dimensions and unit
data[].stock_statusstringAlways in_stock (the query filters in_stock = 1, so out_of_stock is never returned)
data[].vip_price_rulestringNames of matched rules joined by +; empty when none
totalintegerNumber of rows on this page, not the match count (current implementation, see Product.php:183)
per_pageintegerRequested pageSize
current_pageintegerRequested page

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner
500Server error

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/list' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "page": 1,
  "pageSize": 20,
  "keyword": "battery"
}'

Regions ​

POST/channel/api/v1/product/regions

Auth: request-token (channel_partner)

Country/state/city cascading lookup backed by the gateway administrative district API.

Required capability: none

Request Body ​

FieldTypeRequiredDescription
typestringnocountry (default) / state / province (alias of state) / city
parentstringconditionalParent code, normally for states/cities; any non-empty value is passed through to the district API and is not guaranteed to be ignored for any type

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    { "id": 81, "name": "Germany", "code": "DE" }
  ]
}
FieldTypeDescription
idintegerAdministrative district ID
namestringName
codestringDistrict code

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner
400District API call failed (failed to fetch regions)

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/regions' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "type": "country"
}'

Countries ​

POST/channel/api/v1/product/countries

Auth: request-token (channel_partner)

Return enabled (state = 1) countries for address form dropdowns, sorted by name ascending.

Required capability: none

Request Body ​

None.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "id": 81,
      "name": "Germany",
      "iso_code": "DE",
      "country_code": "DE"
    }
  ]
}
FieldTypeDescription
idintegerCountry record ID
namestringCountry name
iso_codestring2-letter ISO code (the code column)
country_codestringCountry code, falling back to iso_code

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner
500Server error

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/countries' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json'

Delivery Options ​

POST/channel/api/v1/product/delivery-list

Auth: request-token (channel_partner)

Calculate available delivery options for a shipping address and cart. Results are grouped by delivery_standard (highest fee wins per standard); only the delivery standard is exposed, not carrier details.

Required capability: none

Request Body ​

FieldTypeRequiredDescription
cart_listarrayyesCart lines; an empty list returns an empty result
cart_list[].sku_idintegeryesVariant ID
cart_list[].quantityintegernoQuantity, default 1
cart_list[].weight / weight_unitnumber / stringnoWeight and unit, default 0 / kg
cart_list[].length / width / height / length_unitnumber / stringnoDimensions and unit, default 0 / cm
shipping_addressobject | stringyesShipping address; a JSON string is accepted
shipping_address.country_codestringyes2-letter country code used to match delivery zones
shipping_address.provincestringnoState/province
shipping_address.citystringnoCity
shipping_address.suburbsstringnoDistrict/street, falling back to address2
shipping_address.postcodestringnoPostcode, falling back to zip_code
warehouse_idintegernoTarget warehouse; <= 0 uses the system default warehouse

Note: when only the country is provided, the backend fills province / city with the country code so a delivery zone can still match. An empty cart_list returns 200 with msg = cart_list is empty and delivery_list = []; an empty shipping_address returns 400 (shipping_address is required).

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "delivery_list": [
      {
        "id": "EXW",
        "name": "EXW",
        "brief": "Ex Works",
        "description": "Pickup at the e2c warehouse",
        "shipping_fee": 0
      }
    ]
  }
}
FieldTypeDescription
delivery_list[].idstringDelivery standard name (current implementation: same as name, not a numeric ID)
delivery_list[].namestringDelivery standard name
delivery_list[].briefstringShort label
delivery_list[].descriptionstringDescription
delivery_list[].shipping_feenumberFreight (scale_freight_money + extra fees), 2 decimals; highest value per standard

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner
400Missing shipping_address (shipping_address is required)

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/delivery-list' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "cart_list": [
    {
      "sku_id": 4001,
      "quantity": 1,
      "weight": 48.5,
      "weight_unit": "kg",
      "length": 60,
      "width": 40,
      "height": 25,
      "length_unit": "cm"
    }
  ],
  "shipping_address": {
    "country_code": "DE",
    "province": "Hamburg",
    "city": "Hamburg",
    "postcode": "20457"
  }
}'

Tax Preview ​

POST/channel/api/v1/product/calculate-tax

Auth: request-token (channel_partner)

Preview tax for a shipping address and cart. Send an existing address_id or inline address fields; inline addresses are first resolved/created and fall back to the raw payload when that fails.

Required capability: none

Request Body ​

FieldTypeRequiredDescription
cart_listarrayyesCart lines; an empty list returns taxAmount = 0
cart_list[].sku_idintegeryesVariant ID
cart_list[].pricenumberyesUnit price
cart_list[].quantityintegernoQuantity, default 1
shipping_addressobject | stringyesShipping address; a JSON string is accepted
shipping_address.address_idintegernoExisting address ID, preferred when present
shipping_address.full_namestringnoRecipient
shipping_address.country_codestringno2-letter country code
shipping_address.province / citystringnoState/city
shipping_address.address1 / address2stringnoAddress lines
shipping_address.postcodestringnoPostcode
shipping_address.tel / email / companystringnoPhone / email / company

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "taxAmount": 246.81,
    "taxList": [
      { "sku_id": 4001, "tax_amount": 246.81, "tax_rate": 19 }
    ]
  }
}
FieldTypeDescription
taxAmountnumberTotal tax, 2 decimals
taxList[].sku_idintegerVariant ID
taxList[].tax_amountnumberLine tax
taxList[].tax_ratenumberTax rate as a percentage

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner

Note: empty cart_list or shipping_address returns 200 with msg = empty input; exceptions thrown by getBossTax are caught and return 200 with taxAmount = 0 and msg = tax calculation failed: ... (no business error code). Any other uncaught exception returns 500.

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/calculate-tax' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "cart_list": [
    {
      "sku_id": 4001,
      "price": 1299,
      "quantity": 1
    }
  ],
  "shipping_address": {
    "full_name": "Anna Schmidt",
    "country_code": "DE",
    "province": "Hamburg",
    "city": "Hamburg",
    "address1": "Hafenstrasse 1",
    "postcode": "20457"
  }
}'

Product Detail ​

POST/channel/api/v1/product/detail

Auth: request-token (channel_partner)

Return one product of the default (primary) shop. id is the product (t_item) ID; the price comes from the rule-engine result of the first variant (lowest ID).

Required capability: none

Request Body ​

FieldTypeRequiredDescription
idintegeryesProduct (t_item) ID

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": 501,
    "sku": "E2C-BAT-100",
    "name": "10 kWh Battery Module",
    "mpn": "BAT-10K",
    "item_type": "Battery",
    "catalog": "12",
    "attribute": { "capacity": "10kWh" },
    "price": 1299.00,
    "stock_status": "in_stock",
    "vip_price_rule": "Partner Tier A",
    "cover": "https://cdn.example.com/items/501/1.jpg",
    "description": "Modular LFP battery module",
    "sale_price": 1299.00,
    "weight": 48.5,
    "weight_unit": "kg",
    "images": { "id": ["https://cdn.example.com/items/501/1.jpg"] },
    "primary_image_key": "id",
    "variant": {
      "shop_sku": "E2C-BAT-100",
      "standard": { "capacity": "10kWh" },
      "sale_price": 1299.00,
      "weight": 48.5,
      "weight_unit": "kg"
    }
  }
}
FieldTypeDescription
idintegerProduct ID
skustringProduct shop_sku
name / descriptionstringTitle / description
mpn / item_type / catalogstringMPN / type name / catalog ID
attributeobject | nullProduct attribute JSON
price / sale_pricenumber | nullRule-engine final price; null when there is no variant or the rule engine returns no result (an uncaught exception returns 500)
stock_statusstringin_stock / out_of_stock
vip_price_rulestringMatched rule names, empty when none
coverstringFirst image URL
weight / weight_unitnumber / stringVariant weight preferred, then item weight; unit falls back to kg
imagesobjectNormalized image map {optionValue: [url, ...]}; a flat array is wrapped under id
primary_image_keystringPrimary image key, falling back to id
variant.shop_skustringVariant shop_sku, falling back to product shop_sku
variant.standardobjectVariant options, falling back to {"id": shop_sku}
variant.sale_price / weight / weight_unitnumber / stringSame snapshot values as the top level

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner
400Missing or non-positive id (id is required)
404Product missing, not in the primary shop, or out of stock (product not found)

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/detail' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": 501
}'

Save Shop Product ​

POST/channel/api/v1/product/shop/save

Auth: request-token (channel_partner)

Edit a product in the partner's own shop. Only rows whose shop_id is bound to the current partner and that are not the primary shop may be updated; the primary shop is the master catalog and is never editable here.

Required capability: none

Request Body ​

FieldTypeRequiredDescription
idintegeryesProduct (t_item) ID
dataobjectyesFields to update; only the keys below take effect
data.titlestringnoTitle
data.descriptionstringnoDescription
data.imagesobject | arraynoImage map
data.weight / weight_unitnumber / stringnoWeight and unit
data.length / width / height / length_unitnumber / stringnoDimensions and unit
data.mpn / eanstringnoMPN / EAN
data.highlightsstring | arraynoHighlights
data.videostringnoVideo URL

Note: prices and cost are platform fields and cannot be edited; keys outside the allowlist are silently ignored; if none of the allowlisted keys is present the request returns 400.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": null
}

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner
400Missing id / data (id and data are required), or no editable field (no editable field provided)
404Product missing, outside the partner shop scope, or belonging to the primary shop (product not found or not in your shop scope)

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/shop/save' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": 1501,
  "data": {
    "title": "10 kWh Battery Module (Partner)",
    "weight": 49,
    "weight_unit": "kg"
  }
}'

Product Image Pack ​

POST/channel/api/v1/product/images/zip

Auth: request-token (channel_partner)

Pack images of primary-shop products into a zip. Only primary-shop products with in_stock = 1 are in scope (same as the product list). The pack is uploaded as a 24-hour transient object and its URL is returned; when the upload fails the zip is streamed back as application/zip.

Required capability: none

Request Body ​

FieldTypeRequiredDescription
item_idsarrayyesProduct (t_item) IDs; 1–50 after deduplication; non-numeric or non-positive values are ignored

Note: each pack has a 200MB total download budget; duplicate URLs are packed once; archive entries are named {shop_sku}/{optionKey}_{seq}.{ext}, with the folder falling back to item-{id} when shop_sku is empty. Products that cannot be packed do not fail the request and are reported in skipped[].

Response ​

json
{
  "code": 200,
  "msg": "images zip succeed",
  "data": {
    "url": "https://cdn.example.com/tmp/product-image-zip/20261111/abc.zip",
    "file_count": 12,
    "skipped": [
      { "item_id": 502, "reason": "product has no image to download" }
    ]
  }
}
FieldTypeDescription
urlstringTransient zip URL, valid for 24 hours
file_countintegerNumber of images packed
skipped[].item_idintegerProduct ID that was not packed
skipped[].reasonstringproduct not found in the master catalog / product has no image to download / image pack size limit reached / image download failed

Error Codes ​

codeMeaning
909Missing/invalid token, or not a channel partner
400Empty item_ids or more than 50 (item_ids must be an array of at most 50 unique ids); temp dir or zip creation failed; or the zip was lost after cleanup (ZIP file lost after cleanup)
404No downloadable images in scope (no attachable product images found / no product image could be downloaded)

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/product/images/zip' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "item_ids": [
    501,
    502
  ]
}'