GLS ShipIT
GLS ShipIT - REST services
Loading...
Searching...
No Matches
Processing shipments

Accessing the REST service

The endpoints for the centrally hosted services can be obtained from your primary GLS contact and will be given with your credentials for the Service.

If you are connecting to a locally installed GLS ShipIT, you have to adapt the URL to point to the host (and port) in your network where the GLS ShipIT backend is running. E.g. https://10.10.10.10:8443/backend/rs/shipments The web service request/response content is encoded using UTF-8.

All REST service operations within this port are about creating or updating shipments. A shipment is a selection of one or more parcels that are collected at address A and delivered to address B. If several parcels should be sent from address A to address B and those parcels should share the same services, they can be combined to a shipment.

Available REST service operations

Webservices Examples

The pages below contain examples of webservice calls and error responses:

createParcels (F-114)

This operation creates a shipment that contains one or more shipment units. The operation takes an instance of eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.ShipmentRequestData The input object is split into several sections allowing you to specify Shipper data, Consignee data, Shipment unit data, products and services, Printing options as well as some Custom content like an extra barcode or image that should be printed on the label.

The REST method is available at sub-path / with http request method POST
Parameter Mandatory Location in Request Description
shipmentRequest TRUE request body The eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.ShipmentRequestData with the shipment parameters.


The parts of the request are explained in the following sections in more detail:

Shipment data

When you are creating a shipment, you can specify several attributes on the shipment level. These are:

  • ShipmentReference - You can provide one or more identifiers for this shipment.
  • ShippingDate - Provide a date for the shipment. If no value is provided, the next working day is picked automatically.
  • IncotermCode - If you ship between different commercial zones, you have to specify the inco term for this shipment.
  • Identifier - Attribute for storing a person in charge or a work station
  • Middleware - Attribute for storing Partner ERP System
  • Product - The product group in which you shipment fits (parcel, express or freight). GLS ShipIT will automatically choose the best product (small parcel or euro business parcel) for your shipment based on the defined group (depending on the parcel weight, pickup and delivery address)
  • ExpressAltDeliveryAllowed - The user has a possibility to deactivate the alternative delivery for Express shipment.
  • Consignee data
  • Shipper data
  • Shipment unit data
  • Service - The services that shall be booked for this shipment
{
"Shipment": {
"ShipmentReference": ["0363cbed-36ff-4394-b150-5fdffa44b12e"],
"ShippingDate": "2018-11-16",
"IncotermCode": "10",
"Identifier":"userTestId",
"Middleware":"Primavera",
"Product": "PARCEL",
...
}
}


Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Customer reference number ShipmentReference 40 alphanumeric Optional - Reference for this consignment of parcels
Shipping date ShippingDate 10 alphanumeric YYYY-MM-DD Optional - Date for the shipment
Incoterm IncotermCode 2 alphanumeric 10, 20, 30, etc. Optional Incoterm for this shipment. Represented by 2 digits
Identifier Identifier 40 alphanumeric Optional - Person who started the parcel creation
Middleware Middleware 40 alphanumeric Mandatory - ERP System
Product Group Product 7 alphanumeric Mandatory Parcel, Express or Freight Please select one
Alternative delivery activation ExpressAltDeliveryAllowed 5 boolean Optional true or false Please select one
Consignee Consignee Mandatory - see section Consignee data
Shipper Shipper Mandatory - see section Shipper data
Shipment unit ShipmentUnit Mandatory - see section Shipment unit data
Services Services Optional - see section Services


Consignee data

The consignee is the person to which the shipment shall be sent. The consignee ID will be printed on the label if specified. The consignee address has to be specified within the request. The consignee category can be "BUSINESS" or "PRIVATE". If the field consignee category is omitted, the consignee will have no (empty) category.

In case of shipments with return services (pick&return, pick&ship, shopreturn) assigned, the consignee and the shipper data sections will automatically be switched on the return label. That means the consignee address, that you provide within your Webrequest will be used as pickup address on the return label. According to Pick&Ship and Pick&Return Service the following fields are mandatory: ContactPerson and FixedLinePhonenumber.

The consignee address can be specified as follows:

"Address": {
"Name1": "Max Mustermann",
"Name2": "Travel and Co",
"CountryCode": "DE",
"ZIPCode": "38106",
"City": "Braunschweig",
"Street": "Falkenbergstrasse",
"StreetNumber": "47",
"eMail": "max.mustermann@email.test",
"FixedLinePhonenumber": "004953112345",
"MobilePhoneNumber": "00491791234567"
}

The consignee category can be specified as follows:

"Consignee": {
"Category": "BUSINESS",
"Address": {...}
}

To provide an example of a consignee ID that should be printed on the label:

"Consignee": {
"ConsigneeID": "100",
"Address": {...}
}


Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Consignee identifier ConsigneeID 80 alphanumeric Optional - Identifier for the recipient of the parcels
Cost Center CostCenter 80 alphanumeric Optional - Delivery location cost center for Inbound
Consignee Category Category 8 alphanumeric CAPS LOCK Optional Only PRIVATE or BUSINESS Classifies consignee as 2B (BUSINESS) or 2C (PRIVATE) recipient
Consignee Address Address Mandatory - see section Address data for field details


Address data

Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Name1 Name1 40 alphanumeric Mandatory - Name of the consignee
Name2 Name2 40 alphanumeric Optional - Additional consignee name information
Name3 Name3 40 alphanumeric Optional - Additional consignee name information
Country code CountryCode 2 alphanumeric DE, AT, BE, FR, etc. Mandatory - Destination country of the shipment
Province Province 40 alphanumeric Optional - Province where the consignee's city is located in
ZIPCode ZIPCode 10 alphanumeric Mandatory - ZIP code of the consignee's city
City City 40 alphanumeric Mandatory - City of the consignee
Street Street 40 alphanumeric Mandatory > 3 Street name
Street number StreetNumber 40 alphanumeric Optional - Street number (if not part of the street)
eMail eMail 80 alphanumeric Optional - Email address of the consignee
Contact person ContactPerson 40 alphanumeric Optional > 5 Contact person to print on the label
Fixed phonenumber FixedLinePhonenumber 35 alphanumeric Optional > 3 Fixed line phone number of the consignee
Mobile MobilePhoneNumber 35 alphanumeric Optional > 3 Mobile phone number of the consignee


Shipper data

This section fulfills two purposes. It identifies the shipper and as such the address from where the shipment shall be collected. It also offers the possibility to use an alternative shipper address that shall be printed on the labels. As the shipper ID please provide the Contact ID that was provided to you by GLS.

In case of shipments with return services (pick&return, pick&ship, shopreturn) assigned, the shipper data section represents the delivery address on the return label. That is the shipper address, that you provide within your Webrequest and that will be taken as the address on the return label, where the parcel will be delivered to.

"Shipper": {
"ContactID": "2761234567",
"AlternativeShipperAddress": {
"Name1": "Logistics and More",
"CountryCode": "DE",
"ZIPCode": "65760",
"City": "Eschborn",
"Street": "Elly-Beinhorn-Strasse",
"StreetNumber": "1a",
"eMail": "logistics@more.test",
"FixedLinePhonenumber": "004961961234567"
}
}


Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Shipper identifier ContactID 20 alphanumeric Mandatory - Shipper identifier as given by GLS
Alternative address AlternativeShipperAddress - Address Optional - see section Address data
French customer reference FRAlphaCustomerReference 10 alphanumeric Optional Field length must be exactly 10 French alpha contact reference number


Shipment unit data

Within this section of the request you specify each shipment unit of your shipment.

A shipment unit can contain the following elements:

  • ReferenceNumber - You can provide one or more identifiers for this shipment unit.
  • Weight - The weight of the parcel
  • Service - Zero to many Services
Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Parcel reference ShipmentUnitReference 40 alphanumeric Optional - Reference to be given to the parcel
Parcel Weight Weight 10 decimal Mandatory > 0 Each minimum weight is specified by Shipper
Parcel note1 Note1 50 alphanumeric Optional - Notes added to the parcel (line 1)
Parcel note2 Note2 50 alphanumeric Optional - Notes added to the parcel (line 2)
Parcel services Service - Optional - see section Services for detailed fields
French parcel reference FRAlphaParcelReference 18 alphanumeric Optional Field length must be exactly 18 French alpha contact parcel reference
Track identifier TrackID 40 alphanumeric Optional - Identifier for the parcel. Used for a cancelShipment request
1D barcode number ParcelNumber - alphanumeric Optional - 1D barcode printed in the label


Services

You can define services that should apply to your shipment. For further information on the services currently available in your country please go to https://gls-group.eu and check the page of the desired country.

The following services can be assigned on the shipment unit level:

  • Cash
    "ShipmentUnit": [{
    ...
    "Service": [{
    "Cash": {
    "ServiceName": "service_cash",
    "Reason": "Your order 4711",
    "Amount": "12.09",
    "Currency": "EUR"
    }
    }
    ]
    }
    ]
  • AddonLiability
    "ShipmentUnit": [{
    ...
    "Service": [{
    "AddonLiability": {
    "ServiceName": "service_addonliability",
    "Amount": "5000",
    "Currency": "EUR"
    }
    }
    ]
    }
    ]
  • HazardousGoods
    "ShipmentUnit": [{
    ...
    "Service": [{
    "HazardousGoods": {
    "ServiceName": "service_hazardousgoods",
    "HazardousGood": [{
    "GLSHazNo": "7000004",
    "Weight": 1.2
    }
    ]
    }
    }
    ]
    }
    ]
  • ExWorks
    "ShipmentUnit": [{
    ...
    "Service": [{
    "ExWorks": {
    "ServiceName": "service_exworks"
    }
    }
    ]
    }
    ]

Those services may have different attributes for each shipment unit.

Services inside shipment unit can be combined like this:

  • Cash and AddonLiability
    "ShipmentUnit": [{
    ...
    "Service": [{
    "Cash": {
    "ServiceName": "service_cash",
    "Reason": "Bill is due",
    "Amount": "0.01",
    "Currency": "EUR"
    },
    "AddonLiability": {
    "ServiceName": "service_addonliability",
    "Amount": "5000",
    "Currency": "EUR",
    "ParcelContent": "some very good stuff"
    }
    }
    ]
    }
    ]
Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Cash service Cash
Name of the service ServiceName 80 alphanumeric service_cash Mandatory Parcel Shipment unit Must use this fixed value for service name
Cash reason Reason 160 alphanumeric Mandatory - Reason why the cash service was added to the parcel
Cash amount Amount - decimal Mandatory - Cash amount (numeric value)
Cash currency Currency 3 alphanumeric EUR Mandatory - Cash currency code (ISO4217 -> 3 digits)
AddonLiability service AddonLiability
Name of the service ServiceName 80 alphanumeric service_addonliability Mandatory Parcel Shipment unit Must use this fixed value for service name
AddonLiability amount Amount - decimal Mandatory - Liability amount might differ per country, please liaise with your sales contact
AddonLiability currency Currency 3 alphanumeric EUR Mandatory - AddonLiability currency code (ISO4217 -> 3 digits)
Parcel description ParcelContent 255 alphanumeric Optional - Specify the parcel content
HazardousGoods service HazardousGoods
Name of the service ServiceName 80 alphanumeric service_hazardousgoods Mandatory Parcel Shipment unit Must use this fixed value for service name
HazardousGoods HazardousGoods - Hazardous good item attributes
Hazardous goods number GLSHazNo 8 alphanumeric Mandatory - Identifier for the hazardous goods type
HazardousGoods Weight Weight - decimal Mandatory > 0 Weight for the hazardous good shipped (numeric)
ExWorks service ExWorks
Name of the service ServiceName 80 alphanumeric service_exworks Mandatory Parcel Shipment unit Must use this fixed value for service name


The following services can be assigned on the shipment level:

  • ShopDelivery
    "Shipment": {
    ...
    "Service": [{
    "ShopDelivery": {
    "ServiceName": "service_shopdelivery",
    "ParcelShopID": "GLS_DE-2760238818"
    }
    }
    ]
    }
  • ShopReturn
    "Shipment": {
    ...
    "Service": [{
    "ShopReturn": {
    "ServiceName": "service_shopreturn",
    "NumberOfLabels": 10
    }
    }
    ]
    }
  • Intercompany
    "Shipment": {
    ...
    "Service": [{
    "Intercompany": {
    "ServiceName": "service_intercompany",
    "Address": {
    "Name1": "Hansi Meier",
    "CountryCode": "DE",
    "ZIPCode": "65760",
    "City": "Eschborn",
    "Street": "Helfmannpark 5"
    },
    "NumberOfLabels": 15
    }
    }
    ]
    }
  • Exchange
    "Shipment": {
    ...
    "Service": [{
    "Exchange": {
    "ServiceName": "service_exchange",
    "Address": {
    "Name1": "Hansi Meier",
    "CountryCode": "DE",
    "ZIPCode": "65760",
    "City": "Eschborn",
    "Street": "Helfmannpark 5"
    }
    }
    }
    ]
    }
  • DeliveryAtWork
    "Shipment": {
    ...
    "Service": [{
    "DeliveryAtWork": {
    "ServiceName": "service_deliveryatwork",
    "RecipientName": "Hansi Meier",
    "AlternateRecipientName": "Hilde Schmidt",
    "Building": "Haus A",
    "Floor": "2. Stock",
    "Room": "D234.22",
    "Phonenumber": "+49 800 111 0 333"
    }
    }
    ]
    }
  • Deposit
    "Shipment": {
    ...
    "Service": [{
    "Deposit": {
    "ServiceName": "service_deposit",
    "PlaceOfDeposit": "Under the doormat"
    }
    }
    ]
    }
  • Letterbox
    "Shipment": {
    ...
    "Service": [{
    "Deposit": {
    "ServiceName": "service_deposit",
    "PlaceOfDeposit" : "Letterbox"
    }
    }
    ]
    }
  • IdentPin
    "Shipment": {
    ...
    "Service": [{
    "IdentPin": {
    "ServiceName": "service_identpin",
    "PIN": "2342",
    "Birthdate": "1970-02-03"
    }
    }
    ]
    }
  • Ident
    "Shipment": {
    ...
    "Service": [{
    "Ident": {
    "ServiceName": "service_ident",
    "Birthdate": "1980-01-02",
    "Firstname": "Hansi Herbert",
    "Lastname": "Maier",
    "Nationality": {
    "CountryCode": "DE"
    }
    }
    }
    ]
    }
  • PickAndShip
    The consignee data must contain values for ContactPerson and FixedLinePhonenumber when this service is used.
    "Shipment": {
    ...
    "Service": [{
    "PickAndShip": {
    "ServiceName": "service_pickandship",
    "PickupDate": "2017-07-31"
    }
    }
    ]
    }
  • PickAndReturn
    The consignee data must contain values for ContactPerson and FixedLinePhonenumber when this service is used.
    "Shipment": {
    ...
    "Service": [{
    "PickAndReturn": {
    "ServiceName": "service_pickandreturn",
    "PickupDate": "2017-07-31"
    }
    }
    ]
    }
  • InboundLogistics
    In this case, please enter the supplier data in the shipper fields and the delivery address in the consignee fields.
    A reference number for a delivery location can be defined in the cost-center field.
    "Shipment": {
    ...
    "Consignee": {
    "ConsigneeID":"DE00",
    "CostCenter":"123456789",
    "Address": {
    ...
    "Service": [{
    "Service": {
    "ServiceName": "service_inbound"
    }
    }
    ]
    }
  • TyreService
    "Shipment": {
    ...
    "Service": [{
    "Service": {
    "ServiceName": "service_tyre"
    }
    }]
    }

All other services do not require specific attributes and can be assigned on the shipment level. If you e.g. want to have more possibilities to customise parcel delivery, you can book the FlexDeliveryService as follows:

"Shipment": {
...
"Service": [{
"Service": {
"ServiceName": "service_flexdelivery"
}
}
]
}

The same applies to Express shipments - these services do not require further information and can be added like stated underneath. Please note that parcels targeted to be delivered by the end of the business day do not need a dedicated service attached.

"Shipment": {
...
"Product": "EXPRESS",
...
"Service": [{
"Service": {
"ServiceName": "service_1000"
}
}
]
}


Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Other service Service
Name of the service ServiceName - alphanumeric service_name Must use the service name defined in DB
ShopDelivery service ShopDelivery
Name of the service ServiceName 80 alphanumeric service_shopdelivery Mandatory Parcel Shipment Must use this fixed value for service name
Parcel shop identifier ParcelShopID 50 alphanumeric {partnerID}-{local id} Mandatory - Specify parcel shop
ShopReturn service ShopReturn
Name of the service ServiceName 80 alphanumeric service_shopreturn Mandatory Parcel Shipment Must use this fixed value for service name
Amount of labels NumberOfLabels numeric Mandatory > 0 Specify amount of labels to print
Intercompany service Intercompany
Name of the service ServiceName 80 alphanumeric service_intercompany Mandatory Parcel Shipment Must use this fixed value for service name
Intercompany address Address Mandatory see section Address data
Amount of labels NumberOfLabels numeric Mandatory > 0 Specify amount of labels to print
Expected Weight ExpectedWeight - decimal Optional > 0 Expected weight of the returned shipment
Exchange service Exchange
Name of the service ServiceName 80 alphanumeric service_exchange Mandatory Parcel Shipment Must use this fixed value for service name
Exchange address Address Mandatory - see section Address data
Expected Weight ExpectedWeight - decimal Optional > 0 Expected weight of the returned shipment
DeliveryAtWork service DeliveryAtWork Add an expected weight of the returned shipment
Name of the service ServiceName 80 alphanumeric service_deliveryatwork Mandatory Parcel Shipment Must use this fixed value for service name
Name of the Recipient RecipientName 40 alphanumeric Mandatory - Person who is allowed to receive the parcel
AlternateRecipientName AlternateRecipientName 40 alphanumeric Optional - Alternative person who is allowed to receive the parcel
Building Building 40 decimal Mandatory - Building number
Floor Floor 40 decimal Mandatory - Floor number
Room Room 40 decimal Optional - Room number
Phonenumber Phonenumber 35 decimal Optional - Phone number of the contact person
Deposit service Deposit
Name of the service ServiceName 80 alphanumeric service_deposit Mandatory Parcel Shipment Must use this fixed value for service name
Place of deposit PlaceOfDeposit 121 Mandatory - Place where the driver can drop the parcel
Letterbox service Deposit
Name of the service ServiceName 80 alphanumeric service_deposit Mandatory Parcel Shipment Must use this fixed value for service name
Place of deposit PlaceOfDeposit 121 Letterbox/ Briefkasten/ etc. Mandatory - Expression for letterbox in the destination's language
IdentPin service IdentPin
Name of the service ServiceName 80 alphanumeric service_identpin Mandatory Parcel Shipment Must use this fixed value for service name
PIN PIN 4 alphanumeric Mandatory 4-digit PIN code that the consignee needs to enter
Birthdate Birthdate 10 date YYYY-MM-DD Mandatory < today Birthdate of the consignee
Ident service Ident
Name of the service ServiceName 80 alphanumeric service_ident Mandatory Parcel Shipment Must use this fixed value for service name
Birthdate Birthdate 10 date YYYY-MM-DD Mandatory < today Birthdate of the consignee
Firstname Firstname 40 alphanumeric Mandatory - First name of the consignee
Lastname Lastname 40 alphanumeric Mandatory - Last name of the consignee
Nationality Nationality 2 alphanumeric Mandatory CountryCode Nationality of the consignee
PickAndShip service PickAndShip
Name of the service ServiceName 80 alphanumeric service_pickandship Mandatory Parcel Shipment Must use this fixed value
PickupDate PickupDate 10 date YYYY-MM-DD Mandatory > today Date when parcel should be picked up at shipper
PickAndReturn service PickAndReturn
Name of the service ServiceName 80 alphanumeric service_pickandreturn Mandatory Parcel Shipment Must use this fixed value
PickupDate PickupDate 10 date YYYY-MM-DD Mandatory > today Date when parcel should be picked up at shipper
Inbound Logistics InboundLogistics
Name of the service ServiceName 80 alphanumeric service_inbound Mandatory Parcel Shipment Must use this fixed value for service name
Document Return Service DocumentReturnService
Name of the service ServiceName 80 alphanumeric service_documentreturn Mandatory Parcel Shipment (w/o attributes) Must use this fixed value for service name
Flex Delivery Service FlexDeliveryService
Name of the service ServiceName 80 alphanumeric service_flexdelivery Mandatory Parcel Shipment (w/o attributes) Must use this fixed value for service name
Guaranteed24 Service Guaranteed24Service
Name of the service ServiceName 80 alphanumeric service_guaranteed24 Mandatory Parcel Shipment (w/o attributes) Must use this fixed value for service name
AddresseeOnly Service AddresseeOnlyService
Name of the service ServiceName 80 alphanumeric service_addresseeonly Mandatory Parcel Shipment (w/o attributes) Must use this fixed value for service name
Tyre service TyreService
Name of the service ServiceName 80 alphanumeric service_tyre Mandatory Parcel/Express Shipment (w/o attributes) Must use this fixed value for service name
0800 Service 0800Service
Name of the service ServiceName 80 alphanumeric service_0800 Mandatory Express Shipment Must use this fixed value for service name
0900 Service 0900Service
Name of the service ServiceName 80 alphanumeric service_0900 Mandatory Express Shipment Must use this fixed value for service name
1000 Service 1000Service
Name of the service ServiceName 80 alphanumeric service_1000 Mandatory Express Shipment Must use this fixed value for service name
1200 Service 1200Service
Name of the service ServiceName 80 alphanumeric service_1200 Mandatory Express Shipment Must use this fixed value for service name
Saturday 1000 Service Saturday1000Service
Name of the service ServiceName 80 alphanumeric service_saturday_1000 Mandatory Express Shipment Must use this fixed value for service name
Saturday 1200 Service Saturday1200Service
Name of the service ServiceName 80 alphanumeric service_saturday_1200 Mandatory Express Shipment Must use this fixed value for service name
Saturday Service SaturdayService
Name of the service ServiceName 80 alphanumeric service_Saturday Mandatory Express (Euro) Shipment Must use this fixed value for service name
Delivery next working day (EOB)
Name of the service ServiceName Express No service needs to be added


If you want to send a shipment containing two shipment units (parcels) with FlexDeliveryService and CashService, you could use something like the following:

"Shipment": {
...
"ShipmentUnit": [{
"ShipmentUnitReference": ["Ref-Unit-0815"],
"Weight": 5.00,
"Service": [{
"Cash": {
"ServiceName": "service_cash",
"Reason": "Your order 4711",
"Amount": "230.81",
"Currency": "EUR"
}
}
]
}, {
"ShipmentUnitReference": ["Ref-Unit-0816"],
"Weight": 1.00,
"Service": [{
"Cash": {
"ServiceName": "service_cash",
"Reason": "Your order 4711",
"Amount": "12.09",
"Currency": "EUR"
}
}
]
}
],
"Service": [{
"Service": {
"ServiceName": "service_flexdelivery"
}
}
]
}

Not all of these services are available in all countries and not all of those services may be combined with each other. Please check online which services are available for your region on your local GLS website.

Products

Finding the right product for your shipment will be determined by GLS ShipIT. The only information you have to give: if you want to send a standard parcel or wish to speed up by using express. Depending on the country-relation (where to send your parcel) and the weight the respective shipment product will be calculated.

1) Parcels sent within a country are considered as BusinessParcel or ExpressParcel - dependent on the product type chosen.
Small, light products with a given size and weight will get a "Small" - BusinessSmallParcel

You can create a Request BusinessParcel like the following example:

POST https://localhost:8443/backend/rs/shipments
POST data:
{
"Shipment": {
"Product": "PARCEL",
"Consignee": {
"ConsigneeID": "276001",
"Address": {
"Name1": "Max",
"CountryCode": "DE",
"ZIPCode": "65760",
"City": "Friedrichsdorf",
"Street": "Ringstrasse"
}
},
"Shipper": {
"ContactID": "2769943e0E"
},
"ShipmentUnit": [
{
"Weight": 23.2
}
]
},
"PrintingOptions": {
"UseDefault" : "Default"
}
}

You can create a Request ExpressParcel like the following example:

POST https://localhost:8443/backend/rs/shipments
POST data:
{
"Shipment": {
"Product": "EXPRESS",
"Consignee": {
"Address": {
"Name1": "Max",
"CountryCode": "DE",
"ZIPCode": "65760",
"City": "Friedrichsdorf",
"Street": "Ringstrasse",
"StreetNumber" : "66"
}
},
"Shipper": {
"ContactID": "2769978j0E"
},
"ShipmentUnit": [{
"Weight": 23.2
}],
"Service": [{
"Service": {
"ServiceName": "service_1200"
}}]
},
"PrintingOptions": {
"UseDefault" : "Default"
}
}

2) Parcels that are sent cross-border to other European countries will be either EuroBusinessParcels or EuroExpressParcels.
For EuroBusinessParcel there is as well the option to send them as EuroBusinessSmallParcel.
Don't forget to add incoterm information to your request, sending to customs areas like Switzerland.

Request EuroBusinessParcel

POST https://localhost:8443/backend/rs/shipments
POST data:
{
"Shipment": {
"Product": "PARCEL",
"IncotermCode": "10",
"Consignee": {
"Address": {
"Name1": "Franz Holmes",
"CountryCode": "CH",
"ZIPCode": "3963",
"City": "Crans-Montana",
"Street": "Route du Petit Signal",
"StreetNumber" : "5"
}
},
"Shipper": {
"ContactID": "27699ju76E"
},
"ShipmentUnit": [{
"Weight": 23.2
}]
},
"PrintingOptions": {
"UseDefault" : "Default"
}
}

Request EuroExpressParcel

POST https://localhost:8443/backend/rs/shipments
POST data:
{
"Shipment": {
"Product": "EXPRESS",
"Consignee": {
"ConsigneeID": "040001",
"Address": {
"Name1": "Franz Huber",
"CountryCode": "AT",
"ZIPCode": "8970",
"City": "Schlagming",
"Street": "Schiliftgasse",
"StreetNumber" : "66"
}
},
"Shipper": {
"ContactID": "276b5r5N0E"
},
"ShipmentUnit": [{
"Weight": 23.2
}],
"Service": [{
"Service": {
"ServiceName": "service_1200"
}
}]
},
"PrintingOptions": {
"UseDefault" : "Default"
}
}

3) International parcels are marked with a leading "Global" - so either GlobalBusinessParcel or GlobalExpressParcel.

Request GlobalBusinessParcel

POST https://localhost:8443/backend/rs/shipments
POST data:
{
"Shipment": {
"Product": "PARCEL",
"IncotermCode": "10",
"Consignee": {
"Address": {
"Name1": "Franz Holmes",
"CountryCode": "UY",
"ZIPCode": "37006",
"City": "TupambaƩ",
"Street": "Treinta y Tres",
"StreetNumber" : "5"
}
},
"Shipper": {
"ContactID": "276999ki2E"
},
"ShipmentUnit": [{
"Weight": 23.2
}]
},
"PrintingOptions": {
"UseDefault" : "Default"
}
}

Request GlobalExpressParcel

POST https://localhost:8443/backend/rs/shipments
POST data:
{
"Shipment": {
"Product": "EXPRESS",
"IncotermCode": "10",
"Consignee": {
"Address": {
"Name1": "Franz Holmes",
"CountryCode": "UY",
"ZIPCode": "37006",
"City": "TupambaƩ",
"Street": "Treinta y Tres",
"StreetNumber" : "5"
}
},
"Shipper": {
"ContactID": "276999ju7E"
},
"ShipmentUnit": [{
"Weight": 23.2
}]
},
"PrintingOptions": {
"UseDefault" : "Default"
}
}

French APN and FNCR

In france for every shipment the french shipper need a French National Customer Reference number (FNCR) and each parcel an Alpha Parcel Number (APN). For french shippers the FNCR and the starting value of the APN can be configured in the GLS ShipIT client in shipper settings. If they are not configured both have to be delivered with each REST request as follows:

"Shipment": {
...
"Shipper": {
...
"FRAlphaCustomerReference": "0123456789"
},
"ShipmentUnit": [{
...
"FRAlphaParcelReference": "0123456789012345FR"
}
]
}

The FNCR has to have a length of 10, the APN has to have a length of 18.

In case FNCR and APN are configured in GLS ShipIT shipper settings they must not be delivered in REST requests.

Printing options

The printing options give you several ways of dealing with the labels that you need to place on your parcels. In general you can choose between GLS ShipIT handling the printing (this option is not available if you are using GLS ShipIT hosted at GLS premises) or for GLS ShipIT to return the created labels. If you choose to retrieve the labels from GLS ShipIT, you can choose the format of the labels to match your printers. Thus when issuing the request, you have to define one of the following printing options:

  1. UseDefault
  2. DefinePrinter
  3. ReturnLabels


The PrintingOptions section is mandatory for all types of shipment creation webservice requests. This also includes services like Pick&Ship and Pick&Return, where no label data is returned.

If your are connecting to a centrally hosted GLS ShipIT, you can only use the option "ReturnLabels" as there will not be any printer installed within the centrally hosted GLS ShipIT (and you won't be able to retrieve the labels).

If you plan to use GLS ShipIT for printing your labels, please check the chapter "Druckerverwaltung" of the manual for information on how to configure printers in GLS ShipIT.

The option "UseDefault" should be considered when you are using GLS ShipIT with the Client or when you already configured your printers within your GLS ShipIT installation. By choosing that option, all documents are sent to the printers that are configured within GLS ShipIT. As the REST requests are being executed on the GLS ShipIT backend, only the configured backend printers are valid printers for this printing option.

The option "DefinePrinter" should be considered when you have printers configured within GLS ShipIT, but you want to print to different printers then the configured default printers of GLS ShipIT (e.g. you want to use a different printer when using the REST interface as when a user is creating parcels using the GLS ShipIT client application). With this option you have to provide the name of the printers that should be used for printing the labels and the accompanying documents. As the REST requests are being executed on the GLS ShipIT backend, only the configured backend printers are valid printers for this printing option.

The option "ReturnLabels" should be used when you cannot configure your printers in GLS ShipIT (e.g. the printer cannot be reached from the host which runs the GLS ShipIT backend). For this option you have to specify which type of printer you have. GLS ShipIT will return the labels for the desired type of printer. All other documents (e.g. additional documents for addon liability or ident service) will be returned as PDF document. If you do not have any of the supported label printers (or if your label printer is capable of printing PDF), you can specify PDF as the desired label format.

Here are some samples of the printing options you can use in your requests:

If you want to use GLS ShipIT for printing labels and documents:

"PrintingOptions": {
"UseDefault": "Default"
}

If you want to use dedicated printers configured in GLS ShipIT (but not the default printers):

"PrintingOptions": {
"DefinePrinter": {
"LabelPrinter": "ThermoI34",
"DocumentPrinter": "\\\\Logistics\\Laser"
}
}

If you want to print the labels on your thermal printer (in this case a Zebra with ZPL_200):

"PrintingOptions": {
"ReturnLabels": {
"TemplateSet": "ZPL_200",
"LabelFormat": "ZEBRA"
}
}

If you want to retrieve the labels as PDF documents:

"PrintingOptions": {
"ReturnLabels": {
"TemplateSet": "NONE",
"LabelFormat": "PDF"
}
}

If you want to retrieve the labels as PNG documents:

"PrintingOptions": {
"ReturnLabels": {
"TemplateSet": "NONE",
"LabelFormat": "PNG"
}
}


Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Use default printer UseDefault 7 alphanumeric Default Optional Default fixed value <typ:UseDefault>Default</typ:UseDefault>
Define printer DefinePrinter Define configured printers for printing labels and shipment documents
Label printer LabelPrinter 255 alphanumeric Optional - Please define name of the label printer
Document printer DocumentPrinter 255 alphanumeric Optional - Please define name of the document printer
Define printer for return labels ReturnLabels
Template name TemplateSet 7 alphanumeric Optional Must use one of the defined set NONE, ZPL_200, ZPL_300
Printer label format LabelFormat 8 alphanumeric Optional Must use one of the defined set PDF, PNG, ZEBRA


Custom content

This section of the request contains several optional attributes when printing as PDF or PNG that can be found in the vertical area of the label. You do not need to fill any of them. If you however have the need of adding your own barcode or logo to the labels or if you want to suppress the shipper address on the labels, you can use this request section to steer this behaviour.

If you want to have a custom logo / image on the labels, fill the content of the element "CustomerLogo" with the binary data of the logo. The data must be Base64 encoded. The image formats jpg, gif and png are supported. Hint: The available character set of selected barcode type needs to be observed.

To print your logo on the label, use something like this:

"CustomContent":{
"CustomerLogo": "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"
}

If you need an own barcode on the label there are two elements to support this. In the element "Barcode" you specify the data that should be printed as a barcode. In the element "BarcodeType" you can specify the barcode format that should be used. You can choose between the following barcode formats:

  • EAN_128
  • CODE_39

If you want to print a Code39 barcode on the label, you can define the elements like this:

"CustomContent": {
"Barcode": "0123456789",
"BarcodeType": "CODE_39"
}

If you want to hide the shipper address on the label you can define the elements like this:

"CustomContent": {
"HideShipperAddress": "true"
}
Name Expression in webservices Field length Type Format Mandatory/Optional Restrictions Level Description
Customer logo CustomerLogo 255 base64Binary Optional - Custom content provided for label generation (f.e. customer logo)
Barcode Barcode 255 alphanumeric Optional - Barcode to create in the label
Barcode type BarcodeType 7 alphanumeric Optional EAN_128 or CODE_39 The type of barcode to create in the label
Hide shipper address HideShipperAddress 5 boolean Optional true or false Specify if the shipper address must be removed from the label


Input validation

  • The referenced shipper must exist and must be accessible for the user issuing the request
  • The referenced product group must be available to the shipper that is referenced within the request
  • If services are listed, those services must exist and be available to the referenced shipper
  • If an incoterm is provided, this incoterm must be available
  • The shipment must be valid (no defined validation rule may be violated). You can find more on this in Use case description: REST_API_REST_F_115

Response

The REST response is an instance of eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.CreatedShipment or one of the following faults:

  • eu.gls_group.fpcs.v1.shipmentprocessing.InvalidFieldValueMessage
  • eu.gls_group.fpcs.v1.shipmentprocessing.MandatoryFieldMissingMessage
  • eu.glsgroup.fpcs.dto.error.FPCSServiceException

Depending of multiple conditions the response can have different content/information:

  • ShipmentReference - The given ShipmentReference from the request.
  • ParcelData
  • PrintData - If requested, the print data (content) with the corresponding format (PDF, Zebra, etc.).
  • CustomerID - The ID of the customer to whom the specified shipper belongs.
  • PickupLocation - The location where the shipment has to be picked up.
  • GDPR - Information about our Group data protection web site.
  • Nemonico - Information about Spanish routing.

ParcelData

Barcodes

The Barcodes section varies. The informations (as the NDI numbers or UniShip for example) are filled depending of origin, destination and used services:

"Barcodes": {
"Primary2D": "ADE 777DE 777abcdefghij2761234567YZ8YO127AA 3esa081538106 00560001001 ",
"Secondary2D": "A|Max Mustermann|Falkenbergstrasse 47|Braunschweig|| Ref-Unit-0815| Ref-Ship-4711| ",
"Primary1D": "200010110396",
"Primary1DPrint": true
}

RoutingInfo

The routing informations are returned in section RoutingInfo:

"RoutingInfo": {
"Tour": "0815",
"InboundSortingFlag": "003",
"FinalLocationCode": "DE 777",
"HubLocation": "esa",
"LastRoutingDate": "2017-07-03"
}

In some countries, different routings may apply as you can see for the German example below:

"RoutingInfo": {
"GeoTour":"1829",
"LoadingArea":"7",
"DispositionFlag":"c"
"InboundSortingFlag": "003",
"FinalLocationCode": "DE 777",
"HubLocation": "esa",
"LastRoutingDate": "2017-07-03"
}

ServiceArea

When using a service, the REST response will list all used services with their service attributes:

"ServiceArea": {
"Service": [{
"Header": "DepositService",
"Information": [{
"Name": "Deposit Place",
"Value": "Under the doormat"
}
]
}
]
}

For product EXPRESS there is also a serviceArea entry:

"ServiceArea": {
"Service": [{
"Header": "ExpressParcel",
"Information": []
}
]
}

ExpressData

In case of Express product the response contains additional express delivery/routing informations:

"ExpressData": {
"AlternateDelivery": true,
"ImportStation": "1118",
"TourNumber": "2228",
"CourierParcelNumber": "820510120162"
}

ExpressArea

If the parcel is a Der Kurier parcel the Kurier1D, KurierTourNumber and KurierImportStation are given in the ExpressArea:

"ExpressArea": {
"Kurier1D": "820510120162",
"KurierTourNumber": "2228",
"KurierImportStation": "1118"
}

NDIArea

For some destination countries there are NDI informations (NDI1D) returned. Parcels to Great Britain (GB) and to Switzerland (CH) have additional informations.

For parcels to Great Britain (GB) the GBProductIdentifier is filled with fixed value 24. The GB information GBPostOffice1D contains the zipcode (if longer than 4, the first 4 chars/digits only) surrounded by two asterisk (*):

"NDIArea": {
"NDI1D": "EH936454348GB",
"GBProductIdentifier": "24",
"GBPostOffice1D": "*NN15*"
}

For parcels to Switzerland (CH) the CHParcelNumber is filled with readable NDI number. The CH information CHPRI1D contains the fixed value 0509.

"NDIArea": {
"NDI1D": "994010486057566095",
"CHParcelNumber": "99.40.104860.57566095",
"CHPRI1D": "0509",
}

HandlingInformation

There are some pre-defined shorthand symbols which are returned in HandlingInformation:

  • Express product: T
  • Small (weight): S
  • Heavy (weight): X

There are more shorthand symbols for various services which are returned if such a service is used. If there are more than one symbol for a parcel, those symbols are concatenated (separated by spaces).

Sample request

POST https://localhost:8443/backend/rs/shipments
POST data:
{
"Shipment": {
"ShippingDate":"2016-04-01",
"Product": "PARCEL",
"Consignee": {
"ConsigneeID":"DE00",
"Address": {
"Name1": "Max",
"CountryCode": "DE",
"ZIPCode": "38106",
"City": "Braunschweig",
"Street": "Ringstrasse"
}
},
"Shipper": {
"ContactID": "2761234567"
},
"ShipmentUnit": [{
"Weight": 23.2
}
],
"Service": [
{
"Service": {
"ServiceName": "service_flexdelivery"
}
}
]
},
"PrintingOptions": {
"UseDefault": "Default"
}
}

Sample response

If the request was successful:

{
"CreatedShipment": {
"ShipmentReference": [],
"ParcelData": [{
"TrackID": "YZ8YO12S",
"Barcodes": {
"Primary2D": "ADE 777DE 777abcdefghij2761234567YZ8YO12SAAz 3esa081538106 02320001001 ",
"Secondary2D": "A|Max|Ringstrasse|Braunschweig|| | | ",
"Primary1D": "200010110600",
"Primary1DPrint": true
},
"RoutingInfo": {
"Tour": "0815",
"InboundSortingFlag": "003",
"FinalLocationCode": "DE 777",
"HubLocation": "esa",
"LastRoutingDate": "2017-06-27"
},
"ServiceArea": {
"Service": [{
"Header": "FlexDeliveryService",
"Information": []
}
]
}
}
],
"CustomerID": "abcdefghij",
"PickupLocation": "DE 777",
"GDPR":["Informationen zum Datenschutz in der GLS-Gruppe finden Sie unter","gls-group.eu/dataprotection"]
}
}

If the request was syntactically correct, but there where validation issues:

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field shipper.email. Value ADDRESS_VALID_EMAIL is not a valid value. Shipment validation failed
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["shipper.email","ADDRESS_VALID_EMAIL","Shipment validation failed"]

If you specified an invalid service (or a service that is not available to the shipper used in the request):

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field Shipment.Service.ServiceName. Value service_iamnotvalid is not a valid value. Article does not exist or is not available for shipper
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["Shipment.Service.ServiceName","service_iamnotvalid","Article does not exist or is not available for shipper"]

If a mandatory attribute was not set:

Response headers:
HTTP/1.1 400 Bad Request
message: The Mandatory parameter PrintingOptions is not set
error: MANDATORY_PARAMETER_NOT_SET
Content-Length: 0
args: ["PrintingOptions"]

cancelParcelById (F-116)

This operation tries to cancel a previously created parcel. This operation is not guaranteed to succeed. If the parcel is already being processed, it cannot be cancelled anymore. The cancel operation itself is handled asynchronously in most cases. If the system is not connected to the central systems of GLS at the time of the issuing of the request, it will be retried at a later time. The REST service will not wait for the request to be executed, it will return after the request has been scheduled successfully. Return parcels can only be cancelled through your responsible depot. A webservice can be called but this does not have any operational impact.

The REST method is available at sub-path /cancel/{trackID} with http request method POST
Parameter Mandatory Location in Request Description
trackID TRUE path param The track ID of the parcel that should be canceled.


Input validation

  • A parcel with the given ID must exist
  • The parcel must belong to a shipper to which the user issuing the request has access to

The REST response is an instance of eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.CancelParcelResponse or one of the following faults:

  • eu.gls_group.fpcs.v1.shipmentprocessing.InsufficientPermissionMessage
  • eu.gls_group.fpcs.v1.shipmentprocessing.InvalidFieldValueMessage
  • eu.gls_group.fpcs.v1.shipmentprocessing.MandatoryFieldMissingMessage

Sample request

POST https://localhost:8443/backend/rs/shipments/cancel/YZ8YPH2Q
POST data:

If the cancellation was successful:

{
"TrackID": "YZ8YPH2Q",
"result": "CANCELLED"
}

If the cancellation was successfully scheduled:

{
"TrackID": "YZ8YPH2Q",
"result": "CANCELLATION_PENDING"
}

Sample response

If the request was successful, but the parcel cannot be cancelled:

{
"TrackID": "YZ8YPH2Q",
"result": "SCANNED"
}

If a wrong TrackID has been transmitted:

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field TrackID. Value zzZZzzZZ is not a valid value. A parcel with the given ID does not exist
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["TrackID","zzZZzzZZ","A parcel with the given ID does not exist"]

If a mandatory attribute was not provided (e.g. the TrackID):

Response headers:
HTTP/1.1 400 Bad Request
message: The Mandatory parameter TrackID is not set
error: MANDATORY_PARAMETER_NOT_SET
Content-Length: 0
args: ["TrackID","Mandatory field is not set"]

If a shipper shall be used to which the user does not have access:

Response headers:
HTTP/1.1 400 Bad Request
message: Customer 2760001154 - Auth-User user: access to shipper denied
error: ACCESS_TO_SHIPPER_DENIED
Content-Length: 0
args: ["012345678912","user","access to shipper denied"]

getAllowedServices (F-117)

This REST service operation returns a list of services (product/articles) that can be used for a shipment from a specific source address to a specific destination address.

The operation takes an instance of eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.AllowedServicesRequestParameter

The REST method is available at sub-path /allowedservices with http request method POST
Parameter Mandatory Location in Request Description
allowedServicesRequestParameter TRUE request body The eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.AllowedServicesRequestParameter with the request parameters.


Input validation

No special input validation is being done. The zip code should comply with zip code rules of the respective country.

The REST response is an instance of eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.AllowedServicesResponse or one of the following faults:

  • eu.gls_group.fpcs.v1.shipmentprocessing.InvalidFieldValueMessage
  • eu.gls_group.fpcs.v1.shipmentprocessing.MandatoryFieldMissingMessage

Sample request

POST https://localhost:8443/backend/rs/shipments/allowedservices
POST data:
{
"Source":{
"CountryCode":"DE",
"ZIPCode":"38106"
},
"Destination":{
"CountryCode":"DE",
"ZIPCode":"65779"
}
}

It is possible to add a specific shipper as an optional parameter to the request above, in order to get the allowed services for that shipper only:

POST data:
{
"Source":{
...
},
"Destination":{
...
},
"ContactID":"1234567890"
}

Sample response

If the request was successful:

{
"AllowedServices": [{
"ProductName": "PARCEL"
}, {
"ProductName": "EXPRESS"
}, {
"ProductName": "FREIGHT"
}, {
"ServiceName": "service_cash"
}, {
"ServiceName": "service_pickandship"
}, {
"ServiceName": "service_pickandreturn"
}, {
"ServiceName": "service_addonliability"
}, {
"ServiceName": "service_deliveryatwork"
}, {
"ServiceName": "service_deposit"
}, {
"ServiceName": "service_hazardousgoods"
}, {
"ServiceName": "service_exchange"
}, {
"ServiceName": "service_saturday_1000"
}, {
"ServiceName": "service_guaranteed24"
}, {
"ServiceName": "service_shopreturn"
}, {
"ServiceName": "service_0800"
}, {
"ServiceName": "service_0900"
}, {
"ServiceName": "service_1000"
}, {
"ServiceName": "service_1200"
}, {
"ServiceName": "service_intercompany"
}, {
"ServiceName": "service_directshop"
}, {
"ServiceName": "service_smsservice"
}, {
"ServiceName": "service_ident"
}, {
"ServiceName": "service_identpin"
}, {
"ServiceName": "service_shopdelivery"
}, {
"ServiceName": "service_preadvice"
}, {
"ServiceName": "service_saturday_1200"
}, {
"ServiceName": "service_Saturday"
}, {
"ServiceName": "service_exworks"
}, {
"ServiceName": "service_z"
}, {
"ServiceName": "service_flexdelivery"
}, {
"ServiceName": "service_pickpack"
}, {
"ServiceName": "service_documentreturn"
}, {
"ServiceName": "service_1300"
}, {
"ServiceName": "service_addresseeonly"
}, {
"ServiceName": "service_tyre"
}
]
}

If the request was syntactically incorrect:

Response headers:
HTTP/1.1 400 Bad Request
message: The Mandatory parameter source.ZIPCode is not set
error: MANDATORY_PARAMETER_NOT_SET
Content-Length: 0
args: ["source.ZIPCode","Mandatory field is not set"]

If an attribute had a wrong value (e.g. a invalid country code):

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field source.countryCode. Value XY is not a valid value. Mandatory field is not set or invalid
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["source.countryCode","XY","Mandatory field is not set or invalid"]

getEndOfDayReport (F-118)

Executes the end of day procedure for the given day and returns all shipments that where affected by the end of day procedure.

The REST method is available at sub-path /endofday with http request method POST
Parameter Mandatory Location in Request Description
date TRUE query param Shipping or pick up day for which the end of day procedure should be executed


The end of day procedure does the following things:

  • Ensure that all shipment units that undergo the procedure are transmitted to GLS. That is, each unit that was not yet transmitted, will be transmitted before the procedure can finish.
  • All shipment units that undergo the procedure are set to CLOSED.

The shipment units for which end of day will be performed is limited by the shipments to which the user issuing the request has access to. This means, it affects all shippers to which the user has access based on the roles assigned to him.

If you are connecting to a local installation of GLS ShipIT on your premises, you can configure the following actions to be done during end of day:

  • Reports can be generated and printed during end of day (please check the chapter shipment settings in your ShipIT manual on how to configure this).
  • E-Mails can be send either when shipments are transmitted or during end of day (please check the chapter E-Mail Settings in your ShipIT manual).
  • Old shipments might be deleted during the end of day procedure (please check the chapter my settings in you ShipIT manual).

The operation takes a date as an input parameter.

Input validation

No input validation is to be done.

The REST response is an instance of eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.EndOfDayResponse or one of the following faults:

  • eu.gls_group.fpcs.v1.shipmentprocessing.CouldNotTransmitShipmentsMessage

Sample request

POST https://localhost:8443/backend/rs/shipments/endofday?date=2017-06-28
POST data:

Sample response

{
"Shipments": [{
"ShippingDate": "2017-06-28",
"Product": "PARCEL",
"Consignee": {
"Address": {
"Name1": "Max",
"CountryCode": "DE",
"ZIPCode": "38106",
"City": "Braunschweig",
"Street": "Ringstrasse",
"eMail": null
}
},
"Shipper": {
"ContactID": "2761234567",
"AlternativeShipperAddress": {
"Name1": "Logistics and More",
"CountryCode": "DE",
"ZIPCode": "65760",
"City": "Eschborn",
"Street": "Elly-Beinhorn-Strasse",
"StreetNumber": "1a",
"eMail": "logistics@more.test",
"FixedLinePhonenumber": "004961961234567"
}
},
"ShipmentUnit": [{
"Weight": "23.2",
"TrackID":"YZDLDM5I",
"ParcelNumber":"20281021030"
}
]
}
]
}

If shipments still need to be transmitted, but could not be transmitted:

Response headers:
HTTP/1.1 400 Bad Request
message: Transmission of one or more of the following shipment units not successful: XYZ00012
error: COULD_NOT_TRANSMIT
Content-Length: 0
args: ["Transmission of one or more of the following shipment units not successful","XYZ00012"]

updateParcelWeight (F-119) - COMING SOON

Updates the weight of a shipment unit. The shipment unit will be searched by its trackID.

The REST method is available at sub-path /updateparcelweight with http request method POST

This function is not fully supported yet but will only update the weight in your backend. Changes are not transmitted to GLS.

Parameter Mandatory Location in Request Description
updateParcelWeightRequestParameter TRUE request body The eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.UpdateParcelWeightRequestParameter with the request parameters.


The search is restricted to the shippers to which the user issuing the request has access to.

Input validation

  • The trackID must identify a shipment unit. If none or more than one unit is found, a fault is returned.

The REST response is an instance of eu.glsgroup.fpcs.datatypes.soap.v1.shipmentprocessing.UpdateParcelWeightResponse or one of the following faults:

  • eu.gls_group.fpcs.v1.shipmentprocessing.MandatoryFieldMissingMessage
  • eu.gls_group.fpcs.v1.shipmentprocessing.InvalidFieldValueMessage
  • eu.gls_group.fpcs.v1.shipmentprocessing.InvalidShipmentIDMessage

Sample request

POST https://localhost:8443/backend/rs/shipments/updateparcelweight
POST data:
{
"TrackID": "ZDF8DOSZ",
"Weight": "17.0"
}

Sample response

If the request was successful:

{
"UpdatedWeight": "17.0"
}

If the request points to more than one shipment unit:

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid shipment unit number unitref47: Shipment unit could not be identified. IDs are not unique (shipment reference number: 47110815, shipment unit reference number: unitref47)
error: INVALID_SHIPMENT_ID
Content-Length: 0
args: ["unitref47","Shipment unit could not be identified. IDs are not unique (shipment reference number: 47110815, shipment unit reference number: unitref47)"]

If the shipment unit cannot be found by the provided reference numbers:

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid shipment unit number unitref47: No shipment unit found for shipment reference number 47110815 and shipment unit reference number unitref47
error: INVALID_SHIPMENT_ID
Content-Length: 0
args: ["unitref47","No shipment unit found for shipment reference number 47110815 and shipment unit reference number unitref47"]

If the shipment unit cannot be found by the provided reference number on shipment unit level (no shipment reference number passed to the service):

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid shipment unit number unitref48: No shipment unit found for shipment reference number null and shipment unit reference number unitref48
error: INVALID_SHIPMENT_ID
Content-Length: 0
args: ["unitref48","No shipment unit found for shipment reference number null and shipment unit reference number unitref48"]

If a mandatory parameter is not provided:

Response headers:
HTTP/1.1 400 Bad Request
message: The Mandatory parameter ShipmentUnitNumber is not set
error: MANDATORY_PARAMETER_NOT_SET
Content-Length: 0
args: ["ShipmentUnitNumber"]

If an invalid value is provided (e.g. a too high weight):

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field Weight. Value 40.0 is not a valid value. Invalid field Weight. Value 40.0 is not a valid value. Max value is 25.0
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["Weight","40.0","Invalid field Weight. Value 40.0 is not a valid value. Max value is 25.0"]