CMD 01 — Prin

Last updated:2026-10-14 11:13:10

Category: Interface — Embedded Direct-Connect (TCP)

Send Print Command — prepare print parameters per the CMD 01 documentation.

What to prepare before starting?

First confirm the internal unit model, firmware, and device IP; the current communication spec uses a local HTTP address and CMD_ID commands.

The category name contains "TCP", but the actual request method follows "Communication Conventions and General Specifications". The call examples here apply only to the embedded protocol.

Next: Read Print Progress →

Item Content
Interface Name Print
Command ID CMD_ID = 01
Request Method POST
URL http://{deviceIP}:8555/api/app_print
Content Type application/json

Request Parameters

Name Type Required Description
CMD_ID string Yes Fixed "01"
IMG_URL string Yes Image address, read or downloaded by the printer (not a local path on a phone/PC). Two modes: 1. file: printer local file, e.g. file:///opt/jobs/a.png (the file must already be on the printer when submitted); 2. http/https: remote address, downloaded by the printer; the URL must be reachable from the printer's network
WIDTH number Yes Physical width (mm)
X_MARGIN number No* X margin (mm); defaults to 0 when omitted
Y_MARGIN number No* Y margin (mm); defaults to 0 when omitted
mode int No* Color/print mode, see table below; defaults to 5 (color only) when omitted

* Defaults are used when omitted.

mode Values

mode Description
1 White-Base + Color
2 Color + White
3 Color + White + Color
4 Direct White
5 Color Only (default)

Request Examples

{ "CMD_ID": "01", "IMG_URL": "http://192.168.1.20:8080/jobs/a.png", "WIDTH": 100 }
{ "CMD_ID": "01", "IMG_URL": "file:///opt/jobs/a.png", "WIDTH": 100, "X_MARGIN": 0, "Y_MARGIN": 0, "mode": 5 }

Response Parameters

Name Type Description
CMD_ID string "01"
code int 0 indicates the task was accepted
msg string Hint message

Response Examples

Accepted Successfully

{ "CMD_ID": "01", "code": 0, "msg": "Print command dispatched successfully" }

Acceptance Failed

{ "CMD_ID": "01", "code": -1, "msg": "File does not exist" }
{ "CMD_ID": "01", "code": -1, "msg": "Device busy" }
{ "CMD_ID": "01", "code": -1, "msg": "Device not connected" }

Acceptance Validation Flow

Before acceptance, validate in order: file (local path must exist) → device (must be connected and not busy). If either fails, the response is returned immediately and the RIP/printing flow is not entered.

Note: A success response only means the task has been accepted. Poll print progress with CMD_ID=03; poll task status with CMD_ID=00, TYPE=2.


If the device encounters an unsolvable problem during debugging, contact the cloud-printing owner to troubleshoot and find a solution. Contact details are as follows:

  • Phone: 137-5177-4454 (WeChat same number)
  • Email: info@ColorPark.cn