GLS ShipIT  3.0.6
GLS ShipIT - REST services
Estimate delivery time frames

Table of Contents

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/timeframe

Only one operation is available at this port. This operation can be used to get an estimation of the amount of working days needed to ship a shipment unit from an origin to a destination address.

If the user is authenticated successfully the actual backend state is requested from datahub. If the backend is active in datahub, the backend state in backend database is set to active and the request is executed, else the backend state in backend database is set to inactive and a response with HTTP status 490 is returned.

Available web service operations

getEstimatedDeliveryDays (F-234)

This operation estimates the days needed to deliver a shipment unit from the given origin address to the given destination address.

The REST method is available at sub-path /deliverydays with http request method POST
Parameter Mandatory Location in RequestDescription
fromToLocation TRUE request body The eu.glsgroup.fpcs.datatypes.soap.v1.timeframe.FromToLocation with the request parameters.

Input validation

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

Sample request

POST https://localhost:8443/backend/rs/timeframe/deliverydays
POST data:
{
"Source": {
"Address": {
"Street": "Platz der Republik",
"StreetNumber": "1",
"CountryCode": "DE",
"ZIPCode": "10557",
"City": "Berlin"
}
},
"Destination": {
"Address": {
"Street": "Platz der Vereinten Nationen",
"StreetNumber": "2",
"CountryCode": "DE",
"ZIPCode": "53113",
"City": "Bonn"
}
}
}

If the request was successful:

{
"NumberOfWorkDays": 4
}

If one of the necessary fields is missing:

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

If one of the fields has an invalid value (e.g. wrong country code):

Response headers:
HTTP/1.1 400 Bad Request
message: Delivery Days could not be estimated: Country with ID XY not found.
error: CANNOT_ESTIMATE_DELIVERY_DAYS
Content-Length: 0
args: ["Country with ID XY not found.","XY"]