Query Specified Print Task
Query this task — use the task number to view its queue position, print progress, and its creation, start, and completion times.
What do you need to prepare before starting?
Prepare an onboarded device, the device ID and secret key, an accessible image URL, and the actual print dimensions. Keep the secret key on the server side; do not embed it in a web page.
Submission success does not mean printing is complete. Save the returned task number; only if the device is set to secondary confirmation do you need to additionally call "Start Printing."
To query a print task, a third-party platform can call the interface to query the open platform for details of a specified print task; the platform returns the related task and order status synchronously.
Interface Information
| Item | Value |
|---|---|
| Endpoint | https://www.colorpark.cn/api/Printer/getTask |
| Method | POST |
Request Parameters
| Parameter | Sample Value | Data Type | Required | Description |
|---|---|---|---|---|
| printer_id | 500001 | string | Yes | The unique ID assigned to the printer; each print job is assigned a distinct ID. |
| once | 8305 | string | Yes | A random value used when generating the signature (nonce). |
| time | 1646790335 | string | Yes | The timestamp used when generating the signature. |
| sign | 9ce3ce7a3fccaf3d7715bd7e9bb1dc1c | string | Yes | The generated signature. For the generation method, refer to the "Signature Generation" section in the Underlying Methods [Basic Support] document. |
| taskid | 20000196 | string | Yes | The unique ID assigned to the print task. |
Response Result
| Field | Data Type | Sample Value | Description |
|---|---|---|---|
| code | string | 0 | Result status code: 0 for success, 1 for failure. |
| msg | string | Submission successful | Result description, e.g., "Submission successful". |
| data.taskid | string | 20000196 | The unique ID of the print task. |
| data.printer_id | string | 500001 | The unique ID assigned to the printer. |
| data.order_id | string | 164679033555822 | The order number from the third-party platform, generated by the third party; accepts up to 32 characters. |
| data.status | string | 0 | Print task status: 0 = waiting to print, 1 = printing, 2 = print complete, 3 = canceled, 4 = print fault. |
| data.name | string | Pearl Milk Tea | Product name, e.g., Pearl Milk Tea, Boba Milk Tea. |
| data.file | string | https://img.colorpark.cn/api/render/80301001651287933588.png | The image URL. |
| data.callback | string | http://www.abc.com/api/callback | The callback URL of the client (party A) system for receiving print notifications — e.g., print-start, print-complete, print-cancel, and print-fault notifications. |
| data.create_time | string | 2022-03-09 14:19:30 | The time the print task was created. |
| data.start_time | string | 2022-03-09 14:19:30 | The time printing of the task started. |
| data.finish_time | string | 2022-03-09 14:19:30 | The time printing of the task completed. |
If a device encounters an unsolvable issue during debugging, please contact the cloud-printing lead to troubleshoot and resolve it. Contact details: Phone: 137-5177-4454 (WeChat same number) Email: info@ColorPark.cn