Source: ColorPark Open Platform documentation — Category: Interface – LAN Terminal (TCP); Article: Cancel Task Event (取消任务事件); id=158, cate_id=113. Published / Updated: 2026-09-22 15:55:37
The Cancel Print Task Event is mainly used by a third-party platform to send a print-task cancellation command to the open platform via the interface method. After the open platform receives the cancellation command, it terminates tasks that are pending or currently printing, and synchronously returns the cancellation status.
Note: Orders that are currently printing cannot be cancelled mid-way; only orders that are still queued and have not started printing can be cancelled.
Interface Information
| Parameter | Value | Description |
|---|---|---|
| IP | 192.168.127.11 | Use the corresponding IP within the LAN |
| Port | 63333 | Fixed port |
| Connection | TCP | Uses a TCP long connection |
| Encoding | UTF-8 | All sent and received data use UTF-8 encoding |
| Data format | JSON | Both sending and receiving use JSON format |
Single Task Cancel Event (event 02)
Request Example
{"event":"02","task_id":"10000002"}
Response Result
{"event":"02","code":"0","msg":"success","task_id":"10000002","status":"3"}
Request Parameters
| Parameter | Example | Type | Required | Description |
|---|---|---|---|---|
event |
02 | string | Yes | 02 = send the print-task cancellation event |
task_id |
10000002 | string | Yes | The unique ID assigned to the print job, generated by the service provider (obtained from the Create Print Job response) |
Return Result
| Parameter | Example | Type | Description |
|---|---|---|---|
event |
02 | string | 02 = send the print-task cancellation event |
code |
0 | string | Result status code: 0 on success, 1 on failure |
msg |
success | string | Result description, e.g. "success" |
task_id |
10000002 | string | The unique ID assigned to the print job, generated by the service provider |
status |
3 | string | Print-task status: 0 waiting · 1 printing · 2 done · 3 cancelled · 4 fault |
All Tasks Cancel Event (event 03)
Request Parameters
| Parameter | Example | Type | Required | Description |
|---|---|---|---|---|
event |
03 | string | Yes | 03 = cancel all pending print-task event |
Return Result
| Parameter | Example | Type | Description |
|---|---|---|---|
event |
02 | string | 02 = send the print-task cancellation event |
code |
0 | string | Result status code: 0 on success, 1 on failure |
msg |
success | string | Result description, e.g. "success" |
Note (source inconsistency preserved): In the original source, the "All Tasks Cancel Event" request uses
event = 03, but its return-result example shows theeventfield as02. The two are inconsistent; preserved verbatim here. Theevent 03request carries notask_id(it cancels all queued jobs) and its response omitstask_id/status.
Cross-reference —
task_idsource: Heretask_idis explicitly described as generated by the service provider. This is the value returned by the Create Print Job Event (id=154): a caller must use that returnedtask_idto cancel a specific job. (Note: the Create Print Job doc's response text also mentioned a "caller-providedtask_idon failure," which is inconsistent — in practicetask_idis always server-assigned. Seecolorpark-tcp-create-print-job-en.md.)
If the device encounters an unsolvable problem during debugging, you can contact the cloud-printing responsible person to troubleshoot and find a solution. Contact details:
- Phone: 137-5177-4454 【WeChat same number】
- Email: info@ColorPark.cn