api/labels
About 1 min
api/labels
Description
Get the shipment labels in the requested format, png or pdf.
Request
- Method:
GET
- Content Type:
application/json
- URL:
https://api.gosweetspot.com/api/labels
Headers
- access_key : your unqiue api key provided by GSS.
- site_id : which site you are requesting action for.
Parameters
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/api/labels?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..."
]