Code0 LogoCodeZero
GLS Action

Datatypes

All data types registered by the GLS Action — field references and descriptions.

GLS Action Types

The GLS Action registers the following data types with the Hercules platform. These types are used as inputs and outputs of the GLS functions and can be referenced in your flows.


GLS_ADDRESS

Represents a physical address used for consignee, shipper, and return addresses.

Used by: GLS_CONSIGNEE, GLS_SHIPPER, GLS_SHIPMENT_SERVICE (Exchange, DeliveryAtWork, etc.)

FieldTypeRequiredConstraintsDescription
Name1stringYesmax 40Primary name (person or company)
Name2stringNomax 40Additional name line (e.g. department)
Name3stringNomax 40Additional name line (e.g. c/o)
CountryCodestringYesmax 2ISO alpha-2 country code (e.g. DE, FR)
ProvincestringNomax 40State or province
CitystringYesmax 40City name
StreetstringYesmin 4Street name
StreetNumberstringNomax 40House/building number
ContactPersonstringNomin 6, max 40Contact person name
FixedLinePhonenumberstringNomin 4, max 35Landline phone number
MobilePhonenumberstringNomin 4, max 35Mobile phone number
eMailstringNomax 80Email address
ZIPCodestringYesmax 10Postal/ZIP code

GLS_CONSIGNEE

Represents the recipient of a shipment.

Used by: GLS_SHIPMENT

Linked types: GLS_ADDRESS

FieldTypeRequiredConstraintsDescription
ConsigneeIDstringNomax 40Your internal customer/consignee ID
CostCenterstringNomax 80Cost center for billing
Category"BUSINESS" | "PRIVATE"NoType of recipient
AddressSchemaGLS_ADDRESSYesPhysical delivery address

GLS_SHIPPER

Represents the sender of a shipment.

Used by: GLS_SHIPMENT, action configuration

Linked types: GLS_ADDRESS

FieldTypeRequiredDescription
AddressSchemaGLS_ADDRESSNoPrimary shipper address
AlternativeShipperAddressGLS_ADDRESSNoAlternative address to print on the label

Note: When used in the configuration (shipper), the action automatically includes the ContactID from the contact_id configuration value.


GLS_UNIT_SERVICE

An optional array of value-added services applied to an individual shipment unit (parcel).

Used by: GLS_SHIPMENT_UNIT

Each element is an object with one or more of the following optional fields:

Service fieldDescription
CashCash on delivery — Reason (max 160), Amount (min 1), Currency (3 chars)
AddonLiabilityAdditional liability insurance — Amount, Currency, ParcelContent (max 255)
HazardousGoodsHazardous goods declaration — array of { Weight, GLSHazNo (max 8) }
ExWorksEx-works shipping terms
LimitedQuantitiesLimited quantities of dangerous goods — optional Weight

GLS_SHIPMENT_UNIT

Represents a single parcel within a shipment. A shipment may contain multiple units.

Used by: GLS_SHIPMENT, GLS_SHIPMENT_WITHOUT_SERVICES

Linked types: GLS_UNIT_SERVICE

FieldTypeRequiredConstraintsDescription
WeightnumberYes0.10–99 kgWeight of the parcel
ShipmentUnitReferencestringNomax 40Your internal parcel reference
PartnerParcelNumberstringNomax 50Partner-assigned number
Note1stringNomax 50Label note line 1
Note2stringNomax 50Label note line 2
ServiceGLS_UNIT_SERVICENoUnit-level value-added services

GLS_SHIPMENT_SERVICE

An optional array of shipment-level services. Shipment creation functions automatically populate this based on which function you call.

Used by: GLS_SHIPMENT

Each element is an object with one of the following service fields:

ServiceParametersDescription
ShopDeliveryParcelShopID (max 50)Delivery to a GLS Parcel Shop
ShopReturnNumberOfLabels, ReturnQR?Return from a Parcel Shop
ExchangeAddressSchema (GLS_ADDRESS), ExpectedWeight?Exchange delivery and pickup
DeliveryAtWorkRecipientName, Building, Floor, Room?, Phonenumber?, AlternateRecipientName?Workplace delivery
DepositPlaceOfDeposit (max 121)Deposit without signature
IdentPinPIN (max 4), Birthdate?PIN-based identity check
IdentBirthdate, Firstname, Lastname, Nationality (max 2)Full identity check
PickAndShipPickupDateGLS picks up from consignee
FlexDeliveryServiceRecipient can redirect delivery
SignatureServiceSignature required on delivery
Guaranteed24Service24-hour guaranteed delivery
AddresseeOnlyServiceDelivery to named addressee only
TyreServiceTyre/wheel delivery service
EOBEnd of Business (next working day)
SaturdayServiceSaturday delivery
Saturday1000ServiceSaturday by 10:00
Saturday1200ServiceSaturday by 12:00

GLS_SHIPMENT

The complete shipment object including all services.

Used by: GLS_VALIDATE_SHIPMENT_REQUEST_DATA

Linked types: GLS_CONSIGNEE, GLS_SHIPPER, GLS_SHIPMENT_UNIT, GLS_SHIPMENT_SERVICE, GLS_ADDRESS

FieldTypeRequiredDescription
Product"PARCEL" | "EXPRESS"YesShipment product type
ConsigneeSchemaGLS_CONSIGNEEYesRecipient details
ShipperSchemaGLS_SHIPPERYesSender details
ShipmentUnitGLS_SHIPMENT_UNIT[]YesArray of parcels (min 1)
ServiceGLS_SHIPMENT_SERVICENoShipment-level services
ShipmentReferencestring (max 40)NoYour internal shipment reference
ShipmentDatedateNoShipment date (defaults to today)
IncotermCodeinteger (max 99)NoInternational commerce terms code
Identifierstring (max 40)NoAdditional identifier
ExpressAltDeliveryAllowedbooleanNoAllow alternative delivery for express shipments
Carrier"ROYALMAIL"NoOverride carrier (UK only)
Return.AddressSchemaGLS_ADDRESSNoAddressSchema for return shipments

GLS_SHIPMENT_WITHOUT_SERVICES

The shipment object without the Service field. Used as input to all shipment creation functions — the service is added automatically based on which function you call.

Linked types: GLS_SHIPMENT

Same fields as GLS_SHIPMENT except Service is omitted.


GLS_PRINTING_OPTIONS

Configures how shipping labels are generated.

FieldTypeRequiredDescription
ReturnLabels.TemplateSetenumYesLabel template to use
ReturnLabels.LabelFormatenumYesOutput file format
useDefaultstringNoIf set to "Default", uses the default printing options configured in GLS instead of the specified ones
DefinePrinter.LabelPrinterstringNoSpecify the printer name, only backend printers are valid
DefinePrinter.DocumentPrinterstringnoSpecify the document printer name, only backend printers are valid

Template sets: NONE, D_200, PF_4_I, PF_4_I_200, PF_4_I_300, PF_8_D_200, T_200_BF, T_300_BF, ZPL_200, ZPL_200_TRACKID_EAN_128, ZPL_200_TRACKID_CODE_39, ZPL_200_REFNO_EAN_128, ZPL_200_REFNO_CODE_39, ZPL_300, ZPL_300_TRACKID_EAN_128, ZPL_300_TRACKID_CODE_39, ZPL_300_REFNO_EAN_128, ZPL_300_REFNO_CODE_39

Label formats: PDF, ZEBRA, INTERMEC, DATAMAX, TOSHIBA, PNG


GLS_RETURN_OPTIONS

Controls whether the GLS API includes print data and routing info in the response.

FieldTypeDefaultDescription
ReturnPrintDatabooleantrueInclude base64-encoded label in response
ReturnRoutingInfobooleantrueInclude routing information in response

Set both to false if you only need the TrackID and don't need the label data immediately.


GLS_CUSTOM_CONTENT

Customizes what appears on the printed shipping label.

FieldTypeRequiredDescription
CustomerLogostringYesBase64-encoded logo image
BarcodeContentType"TRACK_ID" | "GLS_SHIPMENT_REFERENCE"YesWhat to encode in the custom barcode
BarcodestringNoCustom barcode value
BarcodeType"EAN_128" | "CODE_39"NoBarcode symbology
HideShipperAddressbooleanNoHide shipper address on label

GLS_CREATE_PARCELS_RESPONSE

The response returned by all shipment creation functions.

FieldTypeDescription
CreatedShipment.ShipmentReferencestring[]Your shipment references
CreatedShipment.ParcelData[].TrackIDstring (8 chars)GLS tracking ID — use to track or cancel
CreatedShipment.ParcelData[].ParcelNumberstringGLS parcel number
CreatedShipment.ParcelData[].Barcodes.Primary2Dstring2D barcode data
CreatedShipment.ParcelData[].Barcodes.Secondary2DstringSecondary 2D barcode
CreatedShipment.ParcelData[].Barcodes.Primary1Dstring1D barcode data
CreatedShipment.ParcelData[].Barcodes.Primary1DPrintbooleanWhether to print 1D barcode
CreatedShipment.ParcelData[].RoutingInfo.TourstringDelivery tour identifier
CreatedShipment.ParcelData[].RoutingInfo.FinalLocationCodestringFinal delivery depot
CreatedShipment.ParcelData[].RoutingInfo.HubLocationstringHub location code
CreatedShipment.ParcelData[].RoutingInfo.LastRoutingDatedateLast valid routing date
CreatedShipment.PrintData[].DatastringBase64-encoded label
CreatedShipment.PrintData[].LabelFormatenumFormat of the label
CreatedShipment.CustomerIDstringGLS customer identifier
CreatedShipment.PickupLocationstringDepot where parcel will be picked up
CreatedShipment.GDPRstring[]GDPR-related references

GLS_CANCEL_SHIPMENT_REQUEST_DATA

Input for the cancelShipment function.

FieldTypeRequiredDescription
TrackIDstringYesGLS tracking ID of the shipment to cancel

GLS_CANCEL_SHIPMENT_RESPONSE_DATA

Response from the cancelShipment function.

FieldTypeDescription
TrackIDstringThe tracking ID that was cancelled
result"CANCELLED" | "CANCELLATION_PENDING" | "SCANNED" | "ERROR"Result of the cancellation

GLS_ALLOWED_SERVICES_REQUEST_DATA

Input for the getAllowedServices function.

FieldTypeRequiredDescription
Source.CountryCodestring (max 2)YesOrigin country code
Source.ZIPCodestring (max 10)YesOrigin ZIP/postal code
Destination.CountryCodestring (max 2)YesDestination country code
Destination.ZIPCodestring (max 10)YesDestination ZIP/postal code
ContactIDstringNoGLS contact ID (overrides config)

GLS_ALLOWED_SERVICES_RESPONSE_DATA

Response from the getAllowedServices function.

FieldTypeDescription
AllowedServices[]arrayList of services or products available for the route
AllowedServices[].ServiceNamestringName of an available service
AllowedServices[].ProductNamestringName of an available product

Each element contains either ServiceName or ProductName, not both.


GLS_END_OF_DAY_REQUEST_DATA

Input for the getEndOfDayReport function.

FieldTypeRequiredDescription
dateISO date stringYesThe date for which to retrieve the report (e.g. "2025-01-15")

GLS_END_OF_DAY_RESPONSE_DATA

Response from the getEndOfDayReport function.

FieldTypeDescription
Shipments[].ShippingDateISO dateDate the shipment was dispatched
Shipments[].Product"PARCEL" | "EXPRESS"Product type
Shipments[].ConsigneeSchema.AddressSchemaGLS_ADDRESSRecipient address
Shipments[].ShipperSchema.ContactIDstringGLS contact ID of shipper
Shipments[].ShipperSchema.AlternativeShipperAddressGLS_ADDRESSAlternative shipper address
Shipments[].ShipmentUnit[].TrackIDstringTracking ID
Shipments[].ShipmentUnit[].WeightstringParcel weight
Shipments[].ShipmentUnit[].ParcelNumberstringGLS parcel number

GLS_UPDATE_PARCEL_WEIGHT_REQUEST_DATA

Input for the updateParcelWeight function. Provide at least one identifier (TrackID, ParcelNumber, ShipmentReference, ShipmentUnitReference, or PartnerParcelNumber).

FieldTypeRequiredConstraintsDescription
TrackIDstringNomax 8GLS tracking ID
ParcelNumbernumberNomax 999999999999GLS parcel number
ShipmentReferencestringNomax 40Your shipment reference
ShipmentUnitReferencestringNomax 40Your parcel unit reference
PartnerParcelNumberstringNomax 50Partner parcel number
WeightnumberYesmin 0.10New weight in kilograms

GLS_UPDATE_PARCEL_WEIGHT_RESPONSE_DATA

Response from the updateParcelWeight function.

FieldTypeDescription
UpdatedWeightstringConfirmed updated weight value

GLS_REPRINT_PARCEL_REQUEST_DATA

Input for the reprintParcel function. Provide at least one identifier.

FieldTypeRequiredConstraintsDescription
TrackIDstringNomax 8GLS tracking ID
ParcelNumbernumberNomax 999999999999GLS parcel number
ShipmentReferencestringNomax 40Your shipment reference
ShipmentUnitReferencestringNomax 40Your parcel unit reference
PartnerParcelNumberstringNomax 50Partner parcel number
CreationDateISO date stringYesOriginal shipment creation date
PrintingOptions.ReturnLabels.TemplateSetenumYesNONE, ZPL_200, ZPL_300Label template
PrintingOptions.ReturnLabels.LabelFormatenumYesPDF, ZEBRA, PNG, PNG_200Output format

GLS_REPRINT_PARCEL_RESPONSE_DATA

Response from the reprintParcel function. Same structure as GLS_CREATE_PARCELS_RESPONSE without the ShipmentReference and GDPR fields.

FieldTypeDescription
CreatedShipment.ParcelData[].TrackIDstringTracking ID
CreatedShipment.ParcelData[].ShipmentUnitReferencestring[]Unit references
CreatedShipment.ParcelData[].ParcelNumberstringParcel number
CreatedShipment.ParcelData[].BarcodesobjectBarcode data
CreatedShipment.ParcelData[].RoutingInfoobjectRouting details
CreatedShipment.PrintData[].DatastringBase64-encoded label
CreatedShipment.PrintData[].LabelFormatenumPDF, ZEBRA, PNG, PNG_200
CreatedShipment.CustomerIDstringGLS customer identifier
CreatedShipment.PickupLocationstringDepot pickup location
CreatedShipment.GDPRstring[]GDPR references

GLS_VALIDATE_SHIPMENT_REQUEST_DATA

Input for the validateShipment function.

FieldTypeRequiredDescription
ShipmentGLS_SHIPMENTYesThe complete shipment to validate

GLS_VALIDATE_SHIPMENT_RESPONSE_DATA

Response from the validateShipment function.

FieldTypeDescription
successbooleanWhether the shipment passed all validation rules
validationResult.Issues[]arrayList of validation issues (empty if valid)
validationResult.Issues[].RulestringName of the failed validation rule
validationResult.Issues[].LocationstringPath in the data where the issue was found
validationResult.Issues[].Parametersstring[]Additional details about the issue

Type dependency diagram

GLS_SHIPMENT_WITHOUT_SERVICES
    ├── ConsigneeSchema: GLS_CONSIGNEE
    │       └── AddressSchema: GLS_ADDRESS
    ├── ShipperSchema: GLS_SHIPPER
    │       ├── AddressSchema: GLS_ADDRESS
    │       └── AlternativeShipperAddress: GLS_ADDRESS
    └── ShipmentUnit[]: GLS_SHIPMENT_UNIT
            └── Service: GLS_UNIT_SERVICE

GLS_PRINTING_OPTIONS
    └── ReturnLabels: { TemplateSet, LabelFormat }

GLS_CUSTOM_CONTENT
    └── { CustomerLogo, BarcodeContentType, Barcode, BarcodeType, HideShipperAddress }

GLS_RETURN_OPTIONS
    └── { ReturnPrintData, ReturnRoutingInfo }

─── Shipment function ──────────────────────────────────────────────
[GLS_SHIPMENT_WITHOUT_SERVICES + GLS_PRINTING_OPTIONS + ...] → GLS_CREATE_PARCELS_RESPONSE

On this page