api/labels/download
About 1 min
api/labels/download
Description
Get shipment labels in the requested format.
Request
- Method:
GET
- Content Type:
application/json
- URL:
https://api.gosweetspot.com/api/labels/download
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 | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
format | string | optional - available formats are as below. If not supplied, the default is LABEL_PNG_100X175 The 100x150 sizing is presently experimental and not available across all carriers
| ||||||||||||||||
rotate | boolean | optional - if the label orientation requires 180 degree rotation | ||||||||||||||||
connote | string | shipment consignment number to download |
Return format
An array of base64 encoded binary:
- In the case of multi part shipments, the PNG format will return a binary block per part.
- In the case of PDF, all parts are returned on a single multi page pdf.
Request example
curl --location 'https://api.gosweetspot.com/labels/download?format=label_png&connote=ABA0010054' \
--header 'access_key;' \
--header 'site_id;' \
--header 'Content-Type: application/json'
Response example
Binary blocks below have been trimmed for presentation.
[
"iVBORw0KGgoAAAANSUhEUgAABUYAAAMHCAYAAAD1lY2SAAAAAXNS...",
"iVBORw0KGgoAAAANSUhEUgAABUYAAAMHCAYAAAD1lY2SMAAA7DAc...",
"iVBORw0KGgoAAAANSUhEUgAABUYAAAMHCAlSURBVHhe7P0J9GXXl..."
]