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).
| Header | Required | Description |
|---|---|---|
request-token | one of two | Channel partner app token |
Authorization | one of two | Bearer <token>, user session token or developer secret |
Content-Type | yes | application/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:
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 400 | Parameter or business validation failure |
| 404 | Resource not found or outside the partner scope |
| 500 | Server error |
Pagination: page is 1-based; pageSize defaults to 20 and is capped at 100 (min(100, max(1, pageSize))).
Product List
/channel/api/v1/product/listAuth: 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
| Field | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number, 1-based. Default 1 |
pageSize | integer | no | Page size, max 100. Default 20 |
keyword | string | no | Fuzzy search on variant shop_sku / sku / ean and product title / mpn |
Response
{
"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
}
}| Field | Type | Description |
|---|---|---|
data[].id / data[].variant_id | integer | Variant ID (both identical) |
data[].item_id | integer | Product (t_item) ID |
data[].sku | string | Variant sku, falling back to shop_sku |
data[].name | string | Product title |
data[].mpn | string | Product MPN |
data[].item_type | string | Product type name |
data[].catalog | string | Catalog ID as a string |
data[].price | number | Rule-engine final price, 2 decimals; falls back to variant sale_price when the engine returns no row for the variant |
data[].cover | string | First product image URL |
data[].variant_options | array | Parsed variant standard as [{key, value}], excluding id |
data[].weight / weight_unit | number / string | Variant weight and unit |
data[].length / width / height / length_unit | number / string | Variant dimensions and unit |
data[].stock_status | string | Always in_stock (the query filters in_stock = 1, so out_of_stock is never returned) |
data[].vip_price_rule | string | Names of matched rules joined by +; empty when none |
total | integer | Number of rows on this page, not the match count (current implementation, see Product.php:183) |
per_page | integer | Requested pageSize |
current_page | integer | Requested page |
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 500 | Server error |
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
/channel/api/v1/product/regionsAuth: request-token (channel_partner)
Country/state/city cascading lookup backed by the gateway administrative district API.
Required capability: none
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
type | string | no | country (default) / state / province (alias of state) / city |
parent | string | conditional | Parent 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
{
"code": 200,
"msg": "success",
"data": [
{ "id": 81, "name": "Germany", "code": "DE" }
]
}| Field | Type | Description |
|---|---|---|
id | integer | Administrative district ID |
name | string | Name |
code | string | District code |
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 400 | District API call failed (failed to fetch regions) |
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
/channel/api/v1/product/countriesAuth: request-token (channel_partner)
Return enabled (state = 1) countries for address form dropdowns, sorted by name ascending.
Required capability: none
Request Body
None.
Response
{
"code": 200,
"msg": "success",
"data": [
{
"id": 81,
"name": "Germany",
"iso_code": "DE",
"country_code": "DE"
}
]
}| Field | Type | Description |
|---|---|---|
id | integer | Country record ID |
name | string | Country name |
iso_code | string | 2-letter ISO code (the code column) |
country_code | string | Country code, falling back to iso_code |
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 500 | Server error |
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
/channel/api/v1/product/delivery-listAuth: 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
| Field | Type | Required | Description |
|---|---|---|---|
cart_list | array | yes | Cart lines; an empty list returns an empty result |
cart_list[].sku_id | integer | yes | Variant ID |
cart_list[].quantity | integer | no | Quantity, default 1 |
cart_list[].weight / weight_unit | number / string | no | Weight and unit, default 0 / kg |
cart_list[].length / width / height / length_unit | number / string | no | Dimensions and unit, default 0 / cm |
shipping_address | object | string | yes | Shipping address; a JSON string is accepted |
shipping_address.country_code | string | yes | 2-letter country code used to match delivery zones |
shipping_address.province | string | no | State/province |
shipping_address.city | string | no | City |
shipping_address.suburbs | string | no | District/street, falling back to address2 |
shipping_address.postcode | string | no | Postcode, falling back to zip_code |
warehouse_id | integer | no | Target 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
{
"code": 200,
"msg": "success",
"data": {
"delivery_list": [
{
"id": "EXW",
"name": "EXW",
"brief": "Ex Works",
"description": "Pickup at the e2c warehouse",
"shipping_fee": 0
}
]
}
}| Field | Type | Description |
|---|---|---|
delivery_list[].id | string | Delivery standard name (current implementation: same as name, not a numeric ID) |
delivery_list[].name | string | Delivery standard name |
delivery_list[].brief | string | Short label |
delivery_list[].description | string | Description |
delivery_list[].shipping_fee | number | Freight (scale_freight_money + extra fees), 2 decimals; highest value per standard |
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 400 | Missing shipping_address (shipping_address is required) |
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
/channel/api/v1/product/calculate-taxAuth: 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
| Field | Type | Required | Description |
|---|---|---|---|
cart_list | array | yes | Cart lines; an empty list returns taxAmount = 0 |
cart_list[].sku_id | integer | yes | Variant ID |
cart_list[].price | number | yes | Unit price |
cart_list[].quantity | integer | no | Quantity, default 1 |
shipping_address | object | string | yes | Shipping address; a JSON string is accepted |
shipping_address.address_id | integer | no | Existing address ID, preferred when present |
shipping_address.full_name | string | no | Recipient |
shipping_address.country_code | string | no | 2-letter country code |
shipping_address.province / city | string | no | State/city |
shipping_address.address1 / address2 | string | no | Address lines |
shipping_address.postcode | string | no | Postcode |
shipping_address.tel / email / company | string | no | Phone / email / company |
Response
{
"code": 200,
"msg": "success",
"data": {
"taxAmount": 246.81,
"taxList": [
{ "sku_id": 4001, "tax_amount": 246.81, "tax_rate": 19 }
]
}
}| Field | Type | Description |
|---|---|---|
taxAmount | number | Total tax, 2 decimals |
taxList[].sku_id | integer | Variant ID |
taxList[].tax_amount | number | Line tax |
taxList[].tax_rate | number | Tax rate as a percentage |
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/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 -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
/channel/api/v1/product/detailAuth: 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
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | yes | Product (t_item) ID |
Response
{
"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"
}
}
}| Field | Type | Description |
|---|---|---|
id | integer | Product ID |
sku | string | Product shop_sku |
name / description | string | Title / description |
mpn / item_type / catalog | string | MPN / type name / catalog ID |
attribute | object | null | Product attribute JSON |
price / sale_price | number | null | Rule-engine final price; null when there is no variant or the rule engine returns no result (an uncaught exception returns 500) |
stock_status | string | in_stock / out_of_stock |
vip_price_rule | string | Matched rule names, empty when none |
cover | string | First image URL |
weight / weight_unit | number / string | Variant weight preferred, then item weight; unit falls back to kg |
images | object | Normalized image map {optionValue: [url, ...]}; a flat array is wrapped under id |
primary_image_key | string | Primary image key, falling back to id |
variant.shop_sku | string | Variant shop_sku, falling back to product shop_sku |
variant.standard | object | Variant options, falling back to {"id": shop_sku} |
variant.sale_price / weight / weight_unit | number / string | Same snapshot values as the top level |
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 400 | Missing or non-positive id (id is required) |
| 404 | Product missing, not in the primary shop, or out of stock (product not found) |
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
/channel/api/v1/product/shop/saveAuth: 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
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | yes | Product (t_item) ID |
data | object | yes | Fields to update; only the keys below take effect |
data.title | string | no | Title |
data.description | string | no | Description |
data.images | object | array | no | Image map |
data.weight / weight_unit | number / string | no | Weight and unit |
data.length / width / height / length_unit | number / string | no | Dimensions and unit |
data.mpn / ean | string | no | MPN / EAN |
data.highlights | string | array | no | Highlights |
data.video | string | no | Video 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
{
"code": 200,
"msg": "success",
"data": null
}Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 400 | Missing id / data (id and data are required), or no editable field (no editable field provided) |
| 404 | Product missing, outside the partner shop scope, or belonging to the primary shop (product not found or not in your shop scope) |
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
/channel/api/v1/product/images/zipAuth: 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
| Field | Type | Required | Description |
|---|---|---|---|
item_ids | array | yes | Product (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
{
"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" }
]
}
}| Field | Type | Description |
|---|---|---|
url | string | Transient zip URL, valid for 24 hours |
file_count | integer | Number of images packed |
skipped[].item_id | integer | Product ID that was not packed |
skipped[].reason | string | product not found in the master catalog / product has no image to download / image pack size limit reached / image download failed |
Error Codes
| code | Meaning |
|---|---|
| 909 | Missing/invalid token, or not a channel partner |
| 400 | Empty 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) |
| 404 | No downloadable images in scope (no attachable product images found / no product image could be downloaded) |
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
]
}'