api/labels/enqueue
Less than 1 minute
api/labels/enqueue
Description
Queue a provided image file for printing via the print application.
Request
- Method:
POST
- Content Type:
application/json
- URL:
https://api.gosweetspot.com/api/labels/enqueue
Headers
- access_key : your unqiue api key provided by GSS.
- site_id : which site you are requesting action for.
Parameters
The body of the message should be sent as an Json object.
Parameter | Type | Description |
---|---|---|
copies | integer | Number of copies to print. |
image | string | Base64 string of byte array of image file. Supported format is png. The file size should be 1350px by 1175px. |
printtoprinter | string | Optional, if not supplied, the access_key profile printer is used. |
Return format
A string text of response message.
Errors
Error messages will range in the below:
- Supplied document stream does not represent an image.
- Print job sent.
- Print job queued.
- API Key not associated with a valid printer.
Request example
curl --location 'https://api.gosweetspot.com/api/labels/enqueue' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json' \
--data '{
"Copies": 1,
"Image": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUN1akNDQWlPZ0F3SUJBZ0lKQU02VEt0b09KSWpGTUEwR0NT",
"PrintToPrinter": "SMITH-PC >> ZDESIGNER LP 2844 (3227)"
}'
Response example
Print job sent