Source: ColorPark Open Platform documentation — Category: Interface – LAN Terminal (TCP); Article: Create Print Job Event (创建打印任务事件); id=154, cate_id=113. Published / Updated: 2026-09-22 15:55:35
Create a Local Print Job
Send the print content in event format.
What do you need to prepare before starting?
Prepare the terminal software, a network connection on the same subnet, and the TCP communication configuration; first establish the connection following the integration guide.
This uses the terminal TCP event protocol — it is neither the Internet OpenAPI nor the embedded CMD protocol.
→ Next: Receive task status →
The Create Print Job Event is used by a third-party platform to send a print-image task to the open platform via the interface method. After the open platform receives the print job, it automatically dispatches it to the printer terminal software of the corresponding device number. Print jobs can be dispatched offline — once the printer terminal comes online, it receives all the offline-dispatched jobs.
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 |
Request Example
{"event":"01","order_id":"20000196","name":"silver coin","file":"C:/images/11.jpg","width":"38","height":"38","left":"0","top":"0","white_ink":"0","channel_type":"1","channel":"1"}
Response Result
{"event":"01","code":"0","msg":"success","task_id":"10000002","order_id":"20000196","status":"0"}
Note: Per the source document, the original response example was missing a comma between
order_idandstatus("order_id":"20000196""status":"0"). It has been normalized to valid JSON here; the field contents are unchanged.
Request Parameters
| Parameter | Example | Type | Required | Description |
|---|---|---|---|---|
event |
01 | string | Yes | 01 = send the print-job creation event |
order_id |
20000196 | string | Yes | Caller's order number, custom-defined by the caller; string up to 32 characters, e.g. 20000196 |
name |
silver coin | string | Yes | Product name, e.g. "silver coin" |
file |
C:/images/11.jpg | string | Yes | Supports a local image path, an online URL, or base64 — e.g. C:/images/11.jpg, or https://img.colorpark.cn/api/render/36531651306594235.png, or /9j/4AAQSkZJRgABAQAAAQABAAD/4QF0q0YT0P//Z. Supports jpg, png, tif formats (jpg/png recommended) |
width |
38 | string | Yes | Width of the image to be printed, in mm |
height |
38 | string | Yes | Height of the image to be printed, in mm |
left |
0 | string | Yes | Left margin of the image to be printed, in mm |
top |
0 | string | Yes | Top margin of the image to be printed, in mm |
white_ink |
0 | string | Yes | Whether white ink is required: 0 = no white ink, 1 = print white ink |
channel_type |
1 | string | No | The channel type of the current machine: 1 if a channel holds a single denomination, 2 if it holds two denominations |
channel |
1 | string | No | The channel where the current order's coin is located — e.g. coin A in channel 1, coin B in channel 2; pass 1 when printing coin A, 2 when printing coin B; if both channels hold the same single denomination, keep passing 1 |
Return Result
| Parameter | Example | Type | Description |
|---|---|---|---|
event |
01 | string | 01 = send the print-job creation event |
code |
0 | string | Result status code: 0 on success, 1 on failure |
msg |
success | string | Result description, e.g. "submitted successfully" |
task_id |
10000002 | string | Unique ID assigned to the print job. If order creation fails, returns the task_id provided by the caller; if order creation succeeds, provided by the service provider |
order_id |
20000196 | string | Order number, defined by the caller |
status |
0 | string | Print-task status: 0 waiting · 1 printing · 2 done · 3 cancelled · 4 fault |
Important note on
task_id: The response description states that on failure the server returns "thetask_idprovided by the caller," yet the request parameter list above does not define atask_idfield (onlyorder_idis supplied by the caller). This is an inconsistency in the source document. Integrators should treattask_idas server-assigned on success; the exact expectation on failure is ambiguous and should be confirmed with Ruifengcai technical support.
Status-code note: The
statusvalues here (0waiting,1printing,2done,3cancelled,4fault) are the print-task status enum used in the TCP task-status callback event as well — keep them consistent when handling callbacks.
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