Skip to content

Submit Order ​

POST/channel/api/v1/order/submit

Auth: request-token (channel_partner)

Submit an order on behalf of the authenticated channel partner. shop_id is optional: when omitted (or 0) the order is placed on the platform primary shop (offline channel mode). When provided, it must belong to a shop bound to the partner; out-of-scope shops are rejected and no order is created.

On the first submission of a product / variant (identified by shop_sku), the platform creates the variant record under your shop from the fields you send here, so provide product and variant details as completely as possible. The SKU must already exist in the platform primary catalog (bound/mapped); otherwise the whole order is rejected by the unknown-SKU guard.

Prerequisites ​

Two identity preconditions are checked before submit; failing either returns 400 and creates no order:

  1. Account manager. The member must have a bound account manager (t_member.bind_manager_id); when absent the platform falls back to the shop responsible person (authorize.meta.shop_responsible_person). If both are missing the request fails with no account manager assigned, please contact admin to bind a manager first.
  2. Shop ownership. An explicit shop_id must be in the partner's bound shop set, otherwise the request fails with the shop is not bound to this channel partner.

Field boundaries ​

This endpoint has an explicit note in both directions:

  • Request boundary (what you may send). The server does not enforce a field whitelist: beyond the business fields documented here, the entire request body reaches the shared order submit service, so undocumented fields may be passed through. In particular, currency, is_preorder, deposit_amount, expected_arrival_at and id are used directly (id maps to a real order column — do not send it). Do not send platform ids (sku_id, product_id, shop_sku_id, catalog_id, order_id), order status, settlement / billing fields, or internal cost fields (cost, cost_price, employee_price). Cost and internal-margin data should never be sent from a channel partner; the backend should add a whitelist to enforce this.
  • Response boundary (what you get back). The submit response returns only code, msg, and data.order_id. It never returns internal cost, margin, settlement, staff, or catalog-internal fields. Prices you see back on any read API are limited to what the partner is allowed to see.

Behavior of undocumented fields is not guaranteed — they may be passed through or ignored. Never rely on a field that is not documented here.

Request Headers ​

HeaderRequiredDescription
request-tokenyesChannel partner app token
Content-Typeyesapplication/json

Request Body ​

FieldTypeRequiredDescription
shop_idintegernoBound shop id. Omit or send 0 to use the platform primary shop; when provided it must be bound
shop_order_nostringyesUnique order number within the shop. Together with shop_id it is the idempotency key
shipping_standardstringyesShipping standard / service code agreed with e2c-energy
payment_methodstringyesPayment method label (e.g. bank_transfer)
purchase_timestringyesPurchase datetime YYYY-MM-DD HH:mm:ss (shop local time)
billing_addressobjectyesBilling address — see Address object
shipping_addressobjectyesShipping address — see Address object
order_itemarray<object>yesOrder line items — see Order item object
order_amountarray<object>yesFee / amount lines — see Order amount object

Address object ​

Used by both billing_address and shipping_address.

FieldTypeRequiredDescription
full_namestringyesRecipient / payer full name
country_codestringyesISO 3166-1 alpha-2 country code (e.g. DE, NL, FR)
provincestringyesProvince / state / region
citystringyesCity
address1stringyesStreet address line 1
address2stringnoStreet address line 2
address3stringnoStreet address line 3
suburbsstringnoSuburb / district
postcodestringnoPostal / ZIP code
telstringnoContact phone number
emailstringnoContact email
companystringnoCompany name
tax_idstringnoTax / VAT number (recommended for B2B billing)
kvk_numberstringnoChamber of Commerce number (NL KvK), if applicable

Order item object ​

Each entry in the order_item array.

FieldTypeRequiredDescription
quantityintegeryesOrdered quantity
pricenumberyesUnit price actually charged for this line, in the order currency
shop_order_item_primary_keystringnoYour own line id, echoed back for reconciliation
itemobjectyesProduct detail — see Product object

Product object ​

The item field of each order item. On first sync (by shop_id + shop_sku) these fields create the product; on later syncs the existing product is reused.

FieldTypeRequiredDescription
titlestringyesProduct title
shop_skustringyesProduct-level SKU in your shop (product identity)
sale_pricenumberyesProduct sale price (decimal, 2 places)
weightnumberyesProduct weight (decimal, 2 places)
weight_unitstringyesWeight unit, e.g. kg (default) or g
imagesobjectyesImage groups keyed by option value — see Product images & variant options
primary_image_keystringyesThe standard option name that selects the image group — see Product images & variant options
variantobjectyesVariant detail — see Variant object
descriptionstringnoProduct description
mpnstringnoManufacturer Part Number
eanstringnoEAN / barcode
conditionstringnoItem condition, default new
pricenumbernoList price before discount
suggest_pricenumbernoSuggested retail price
lengthnumbernoLength (decimal)
widthnumbernoWidth (decimal)
heightnumbernoHeight (decimal)
length_unitstringnoLength unit, default cm
mqqintegernoMinimum order quantity, default 1
stepintegernoOrder quantity step, default 1
highlightsstringnoSelling points / highlights
videostringnoProduct video key or URL

Variant object ​

The variant field of the product object. Identity is shop_sku (variant-level).

FieldTypeRequiredDescription
shop_skustringyesVariant-level SKU in your shop (variant identity)
standardobjectyesVariant options as a key/value map — see Product images & variant options
sale_pricenumberyesVariant sale price (decimal, 2 places)
weightnumberyesVariant weight (decimal, 2 places)
weight_unitstringyesVariant weight unit, e.g. kg (default) or g
skustringnoYour internal SKU; used to match the primary catalog when present
eanstringnoEAN / barcode
pricenumbernoVariant list price before discount
suggest_pricenumbernoVariant suggested price
lengthnumbernoLength (decimal)
widthnumbernoWidth (decimal)
heightnumbernoHeight (decimal)
length_unitstringnoLength unit, default cm
unitstringnoSelling unit label
hs_codestringnoHS customs code (recommended for cross-border)
mqqintegernoMinimum order quantity, default 1
stepintegernoOrder quantity step, default 1
dgbooleannoDangerous goods flag, default false
dg_standardstringnoDangerous goods standard, if dg is true

Product images & variant options ​

standard, primary_image_key and images work together to describe variant options and map each variant to its images. They are structured JSON, not flat strings.

standard (variant object) — a key/value map of option name → option value. Keys are your option dimensions, values are that variant's choice:

json
{ "color": "black", "size": "500W" }

A product with no real options may use a single synthetic option, e.g. { "id": "3241" }.

primary_image_key (product object) — the name of the option in standard that selects the image group. It is an option name, not an image key. It is usually color (each color has its own photos) or id for single-variant products.

images (product object) — a JSON object whose keys are the possible values of the primary_image_key option, and whose values are arrays of image URLs for that option value:

json
{
  "black": ["https://cdn.example.com/pps500-black-1.jpg", "https://cdn.example.com/pps500-black-2.jpg"],
  "white": ["https://cdn.example.com/pps500-white-1.jpg"]
}

How they resolve. For a given variant, the platform reads images[ standard[primary_image_key] ] to get that variant's photos. In the example above, if primary_image_key = "color" and a variant's standard.color = "black", its images are the black array. If a variant's option value is missing from images, the first image group is used as a fallback.

Rules

  • Every distinct value of the primary_image_key option that appears across your variants should have a matching key in images.
  • Image entries must be full, publicly reachable URLs.
  • For a single-variant product, use primary_image_key: "id", set standard: { "id": "<any stable value>" }, and key images by that same value, e.g. { "<value>": ["https://.../main.jpg"] }.

Order amount object ​

Each entry in the order_amount array. Represents one fee / charge line of the order. Provide the lines that make up the order total; fee_code identifies the line type and is used to de-duplicate lines within one order.

FieldTypeRequiredDescription
subjectstringyesHuman-readable description of the fee line
amountnumberyesAmount, decimal (2 places), must be >= 0.01
currencystringyesISO 4217 currency code, e.g. EUR
fee_codestringrecommendedFee line type — see codes below

Recognized fee_code values (as used by the platform):

fee_codeMeaningExample subject
sub_totalProduct subtotal (sum of line prices)Product Total
discount_feeOrder-level discount (as a positive amount on a discount line)Discount
actual_shippingActual shipping fee chargedActual Shipping Fee
adjust_shippingShipping adjustmentAdjust Shipping Fee
taxTax / VATTax
pay_commissionPayment / settlement commissionSettlement Fee
return_feeReturn-related feeReturn Fee

At minimum, send sub_total, tax, and a shipping line (actual_shipping) when applicable; other codes are optional.

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/order/submit' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "shop_id": 123,
  "shop_order_no": "SO-1001",
  "shipping_standard": "STD",
  "payment_method": "bank_transfer",
  "purchase_time": "2026-07-22 10:00:00",
  "billing_address": {
    "full_name": "John Doe",
    "company": "Doe GmbH",
    "tax_id": "DE123456789",
    "country_code": "DE",
    "province": "Bavaria",
    "city": "Munich",
    "address1": "Marienplatz 1",
    "postcode": "80331",
    "tel": "+49 89 000000",
    "email": "john@doe.example"
  },
  "shipping_address": {
    "full_name": "John Doe",
    "country_code": "DE",
    "province": "Bavaria",
    "city": "Munich",
    "address1": "Marienplatz 1",
    "postcode": "80331",
    "tel": "+49 89 000000"
  },
  "order_item": [
    {
      "quantity": 2,
      "price": 49.9,
      "shop_order_item_primary_key": "LINE-1",
      "item": {
        "title": "Portable Power Station",
        "shop_sku": "PPS-500",
        "sale_price": 49.9,
        "weight": 5.2,
        "weight_unit": "kg",
        "images": {
          "black": [
            "https://cdn.example.com/pps500-black-1.jpg",
            "https://cdn.example.com/pps500-black-2.jpg"
          ]
        },
        "primary_image_key": "color",
        "mpn": "PPS500",
        "ean": "4006381333931",
        "variant": {
          "shop_sku": "PPS-500-BLK",
          "sku": "PPS-500-BLK",
          "standard": {
            "color": "black",
            "size": "500W"
          },
          "sale_price": 49.9,
          "weight": 5.2,
          "weight_unit": "kg",
          "hs_code": "8507600000"
        }
      }
    }
  ],
  "order_amount": [
    {
      "subject": "Product Total",
      "amount": 99.8,
      "currency": "EUR",
      "fee_code": "sub_total"
    },
    {
      "subject": "Actual Shipping Fee",
      "amount": 9.9,
      "currency": "EUR",
      "fee_code": "actual_shipping"
    },
    {
      "subject": "Tax",
      "amount": 20.94,
      "currency": "EUR",
      "fee_code": "tax"
    }
  ]
}'

Response ​

json
{ "code": 200, "msg": "order submit succeed", "data": { "order_id": 456 } }

Error Codes ​

codeMeaning
909Missing/invalid token, disabled app, or non-channel_partner type
400Shop not bound to this channel partner, or request validation failed
400No account manager bound and no shop responsible person (no account manager assigned...)
400Unknown SKU (Order rejected because of unknown SKU(s): ...), whole order rolled back, nothing created

Idempotency and de-duplication ​

shop_id + shop_order_no is a persistent idempotency key, enforced in two layers:

  1. 60-second cache lock. A repeat submission of the same key within 60 seconds returns the existing order id and is not processed again.
  2. Persistent de-duplication. After 60 seconds the platform still looks up shop_id + shop_order_no: an existing order returns its id and no new order is created; if the original order is still processing, its line items are updated from the new request.

Keep shop_order_no stable and unique per shop. When the first submission fails or the order is not yet persisted — including concurrent submissions and a serial retry within the 60-second lock after a failed first attempt — data.order_id may be 0; query by shop_order_no shortly afterwards to confirm.

Unknown SKU guard ​

A SKU is unknown when item.variant.shop_sku (or sku) has no mapping in the platform primary catalog. If any SKU in the request is unknown:

  • the whole order is rejected and the transaction rolled back — no partial order;
  • the response is 400 with a message such as Order rejected because of unknown SKU(s): PPS-500-BLK;
  • bind/map the SKU in ERP first, then resubmit.