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

Supporting Outbound Endpoints ​

Supporting endpoints used by the outbound flow in addition to submit, list, detail and attachments: SKU search, carriers, address book, package containers, shipping updates, draft confirmation, warehouse execution evidence, and attachment batch update/delete.

Every endpoint is POST with a JSON body and returns the unified { code, msg, data } envelope.

EndpointRequired capabilityPurpose
/outbound/sku-searchoutbound_submitSearch owned-stock SKUs available for outbound
/outbound/carriersoutbound_submitCarrier dropdown for the label service
/outbound/addressesoutbound_submitAddress book list
/outbound/address/createoutbound_submitCreate an address book entry
/outbound/containersoutbound_submitPackage container catalog (system presets + own)
/outbound/container/createoutbound_submitCreate a custom package container
/outbound/update-shippingoutbound_submitAdd or change carrier info and destination before shipment
/outbound/confirmoutbound_submitSubmit a draft / pending request
/outbound/evidence/listoutbound_evidence_viewWarehouse execution evidence list
/outbound/attachment/batch-updateoutbound_attachment_uploadBatch update attachment print parameters
/outbound/attachment/batch-deleteoutbound_attachment_uploadBatch soft-delete attachments

Search Owned-Stock SKUs ​

POST/channel/api/v1/outbound/sku-search

Auth: request-token (channel_partner)

Fuzzy-search SKU code, EAN, origin SKU, shop SKU or product title and return SKUs that have stock on hand for the current member. Used by the portal SKU picker.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
keywordstringnoFuzzy match on sku / ean / origin_sku / shop_sku / product title; empty returns all
warehouse_idintegernoRestrict to one warehouse; 0 or omitted means any warehouse
limitintegernoResult count, default 20, clamped to 1–30

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "sku_id": 789,
      "sku": "SKU-789",
      "ean": "6901234567890",
      "origin_sku": "ORIGIN-789",
      "shop_sku": "SHOP-789",
      "standard": "{\"Color\":\"Black\"}",
      "weight": 2.5,
      "weight_unit": "kg",
      "price": 19.9,
      "sale_price": 17.9,
      "title": "Portable Power Station 500W",
      "images": "{\"main\":[\"https://cdn.example.com/products/789.jpg\"]}",
      "primary_image_key": "https://cdn.example.com/products/789.jpg",
      "available_quantity": 240,
      "warehouse_id": 1,
      "warehouse_name": "Shenzhen Warehouse",
      "options": { "Color": "Black" },
      "image": "https://cdn.example.com/products/789.jpg",
      "sku_code": "SKU-789",
      "product_title": "Portable Power Station 500W"
    }
  ]
}
FieldTypeDescription
sku_idintegerSKU (variant) ID, used as items[].sku_id
sku / sku_codestringSKU code; both fields carry the same value
eanstringEAN barcode
origin_skustringOriginal / manufacturer SKU code
shop_skustringShop-side SKU code
title / product_titlestringProduct title; both fields carry the same value
standardstringRaw specification value (usually a JSON string)
optionsarray / objectDecoded specification; [] when it cannot be decoded
imagesstringRaw product image JSON
primary_image_keystringPrimary image URL
imagestringFirst image resolved from images / primary_image_key; may be an empty string
weight / weight_unitnumber / stringReference weight and unit
price / sale_pricenumberReference price / sale price
available_quantityintegerTotal quantity on hand (sum of inventory rows with status = 1 and quantity > 0)
warehouse_id / warehouse_nameinteger / stringSmallest warehouse ID among matched inventory rows, and its name

Notes:

  • Only owned stock (owner_member_id equals the current member) is counted; when the member holds the platform_stock capability, platform stock (owner_member_id IS NULL) is included as well.
  • Results are ordered by available_quantity descending, then sku_id ascending.
  • available_quantity is the sum of on-hand quantity across every matched warehouse and does not deduct frozen stock (freeze = 1 rows are included).
  • Aggregation is per SKU, not per SKU + warehouse: warehouse_id / warehouse_name are the minimum values of the matched rows and are display hints only. Use /inventory/list when you need per-warehouse quantities.

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
500Internal server error

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/sku-search' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "keyword": "power station",
  "warehouse_id": 1,
  "limit": 20
}'

List Available Carriers ​

POST/channel/api/v1/outbound/carriers

Auth: request-token (channel_partner)

Return enabled logistics authorizations (t_authorize.type = logictics, state = 1) for the label service and carrier dropdown. The list is global and is not scoped to a member.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

No request parameters.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "id": 11,
      "name": "DHL Express",
      "channel": "dhl",
      "service_code": "EXPRESS"
    }
  ]
}
FieldTypeDescription
idintegerCarrier authorize ID, used as carrier_id when submitting
namestringCarrier name
channelstringChannel identifier; may be empty
service_codestringService code; may be empty

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
500Internal server error

cURL ​

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

List Address Book ​

POST/channel/api/v1/outbound/addresses

Auth: request-token (channel_partner)

Return the current member's address book entries for choosing an address_id during outbound submission.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

No request parameters.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "id": 3001,
      "name": "Anna Schmidt",
      "full_name": "Anna Schmidt",
      "tel": "+49 40 1234567",
      "email": "anna@example.com",
      "country_code": "DE",
      "province": "Hamburg",
      "city": "Hamburg",
      "address1": "Hafenstrasse 1",
      "address2": "",
      "postcode": "20457",
      "is_default": 1,
      "state": 1,
      "user_id": "42",
      "locale": "en-US",
      "created_at": "2026-11-10 09:00:00",
      "updated_at": "2026-11-10 09:00:00"
    }
  ]
}
FieldTypeDescription
idintegerAddress ID, used as address_id when submitting
name / full_namestringRecipient name
telstringPhone number
emailstringRecipient email (set from the member primary email on write)
country_codestring2-letter ISO country code
provincestringProvince / state
citystringCity
address1 / address2stringAddress line 1 / 2
postcodestringPostcode
is_defaultintegerWhether this is the default address
stateinteger1 means active

Notes:

  • Rows are matched by t_address.email against the member primary email (the member_user account email with is_primary = 1 and active = 1, falling back to member_pro.email) and filtered by state = 1.
  • Note the difference from /outbound/update-shipping: this endpoint uses the primary email, while address_id ownership is validated by MemberPro.email. When the two differ, an address returned here may not be usable in update-shipping (400 address not found).
  • When the primary email is empty, the endpoint returns an empty array.
  • Ordering is is_default descending, then id descending.
  • The response is the raw address row and may include database columns beyond those listed.

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
500Internal server error

cURL ​

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

Create Address Book Entry ​

POST/channel/api/v1/outbound/address/create

Auth: request-token (channel_partner)

Create an address book entry for the current member. The email is not supplied by the request; the member primary email is always used.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
namestringyesRecipient name
phonestringyesPhone number
address1stringyesAddress line 1
citystringyesCity
postcodestringyesPostcode
country_codestringyes2-letter ISO country code
provincestringnoProvince / state
address2stringnoAddress line 2

Notes:

  • If any required field is empty (or the country code normalizes to empty), the API returns 400 with name/phone/address/city/postcode/country are required.
  • When the member has no active address yet, the new row becomes the default (is_default = 1).
  • Ownership is expressed through the member primary email (member_user.is_primary = 1 and active = 1, falling back to member_pro.email); user_id stores the member ID.
  • address_id ownership is validated by MemberPro.email, which may differ from the primary email above; see "Update Shipping Information".

Response ​

Returns the created address row.

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": 3001,
    "name": "Anna Schmidt",
    "full_name": "Anna Schmidt",
    "tel": "+49 40 1234567",
    "email": "anna@example.com",
    "country_code": "DE",
    "province": "Hamburg",
    "city": "Hamburg",
    "address1": "Hafenstrasse 1",
    "address2": "",
    "postcode": "20457",
    "is_default": 1,
    "state": 1,
    "user_id": "42",
    "locale": "en-US",
    "created_at": "2026-11-11 10:00:00",
    "updated_at": "2026-11-11 10:00:00"
  }
}

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
400Missing name / phone / address1 / city / postcode / country_code, or a malformed country_code
500Write failed

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/address/create' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Anna Schmidt",
  "phone": "+49 40 1234567",
  "address1": "Hafenstrasse 1",
  "city": "Hamburg",
  "province": "Hamburg",
  "postcode": "20457",
  "country_code": "DE"
}'

List Package Containers ​

POST/channel/api/v1/outbound/containers

Auth: request-token (channel_partner)

Return the available package container catalog: system presets (member_id = 0) plus the current member's own containers (member_id equals the member), status = 1 only.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

No request parameters.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "id": 801,
      "member_id": 0,
      "code": "STD-CARTON-M",
      "name": "Standard carton M",
      "container_type": "carton",
      "length": 40,
      "width": 30,
      "height": 25,
      "max_weight": 15,
      "dimension_unit": "cm",
      "weight_unit": "kg",
      "status": 1,
      "created_at": "2026-01-05 08:00:00",
      "updated_at": "2026-01-05 08:00:00"
    },
    {
      "id": 812,
      "member_id": 42,
      "code": "C42-101530",
      "name": "Fragile wooden crate",
      "container_type": "pallet",
      "length": 120,
      "width": 100,
      "height": 90,
      "max_weight": 300,
      "dimension_unit": "cm",
      "weight_unit": "kg",
      "status": 1,
      "created_at": "2026-11-11 10:15:30",
      "updated_at": "2026-11-11 10:15:30"
    }
  ]
}
FieldTypeDescription
idintegerContainer ID, used as packages[].container_id
member_idinteger0 for system presets, otherwise the owning partner
codestringContainer code
namestringContainer name
container_typestringcarton / pallet
length / width / heightnumberDimensions
max_weightnumberMaximum load; used as package weight when weight is 0
dimension_unit / weight_unitstringDimension / weight unit
statusinteger1 means enabled

Notes:

  • Ordering is member_id ascending, then id ascending, so system presets come before custom containers.
  • When an outbound submission matches container_id, package type, dimensions and units come from the container.

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
500Internal server error

cURL ​

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

Create Package Container ​

POST/channel/api/v1/outbound/container/create

Auth: request-token (channel_partner)

Create a custom package container (carton or pallet) for the current member. It is immediately readable from /outbound/containers and usable in outbound submission.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
namestringyesContainer name; after trimming it must be non-empty and at most 128 characters
container_typestringnocarton / pallet, default carton (case-insensitive)
codestringnoContainer code, uppercased on write; blank auto-generates C{memberId}-{His}
lengthnumbernoLength, default 0; negatives become 0
widthnumbernoWidth, default 0; negatives become 0
heightnumbernoHeight, default 0; negatives become 0
max_weightnumbernoMaximum load, default 0; negatives become 0
dimension_unitstringnoDimension unit, default cm
weight_unitstringnoWeight unit, default kg

Notes:

  • Container codes are not checked for uniqueness; duplicates are accepted.
  • dimension_unit / weight_unit are not validated against an enum and are stored as provided.

Response ​

Returns the created container row with the same fields as /outbound/containers.

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": 812,
    "member_id": 42,
    "code": "C42-101530",
    "name": "Fragile wooden crate",
    "container_type": "pallet",
    "length": 120,
    "width": 100,
    "height": 90,
    "max_weight": 300,
    "dimension_unit": "cm",
    "weight_unit": "kg",
    "status": 1,
    "created_at": "2026-11-11 10:15:30",
    "updated_at": "2026-11-11 10:15:30"
  }
}

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
400name empty or longer than 128 characters (invalid container name), invalid container_type (invalid container_type)
500Write failed

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/container/create' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Fragile wooden crate",
  "container_type": "pallet",
  "length": 120,
  "width": 100,
  "height": 90,
  "max_weight": 300,
  "dimension_unit": "cm",
  "weight_unit": "kg"
}'

Update Shipping Information ​

POST/channel/api/v1/outbound/update-shipping

Auth: request-token (channel_partner)

Add or change carrier information and the destination before shipment, supporting the deferred label/destination flow. The request must belong to the current member.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
idintegeryesOutbound request ID (this endpoint does not accept the request_id alias)
carrier_idintegernoCarrier authorize ID; 0 or a negative value clears it to null
carrier_name_selfstringnoSelf-pickup carrier name
tracking_numberstringnoTracking number
address_idintegernoAddress book ID, takes precedence over address
addressobjectnoInline destination; the fields below may also be passed at the top level (top-level fields only take effect when address or address_id is also supplied)
address.namestringsee notesRecipient name
address.phonestringsee notesRecipient phone
address.emailstringnoRecipient email
address.address1stringsee notesAddress line 1
address.address2stringnoAddress line 2
address.citystringsee notesCity
address.provincestringnoProvince / state
address.postcodestringsee notesPostcode
address.country_codestringsee notes2-letter ISO country code

Notes:

  • Every field is optional, but at least one updatable field is required; otherwise the API returns 400 nothing to update.
  • Top-level address fields (name / phone / email / address1 / address2 / city / province / postcode / country_code) only take effect when address (which may be {}) or address_id is supplied as well. Sending only top-level name / phone / city without address / address_id returns 400 nothing to update.
  • delivery_mode, status, warehouse_id, items, packages and similar fields cannot be updated through this endpoint and are ignored if sent.
  • The destination snapshot has two different sources:
    • address_id > 0: the whole row is copied from t_address, so address fields you omit keep the row's original values and are not written as null.
    • Inline address: the whole snapshot is rebuilt and omitted address fields are written as null; there is no field-level merge.
  • If the request delivery_mode is e2c_carrier, the destination must be complete (name, phone, address1, city, postcode, country_code); otherwise the API returns 400.
  • Email mismatch: address_id ownership is validated by matching the address row email against MemberPro.email (the member profile email), while /outbound/addresses and /outbound/address/create use the primary email (member_user.is_primary = 1 and active = 1, falling back to member_pro.email). When the two emails differ, an address_id obtained from /outbound/addresses may return 400 address not found.
  • Statuses shipped / completed / cancelled / rejected are locked and return 400 shipping info is locked after shipment.
  • A missing request, or one owned by another member, also returns 400 (this endpoint maps ownership validation failures to 400 rather than 404).

Response ​

Returns the updated outbound request detail with the same structure as /outbound/detail.

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": 1001,
    "member_id": 42,
    "warehouse_id": 1,
    "delivery_mode": "e2c_carrier",
    "carrier_id": 11,
    "carrier_name_self": null,
    "tracking_number": "00340434161094000012",
    "status": "outbound_pending",
    "address_id": 3001,
    "ship_to_name": "Anna Schmidt",
    "ship_to_phone": "+49 40 1234567",
    "ship_to_email": "anna@example.com",
    "ship_to_address1": "Hafenstrasse 1",
    "ship_to_address2": null,
    "ship_to_city": "Hamburg",
    "ship_to_province": null,
    "ship_to_postcode": "20457",
    "ship_to_country_code": "DE",
    "updated_at": "2026-11-11 10:30:00"
  }
}

Note: data is the full service-layer detail() structure, including items and packages exactly as in /outbound/detail, but the controller does not attach the extra /outbound/detail fields outbound_id, sop_status, attachments, sop_items, dispatch_task_id, webhook_url and webhook_secret.

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
400Missing id; request not found or not owned by this member; locked after shipment/completion/cancellation/rejection; nothing to update (nothing to update); address not found (address_id missing / state != 1 / email does not match the member); invalid ship_to_country_code (malformed country code); incomplete destination for e2c_carrier
500Update failed

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/update-shipping' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "id": 1001,
  "carrier_id": 11,
  "tracking_number": "00340434161094000012"
}'

Confirm Outbound Request ​

POST/channel/api/v1/outbound/confirm

Auth: request-token (channel_partner)

Move an outbound request to the next stage. Accepts the legacy request status draft or pending; any other status returns 400.

  • With member auto-approval enabled, or no approval flow configured: the request is approved immediately and the legacy status becomes outbound_pending (it enters the warehouse queue).
  • With an approval flow and no auto-approval: the status becomes pending_approval and an approval workflow instance is started.

Confirmation and approval do not validate or lock inventory; stock is locked when the warehouse confirms and deducted on shipment.

Required capability: outbound_submit

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
idintegeryes*Outbound request ID
request_idintegeryes*Compatible alias for the outbound request ID

* Supply at least one of id or request_id; id wins. If both are missing or 0, the API returns 400.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "id": 1001,
    "status": "outbound_pending"
  }
}
FieldTypeDescription
idintegerOutbound request ID
statusstringoutbound_pending (in the warehouse queue) or pending_approval (awaiting approval)

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_submit required)
400Missing id / request_id; current status is not draft / pending (only draft/pending requests can be confirmed); the request has no items (outbound request has no items)
404Outbound request not found, or not owned by this member
500Confirmation failed

cURL ​

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

List Outbound Evidence ​

POST/channel/api/v1/outbound/evidence/list

Auth: request-token (channel_partner)

List warehouse execution evidence for an outbound order (stock-ready photos, loading, handover, signed receipt). Evidence is uploaded by the warehouse; partners have read-only access and this endpoint offers no upload or delete.

Required capability: outbound_evidence_view

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
request_idintegeryes*Outbound request ID
idintegeryes*Compatible alias for the outbound request ID

* request_id wins, then id. If both are missing or 0, the API returns 400.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": [
    {
      "id": 12001,
      "outbound_id": 5001,
      "type": "stock_ready",
      "name": "stock-ready-1.jpg",
      "file_url": "https://cdn.example.com/e2c/outbound/stock-ready-1.jpg",
      "file_type": "jpg",
      "file_size": 512000,
      "remark": "",
      "uploaded_by_type": "staff",
      "uploaded_by_id": 7,
      "status": 1,
      "created_at": "2026-11-11 14:00:00",
      "updated_at": "2026-11-11 14:00:00"
    }
  ]
}
FieldTypeDescription
idintegerEvidence ID
outbound_idintegerGeneric outbound SOP order ID (not the outbound request ID)
typestringstock_ready / loading / handover / signature / other
namestringFile name
file_urlstringFile URL
file_typestringExtension: pdf / jpg / jpeg / png
file_sizeintegerFile size in bytes; 20MB maximum
remarkstringRemark
uploaded_by_typestringUploader type; staff for warehouse uploads
uploaded_by_idintegerUploader ID
statusinteger1 means active
created_atstringCreation time
updated_atstringLast update time

Notes:

  • Only status = 1 rows are returned, ordered by id descending.
  • Evidence hangs off the outbound SOP order, so outbound_id is the SOP order ID. The mapping from an outbound request to its SOP order is available as outbound_id in /outbound/detail.
  • A missing request, or one owned by another member, returns 404.

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_evidence_view required)
400Missing request_id / id
404Outbound request not found, or not owned by this member
500Failed to load evidence

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/evidence/list' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "request_id": 1001
}'

Batch Update Attachments ​

POST/channel/api/v1/outbound/attachment/batch-update

Auth: request-token (channel_partner)

Batch-update print parameters and paper settings for multiple attachments. Only draft / pending / pending_approval / approved / warehouse_confirmed are operable; every other status (including stock_ready and later, rejected, cancelled) returns 400.

Required capability: outbound_attachment_upload

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
request_idintegeryesOutbound request ID
attachment_idsinteger[]yesAttachment ID array; must not be empty
document_codestringnoDocument type, defaults to other when empty; silently truncated to 32 bytes (multi-byte characters may be cut)
paper_typestringnoPaper type, defaults to A4 when empty; silently truncated to 32 bytes (multi-byte characters may be cut)
paper_width_mmnumbernoPaper width (mm), clamped to 0–2000
paper_height_mmnumbernoPaper height (mm), clamped to 0–2000
print_enabledbooleannoWhether the attachment enters the print queue
print_copiesintegernoPrint copies, clamped to 1–99
print_scalestringnoportrait / landscape; invalid values fall back to portrait
print_typesstring[]noprint, e_sign, return_required; invalid entries are filtered out

Notes:

  • Only attachments uploaded by the partner are counted and updated; warehouse-uploaded attachments are skipped and do not contribute to updated.
  • Attachment IDs that do not belong to this outbound order, or were already deleted, are silently skipped.
  • When no updatable field is supplied the endpoint still walks the target rows, and updated still reports the number of attachments processed successfully.

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "updated": 2
  }
}

updated is the number of attachments actually updated.

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_attachment_upload required)
400Missing request_id or attachment_ids; current status not in the operable list (including stock_ready and later, rejected, cancelled); outbound SOP order cannot be resolved (failed to resolve outbound order)
404Outbound request not found, or not owned by this member
500Batch update failed

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/attachment/batch-update' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "request_id": 1001,
  "attachment_ids": [
    9001,
    9002
  ],
  "print_enabled": true,
  "print_copies": 2,
  "print_types": [
    "print"
  ]
}'

Batch Delete Attachments ​

POST/channel/api/v1/outbound/attachment/batch-delete

Auth: request-token (channel_partner)

Batch soft-delete partner-uploaded attachments (status set to 0). This endpoint does not validate the outbound order status; attachments that do not belong to the current partner or no longer exist are skipped.

Required capability: outbound_attachment_upload

Request Headers ​

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

Request Body ​

FieldTypeRequiredDescription
request_idintegeryesOutbound request ID
attachment_idsinteger[]yesAttachment ID array; must not be empty

Response ​

json
{
  "code": 200,
  "msg": "success",
  "data": {
    "deleted": 2
  }
}

deleted is the number of attachments actually deleted; rows without permission or that no longer exist are silently skipped.

Note: this endpoint only catches the final exception, so a request_id that does not exist or is not owned by this member returns 500 (not 404).

Error Codes ​

codeMeaning
909Unauthenticated, invalid token, or not a channel partner
606Insufficient capability (outbound_attachment_upload required)
400Missing request_id or attachment_ids
500Outbound request not found or not owned by this member, or batch delete failed

cURL ​

cURL
curl -X POST 'https://apigate.e2c-energy.com/channel/api/v1/outbound/attachment/batch-delete' \
  -H 'request-token: YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "request_id": 1001,
  "attachment_ids": [
    9001,
    9002
  ]
}'