GLS ShipIT
GLS ShipIT - REST services
ParcelShop search

Accessing the REST for parcelshop search

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

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

getParcelShopById (F-107)

This method searches for a parcelshop with the given id.

The REST method is available at sub-path /{id} with http request method GET
Parameter Mandatory Location in Request Description
id TRUE path param Id of the Parcelshop which is searched.

Input validation

  • The id may not be empty and must reference an existing parcelshop

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

Sample request

GET https://localhost:8443/backend/rs/parcelshop/2760901388
[no cookies]
Request Headers:
Accept: application/glsVersion1+json, application/json
Content-Type: application/glsVersion1+json
Authorization: Basic dXNlcjpwYXNzd29yZA==
Host: localhost:8443

Sample response

If the request was successful (the response is shortened to keep the sample readable):

{
"ParcelShopID": "2760901388",
"Location": {
"Latitude": "50.09968",
"Longitude": "8.70346"
},
"Address": {
"Name1": "KIOSK-Shop",
"Name2": "",
"Name3": "",
"CountryCode": "DE",
"ZIPCode": "60599",
"City": "Frankfurt",
"Street": "Offenbacher Landstraߟe",
"StreetNumber": "130",
"eMail": null
},
"WorkingDay": [{
"DayOfWeek": "MON",
"OpeningHours": {
"OpeningHours": [{
"From": 25200000,
"To": 66600000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
},
...
{
"DayOfWeek": "SAT",
"OpeningHours": {
"OpeningHours": [{
"From": 25200000,
"To": 66600000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
}
]
}

If the parcelshop does not exist:

Response headers:
HTTP/1.1 400 Bad Request
message: Parcelshop not found for id 1111111
error: INVALID_PARCELSHOP_ID
Content-Length: 0
args: ["1111111","Parcelshop not found for id [\"1111111\"]"]

If a mandatory parameter (e.g. parcelShopID) was not provided:

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

If an invalid value was provided (e.g. an invalid parcelShopID):

Response headers:
HTTP/1.1 400 Bad Request
message: Parcelshop not found for id xyz
error: INVALID_PARCELSHOP_ID
Content-Length: 0
args: ["xyz","Parcelshop not found for id [\"xyz\"]"]

getParcelShopsByCountryCode (F-108)

This method returns a list of Parcelshops for a specific country.
Attention: Depending on the country for which you request the parcelshops, the answer might take time and will be big. Use this service to build up a cache of parcelshops, but do not plan to call that service from any online function which requires fast response times (the parcelshop list for Germany has around 11MB of data, response time of the service is above 30 seconds).

The REST method is available at sub-path /country/{countryCode} with http request method GET
Parameter Mandatory Location in Request Description
countryCode TRUE path param countryCode of the Country which is searched.

Input validation

  • countryCode may not be empty

The REST response is presented as an instance of type eu.glsgroup.fpcs.datatypes.soap.v1.parcelshop.ListOfParcelShop or one of the following REST faults:

Sample request

GET https://localhost:8443/backend/rs/parcelshop/country/DE
[no cookies]
Request Headers:
Accept: application/glsVersion1+json, application/json
Content-Type: application/glsVersion1+json
Authorization: Basic dXNlcjpwYXNzd29yZA==
Host: localhost:8443

Sample response

If the request was successful (the response is shortened to keep the sample readable):

{
"ParcelShop": [{
"ParcelShopID": "2760901761",
"Location": {
"Latitude": "52.48861",
"Longitude": "13.359"
},
"Address": {
"Name1": "Radio Fernsehen Klima",
"Name2": "",
"Name3": "",
"CountryCode": "DE",
"ZIPCode": "10827",
"City": "Berlin",
"Street": "Hauptstaße",
"StreetNumber": "153",
"eMail": null
},
"WorkingDay": [{
"DayOfWeek": "MON",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 61200000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
},
...
{
"DayOfWeek": "SAT",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 43200000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
}
]
}, {
"ParcelShopID": "2760901762",
"Location": {
"Latitude": "52.41538",
"Longitude": "13.40564"
},
"Address": {
"Name1": "1001 Kleinigkeiten",
"Name2": "",
"Name3": "",
"CountryCode": "DE",
"ZIPCode": "12349",
"City": "Berlin",
"Street": "Marienfelder Chaussee",
"StreetNumber": "145",
"eMail": null
},
"WorkingDay": [{
"DayOfWeek": "MON",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 61200000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
},
...
{
"DayOfWeek": "SAT",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 46800000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
}
]
},
...

If the country code is not a valid one:

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field countryCode. Value XY is not a valid value. Country (searched by GLS id, Alpha-2, Alpha-3, IOC, ISO 3166-numerical, Translations and special id) XY not found.
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["countryCode","XY","Country (searched by GLS id, Alpha-2, Alpha-3, IOC, ISO 3166-numerical, Translations and special id) XY not found."]

If the country code is not provided:

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

getParcelShopsInArea (F-109)

This method searches the parcelshops within the given area.

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


Input validation

  • all the parameters inside the Area object have to be set.
  • all latitudes have to be valid latitudes ranging from -90 to +90
  • all longitudes have to be valid longitudes ranging from -180 to +180

The response is presented as an instance of type eu.glsgroup.fpcs.datatypes.soap.v1.parcelshop.ListOfParcelShop or one of the following REST faults:

Attention: Searching over big areas will result in a slow and potentially very big response. If you plan to integrate the service in a synchronous manner, keep the search area small to ensure a quick response.

Sample request

POST https://localhost:8443/backend/rs/parcelshop/area
POST data:
{
"From": {
"Latitude": "48.57035",
"Longitude": "12.62896"
},
"To": {
"Latitude": "48.79115",
"Longitude": "9.00543"
}
}

Sample response

If the request was successful (the response is shortened to keep the sample readable):

{
"ParcelShop": [{
"ParcelShopID": "2760229380",
"Location": {
"Latitude": "48.77653",
"Longitude": "12.51949"
},
"Address": {
"Name1": "Getränke Steinberger",
"Name2": "",
"Name3": "",
"CountryCode": "DE",
"ZIPCode": "94339",
"City": "Leiblfing",
"Street": "Aitrachweg",
"StreetNumber": "2",
"eMail": null
},
"WorkingDay": [{
"DayOfWeek": "MON",
"OpeningHours": {
"OpeningHours": [{
"From": 27000000,
"To": 64800000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
},
...
{
"DayOfWeek": "SAT",
"OpeningHours": {
"OpeningHours": [{
"From": 27000000,
"To": 54000000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
}
]
}, {
"ParcelShopID": "2760194369",
"Location": {
"Latitude": "48.76232",
"Longitude": "12.30146"
},
"Address": {
"Name1": "Edeka Markt",
"Name2": "Limmer E. u. A.",
"Name3": "",
"CountryCode": "DE",
"ZIPCode": "84082",
"City": "Laberweinting",
"Street": "Hofkirchen",
"StreetNumber": "110",
"eMail": null
},
"WorkingDay": [{
"DayOfWeek": "MON",
"OpeningHours": {
"OpeningHours": [{
"From": 21600000,
"To": 43200000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
},
...
{
"DayOfWeek": "SAT",
"OpeningHours": {
"OpeningHours": [{
"From": 19800000,
"To": 39600000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
}
]
},
...

If an invalid parameter was provided:

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field From.Longitude. Value 1111 is not a valid value. Longitude 1111 does not fall into the range [-180.0, 180.0].
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["From.Longitude","1111","Longitude 1111 does not fall into the range [-180.0, 180.0]."]

If a mandatory parameter was not provided:

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

findNearestParcelShopForAddress (F-110)

This method finds the parcelshops that are nearest to a given address.
The service is limited to the next 15 parcelshops within 50km of airline distance from the given address.

The REST method is available at sub-path /address with http request method POST
Parameter Mandatory Location in Request Description
area TRUE request body The eu.glsgroup.fpcs.datatypes.soap.v1.parcelshop.ParcelShopSearchLocation with the request parameters.


Input validation

  • At least the attributes zipCode and countryCode of the ParcelShopSearchLocation must be set

The response is presented as an instance of type eu.glsgroup.fpcs.datatypes.soap.v1.parcelshop.ListOfParcelShop or one of the following REST faults:

Sample request

POST https://localhost:8443/backend/rs/parcelshop/address
POST data:
{
"Street": "Marktplatz",
"StreetNumber": "52",
"CountryCode": "DE",
"ZIPCode": "94419",
"City": "Reisbach"
}

Sample response

If the request was successful (the response is shortened to keep the sample readable):

{
"ParcelShop": [{
"ParcelShopID": "2760127516",
"Location": {
"Latitude": "48.55597",
"Longitude": "12.56134"
},
"Address": {
"Name1": "Vilstal-Bikes Baier",
"Name2": "Andreas Baier e.K.",
"Name3": "",
"CountryCode": "DE",
"ZIPCode": "84163",
"City": "Marklkofen",
"Street": "Reisbacher Str.",
"StreetNumber": "17",
"eMail": null
},
"WorkingDay": [{
"DayOfWeek": "MON",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 61200000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": 39600000,
"To": 43200000
}
]
}
},
...
{
"DayOfWeek": "SAT",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 39600000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
}
],
"AirlineDistance": "5.232480979421174"
}, {
"ParcelShopID": "2760903666",
"Location": {
"Latitude": "48.54448",
"Longitude": "12.52861"
},
"Address": {
"Name1": "E-W-A",
"Name2": "Inh. Werner Aumeier",
"Name3": "",
"CountryCode": "DE",
"ZIPCode": "84160",
"City": "Frontenhausen",
"Street": "Gangkofener Str.",
"StreetNumber": "30",
"eMail": null
},
"WorkingDay": [{
"DayOfWeek": "MON",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 61200000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": 39600000,
"To": 46800000
}
]
}
},
...
{
"DayOfWeek": "SAT",
"OpeningHours": {
"OpeningHours": [{
"From": 28800000,
"To": 39600000
}
]
},
"Breaks": {
"OpeningHours": [{
"From": -3600000,
"To": -3600000
}
]
}
}
],
"AirlineDistance": "7.934731898059682"
},
...

If a mandatory parameter was not provided:

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

If an invalid parameter was provided:

Response headers:
HTTP/1.1 400 Bad Request
message: Invalid field countryCode. Value XY is not a valid value. Country (searched by GLS id, Alpha-2, Alpha-3, IOC, ISO 3166-numerical, Translations and special id) XY not found.
error: INVALID_FIELD_VALUE
Content-Length: 0
args: ["countryCode","XY","Country (searched by GLS id, Alpha-2, Alpha-3, IOC, ISO 3166-numerical, Translations and special id) XY not found."]