Skip to main content

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

ParameterTypeDescription
formatstring 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
LABEL_PDFlabel is presented on an A4 page
LABEL_PNG_100X175label is presented as a PNG image with dimension 100mm x 175mm
LABEL_PNG_100X150label is presented as a PNG image with dimension 100mm x 150mm
LABEL_PDF_100X175label is presented as a PDF with dimension 100mm x 175mm
LABEL_PDF_100X150label is presented as a PDF with dimension 100mm x 150mm
LABEL_ZPL_100X150label is presented as a 200DPI ZPL with dimension 100mm x 150mm
LABEL_ZPL_100X150_300DPIlabel is presented as a 300DPI ZPL with dimension 100mm x 150mm
LABEL_PDF_LABELOPElabel is presented as a PDF Labelope. Rotation is not supported
USER_CONFIGUREDlabel is presented as a PDF when User's Printing Setting is PDF file, or a PRN file is presented if User's Printing Setting is GoPrint - PRN Download
GOPRINT_PRNPRN file is presented
rotatebooleanoptional - if the label orientation requires 180 degree rotation
connotestringshipment 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..."
]
Last update: