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.
| Endpoint | Required capability | Purpose |
|---|---|---|
/outbound/sku-search | outbound_submit | Search owned-stock SKUs available for outbound |
/outbound/carriers | outbound_submit | Carrier dropdown for the label service |
/outbound/addresses | outbound_submit | Address book list |
/outbound/address/create | outbound_submit | Create an address book entry |
/outbound/containers | outbound_submit | Package container catalog (system presets + own) |
/outbound/container/create | outbound_submit | Create a custom package container |
/outbound/update-shipping | outbound_submit | Add or change carrier info and destination before shipment |
/outbound/confirm | outbound_submit | Submit a draft / pending request |
/outbound/evidence/list | outbound_evidence_view | Warehouse execution evidence list |
/outbound/attachment/batch-update | outbound_attachment_upload | Batch update attachment print parameters |
/outbound/attachment/batch-delete | outbound_attachment_upload | Batch soft-delete attachments |
Search Owned-Stock SKUs
/channel/api/v1/outbound/sku-searchAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
keyword | string | no | Fuzzy match on sku / ean / origin_sku / shop_sku / product title; empty returns all |
warehouse_id | integer | no | Restrict to one warehouse; 0 or omitted means any warehouse |
limit | integer | no | Result count, default 20, clamped to 1–30 |
Response
{
"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"
}
]
}| Field | Type | Description |
|---|---|---|
sku_id | integer | SKU (variant) ID, used as items[].sku_id |
sku / sku_code | string | SKU code; both fields carry the same value |
ean | string | EAN barcode |
origin_sku | string | Original / manufacturer SKU code |
shop_sku | string | Shop-side SKU code |
title / product_title | string | Product title; both fields carry the same value |
standard | string | Raw specification value (usually a JSON string) |
options | array / object | Decoded specification; [] when it cannot be decoded |
images | string | Raw product image JSON |
primary_image_key | string | Primary image URL |
image | string | First image resolved from images / primary_image_key; may be an empty string |
weight / weight_unit | number / string | Reference weight and unit |
price / sale_price | number | Reference price / sale price |
available_quantity | integer | Total quantity on hand (sum of inventory rows with status = 1 and quantity > 0) |
warehouse_id / warehouse_name | integer / string | Smallest warehouse ID among matched inventory rows, and its name |
Notes:
- Only owned stock (
owner_member_idequals the current member) is counted; when the member holds theplatform_stockcapability, platform stock (owner_member_id IS NULL) is included as well. - Results are ordered by
available_quantitydescending, thensku_idascending. available_quantityis the sum of on-hand quantity across every matched warehouse and does not deduct frozen stock (freeze = 1rows are included).- Aggregation is per SKU, not per SKU + warehouse:
warehouse_id/warehouse_nameare the minimum values of the matched rows and are display hints only. Use/inventory/listwhen you need per-warehouse quantities.
Error Codes
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 500 | Internal server error |
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
/channel/api/v1/outbound/carriersAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
No request parameters.
Response
{
"code": 200,
"msg": "success",
"data": [
{
"id": 11,
"name": "DHL Express",
"channel": "dhl",
"service_code": "EXPRESS"
}
]
}| Field | Type | Description |
|---|---|---|
id | integer | Carrier authorize ID, used as carrier_id when submitting |
name | string | Carrier name |
channel | string | Channel identifier; may be empty |
service_code | string | Service code; may be empty |
Error Codes
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 500 | Internal server error |
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
/channel/api/v1/outbound/addressesAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
No request parameters.
Response
{
"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"
}
]
}| Field | Type | Description |
|---|---|---|
id | integer | Address ID, used as address_id when submitting |
name / full_name | string | Recipient name |
tel | string | Phone number |
email | string | Recipient email (set from the member primary email on write) |
country_code | string | 2-letter ISO country code |
province | string | Province / state |
city | string | City |
address1 / address2 | string | Address line 1 / 2 |
postcode | string | Postcode |
is_default | integer | Whether this is the default address |
state | integer | 1 means active |
Notes:
- Rows are matched by
t_address.emailagainst the member primary email (themember_useraccount email withis_primary = 1andactive = 1, falling back tomember_pro.email) and filtered bystate = 1. - Note the difference from
/outbound/update-shipping: this endpoint uses the primary email, whileaddress_idownership is validated byMemberPro.email. When the two differ, an address returned here may not be usable inupdate-shipping(400address not found). - When the primary email is empty, the endpoint returns an empty array.
- Ordering is
is_defaultdescending, theniddescending. - The response is the raw address row and may include database columns beyond those listed.
Error Codes
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 500 | Internal server error |
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
/channel/api/v1/outbound/address/createAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Recipient name |
phone | string | yes | Phone number |
address1 | string | yes | Address line 1 |
city | string | yes | City |
postcode | string | yes | Postcode |
country_code | string | yes | 2-letter ISO country code |
province | string | no | Province / state |
address2 | string | no | Address 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 = 1andactive = 1, falling back tomember_pro.email);user_idstores the member ID. address_idownership is validated byMemberPro.email, which may differ from the primary email above; see "Update Shipping Information".
Response
Returns the created address row.
{
"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
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 400 | Missing name / phone / address1 / city / postcode / country_code, or a malformed country_code |
| 500 | Write failed |
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
/channel/api/v1/outbound/containersAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
No request parameters.
Response
{
"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"
}
]
}| Field | Type | Description |
|---|---|---|
id | integer | Container ID, used as packages[].container_id |
member_id | integer | 0 for system presets, otherwise the owning partner |
code | string | Container code |
name | string | Container name |
container_type | string | carton / pallet |
length / width / height | number | Dimensions |
max_weight | number | Maximum load; used as package weight when weight is 0 |
dimension_unit / weight_unit | string | Dimension / weight unit |
status | integer | 1 means enabled |
Notes:
- Ordering is
member_idascending, thenidascending, 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
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 500 | Internal server error |
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
/channel/api/v1/outbound/container/createAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Container name; after trimming it must be non-empty and at most 128 characters |
container_type | string | no | carton / pallet, default carton (case-insensitive) |
code | string | no | Container code, uppercased on write; blank auto-generates C{memberId}-{His} |
length | number | no | Length, default 0; negatives become 0 |
width | number | no | Width, default 0; negatives become 0 |
height | number | no | Height, default 0; negatives become 0 |
max_weight | number | no | Maximum load, default 0; negatives become 0 |
dimension_unit | string | no | Dimension unit, default cm |
weight_unit | string | no | Weight unit, default kg |
Notes:
- Container codes are not checked for uniqueness; duplicates are accepted.
dimension_unit/weight_unitare not validated against an enum and are stored as provided.
Response
Returns the created container row with the same fields as /outbound/containers.
{
"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
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 400 | name empty or longer than 128 characters (invalid container name), invalid container_type (invalid container_type) |
| 500 | Write failed |
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
/channel/api/v1/outbound/update-shippingAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | yes | Outbound request ID (this endpoint does not accept the request_id alias) |
carrier_id | integer | no | Carrier authorize ID; 0 or a negative value clears it to null |
carrier_name_self | string | no | Self-pickup carrier name |
tracking_number | string | no | Tracking number |
address_id | integer | no | Address book ID, takes precedence over address |
address | object | no | Inline 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.name | string | see notes | Recipient name |
address.phone | string | see notes | Recipient phone |
address.email | string | no | Recipient email |
address.address1 | string | see notes | Address line 1 |
address.address2 | string | no | Address line 2 |
address.city | string | see notes | City |
address.province | string | no | Province / state |
address.postcode | string | see notes | Postcode |
address.country_code | string | see notes | 2-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 whenaddress(which may be{}) oraddress_idis supplied as well. Sending only top-levelname/phone/citywithoutaddress/address_idreturns 400nothing to update. delivery_mode,status,warehouse_id,items,packagesand 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 fromt_address, so address fields you omit keep the row's original values and are not written asnull.- Inline
address: the whole snapshot is rebuilt and omitted address fields are written asnull; there is no field-level merge.
- If the request
delivery_modeise2c_carrier, the destination must be complete (name,phone,address1,city,postcode,country_code); otherwise the API returns 400. - Email mismatch:
address_idownership is validated by matching the address row email againstMemberPro.email(the member profile email), while/outbound/addressesand/outbound/address/createuse the primary email (member_user.is_primary = 1andactive = 1, falling back tomember_pro.email). When the two emails differ, anaddress_idobtained from/outbound/addressesmay return 400address not found. - Statuses
shipped/completed/cancelled/rejectedare locked and return 400shipping 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.
{
"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
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 400 | Missing 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 |
| 500 | Update failed |
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
/channel/api/v1/outbound/confirmAuth: 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_approvaland 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
id | integer | yes* | Outbound request ID |
request_id | integer | yes* | 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
{
"code": 200,
"msg": "success",
"data": {
"id": 1001,
"status": "outbound_pending"
}
}| Field | Type | Description |
|---|---|---|
id | integer | Outbound request ID |
status | string | outbound_pending (in the warehouse queue) or pending_approval (awaiting approval) |
Error Codes
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_submit required) |
| 400 | Missing 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) |
| 404 | Outbound request not found, or not owned by this member |
| 500 | Confirmation failed |
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
/channel/api/v1/outbound/evidence/listAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
request_id | integer | yes* | Outbound request ID |
id | integer | yes* | Compatible alias for the outbound request ID |
* request_id wins, then id. If both are missing or 0, the API returns 400.
Response
{
"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"
}
]
}| Field | Type | Description |
|---|---|---|
id | integer | Evidence ID |
outbound_id | integer | Generic outbound SOP order ID (not the outbound request ID) |
type | string | stock_ready / loading / handover / signature / other |
name | string | File name |
file_url | string | File URL |
file_type | string | Extension: pdf / jpg / jpeg / png |
file_size | integer | File size in bytes; 20MB maximum |
remark | string | Remark |
uploaded_by_type | string | Uploader type; staff for warehouse uploads |
uploaded_by_id | integer | Uploader ID |
status | integer | 1 means active |
created_at | string | Creation time |
updated_at | string | Last update time |
Notes:
- Only
status = 1rows are returned, ordered byiddescending. - Evidence hangs off the outbound SOP order, so
outbound_idis the SOP order ID. The mapping from an outbound request to its SOP order is available asoutbound_idin/outbound/detail. - A missing request, or one owned by another member, returns 404.
Error Codes
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_evidence_view required) |
| 400 | Missing request_id / id |
| 404 | Outbound request not found, or not owned by this member |
| 500 | Failed to load evidence |
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
/channel/api/v1/outbound/attachment/batch-updateAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
request_id | integer | yes | Outbound request ID |
attachment_ids | integer[] | yes | Attachment ID array; must not be empty |
document_code | string | no | Document type, defaults to other when empty; silently truncated to 32 bytes (multi-byte characters may be cut) |
paper_type | string | no | Paper type, defaults to A4 when empty; silently truncated to 32 bytes (multi-byte characters may be cut) |
paper_width_mm | number | no | Paper width (mm), clamped to 0–2000 |
paper_height_mm | number | no | Paper height (mm), clamped to 0–2000 |
print_enabled | boolean | no | Whether the attachment enters the print queue |
print_copies | integer | no | Print copies, clamped to 1–99 |
print_scale | string | no | portrait / landscape; invalid values fall back to portrait |
print_types | string[] | no | print, 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
updatedstill reports the number of attachments processed successfully.
Response
{
"code": 200,
"msg": "success",
"data": {
"updated": 2
}
}updated is the number of attachments actually updated.
Error Codes
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_attachment_upload required) |
| 400 | Missing 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) |
| 404 | Outbound request not found, or not owned by this member |
| 500 | Batch update failed |
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
/channel/api/v1/outbound/attachment/batch-deleteAuth: 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
| Header | Required | Description |
|---|---|---|
request-token | yes | Channel partner app token |
Content-Type | yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
request_id | integer | yes | Outbound request ID |
attachment_ids | integer[] | yes | Attachment ID array; must not be empty |
Response
{
"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
| code | Meaning |
|---|---|
| 909 | Unauthenticated, invalid token, or not a channel partner |
| 606 | Insufficient capability (outbound_attachment_upload required) |
| 400 | Missing request_id or attachment_ids |
| 500 | Outbound request not found or not owned by this member, or batch delete failed |
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
]
}'