Print Task Dispatch: Once a third-party platform sends a print task to a designated device via an API, the Open Platform automatically dispatches it to the device's terminal software. Offline task delivery is supported; the terminal software will automatically receive and execute the task as soon as it comes online.
Note: When using fully self-service equipment, this interface will be invoked. The parameters will include lane information, and the device will automatically complete the printing operation for the products in the specified lanes.
Interface Information
| API Endpoint | https://www.colorpark.cn/api/Printer/mulPrint |
|---|---|
| Request Method | POST |
Request Parameters (Single Order Printing)
| Parameter Name | Parameter Value (Example) | Data Type | Required | Description | | ---- | ---- | :----: | ---- | | printer_id | 500001 | string | Required | The unique ID assigned to the printer; each printer is assigned a distinct number. | | once | 8305 | string | Required | A random value used during encryption to generate the signature. | | time | 1646790335 | string | Required | The timestamp used during encryption to generate the signature. | | sign | 9ce3ce7a3fccaf3d7715bd7e9bb1dc1c | string | Required | The generated signature; for the generation method, please refer to the "Generating Signatures" section within the Underlying Methods [Basic Support] documentation. | | order_id | 164679033555822 | string | Required | The order ID from the third-party platform; generated by the third-party platform, with a maximum accepted length of 32 characters. | | name | Phone Case | string | Required | The product name from the third-party platform; generated by the third-party platform, with a maximum accepted length of 32 characters. | | file | https://img.colorpark.cn/api/render/36531651306594235.png | string | Required | The URL of the image to be printed; the image is generated by the third-party platform. The URL accepts a maximum length of 255 characters and supports JPG, PNG, and TIF formats (JPG and PNG are recommended). | | file_bgc | https://img.colorpark.cn/back/6167751754907026663.png | string | Optional | The URL of the background effect image displayed on the printing progress bar. The URL accepts a maximum length of 255 characters and supports JPG and PNG formats (JPG and PNG are recommended). This feature is supported only on select printer models; please consult with technical personnel for confirmation. | | width | 185 | string | Required | The width of the image to be printed, in millimeters (mm). | | height | 140 | string | Required | The height of the image to be printed, in millimeters (mm). | | left | 0 | string | Required | | left | 0 | string | Required | Left margin of the print starting point (in mm) | | top | 0 | string | Required | Top margin of the print starting point (in mm) | | channel_type | 1 | string | Optional | The currency type placed in the channels: set to 1 if both channels contain the same currency; set to 2 if the two channels contain two different currencies. | | channel | 1 | string | Optional | The channel containing the commemorative coin: set to 1 for Channel 1, or 2 for Channel 2. If both channels contain the same currency, this value can remain at 1. | | white_ink | 1 | string | Optional | Whether white ink is required: 0 for no white ink, 1 for printing with white ink, 2 for printing with a spot color. | | callback | http://www.abc.com/api/callback | string | Optional | The callback URL for a third-party system to receive print notifications (e.g., print start, print completion, print cancellation, or print failure notifications). |
Request Parameters (Batch Printing of Multiple Orders)
Note: If orders for different products need to be printed simultaneously, the following parameters must be used. For the initial invocation, please contact the official support team to register the device fixture. Product identifiers can be obtained by calling the [Query Products for a Specified Fixture] API interface.【unique】
| Parameter Name | Parameter Value (Example) | Data Type | Required | Description | | ---- | ---- | :----: | ---- | | printer_id | 500001 | string | Required | The unique ID assigned to the printer; each printer is assigned a distinct number. | | once | 8305 | string | Required | A random value used during the encryption process to generate the signature. | | time | 1646790335 | string | Required | The timestamp used during the encryption process to generate the signature. | | sign | 9ce3ce7a3fccaf3d7715bd7e9bb1dc1c | string | Required | The generated signature; for details on the generation method, please refer to the "Generating Signatures" section within the Underlying Methods [Basic Support] documentation. | | order_id | 164679033555822 | string | Required | The order ID from the third-party platform; generated by the third-party platform, with a maximum accepted length of 32 characters. | | name | Phone Case | string | Required | The product name from the third-party platform; generated by the third-party platform, with a maximum accepted length of 32 characters. | | file | https://img.colorpark.cn/api/render/36531651306594235.png | string | Required | The URL of the image to be printed; the image is generated by the third-party platform. The URL accepts a maximum length of 255 characters and supports JPG, PNG, and TIF formats (JPG and PNG are recommended). | | file_plt | https://rfccrm.colorpark.cn/colorcloud/plt/99a813cee03688dbe1c4958851c15e2a15d49586.plt | string | 可选 | Printer engraving file | | file_bgc | https://img.colorpark.cn/back/6167751754907026663.png | string | Optional | The background effect image displayed on the print progress bar. The URL accepts a maximum length of 255 characters and supports JPG and PNG formats (JPG and PNG are recommended). This feature is supported only on select printer models; please consult with technical staff for confirmation. | | white_ink | 1 | string | Optional | Specifies whether white ink is required: 0 = Do not print white ink; 1 = Print white ink; 2 = Print spot color. | | is_merge | 1 | string | Required | Indicates whether this is a merged order (part of a batch): 0 = No. | | 1: Indicates a merged print order | | unique | RefrigeratorMagnet | string | Required | Unique identifier for the product | | quantity | 1 | string | Required | The print quantity for the product in the current order | | callback | http://www.abc.com/api/callback | string | Optional | The callback URL for a third-party system to receive print notifications (e.g., print started, print completed, print cancelled, print failure) |
Return Results
| Parameter Name | Sub-parameter Name | Data Type | Parameter Value (Example) | Description |
|---|---|---|---|---|
| code | string | 0 | Status code of the return result; 0 indicates success, 1 indicates failure. | |
| msg | string | Submission Successful | Description of the return result (e.g., "Submission Successful"). | |
| data | taskid | string | 20000196 | Unique identifier for the print task. |
| order_id | string | 164679033555822 | Order ID from the third-party platform; generated by the third-party platform (maximum length: 32 characters). | |
| status | string | 0 | Status of the print task: 0: Waiting to Print; 1: Printing; 2: Print Complete; 3: Print Cancelled; 4: Print Error. |
callback Callback Notification
Request Method:post
Request Parameters:
| Parameter | Type | Example | Description |
|---|---|---|---|
| type | string | printing | printing: Printing, finish: Printing complete, cancel: Cancel printing, pause: Pause printing, failure: Printing failed, shipped: Shipment complete |
| taskid | int | 10041 | Task ID |
| printer_id | int | 1000926 | Device Number |
| once | int | 0254 | Random Number |
| time | int | 1778048444 | time |
| sign | string | 06caec435ebbf494e8ed73fdc5daa0a8 | sign |
| order_id | string | 1844398 | Order ID |
| status | 1 | string | Print Status: 1 - Printing , 2 - Print Complete , 3 - Print Cancelled , 4 - Print Paused , 5 - Print Failed , 6 - Shipment Complete |
| msg | Printing | string | hint |
Return Results
success
If you encounter any unresolved issues during the device commissioning process, please contact the Cloud Printing Support Team for troubleshooting assistance and resolution. Contact details are as follows: Phone: 137-5177-4454 (Same number for WeChat) Email: info@ColorPark.cn