Not logged in - Login
View History

Parcel Shop Finder Service PHP Example

It is NOT recommended to use this minimal example.

Please check the DIS library for an extended example and best practices.

//The header is filled with the data you got from the authentication service
$soapHeaderBody = array(
  'delisId' => <your delisID> 
  ,'authToken' => <your token>
  ,'messageLanguage' => 'en_US'
);

$header = new SOAPHeader('http://dpd.com/common/service/types/Authentication/2.0', 'authentication', $soapHeaderBody, false);
  
$client = new SoapClient('https://public-dis-stage.dpd.nl/Services/ParcelShopFinderService.svc?wsdl');

$soapHeader = $header;
$client->__setSoapHeaders($soapHeader);

$result = $client->findParcelShopsByGeoData(array(
  'longitude' => 4.21
  ,'latitude' => 51.548
  ,'limit' => 2
));

print_r($result);

This example should return something like:

stdClass Object
(
    [parcelShop] => Array
        (
            [0] => stdClass Object
                (
                    [parcelShopId] => NL10931
                    [company] => MATTHIJSSEN TWEEWIELERS
                    [street] => Markt 10a
                    [houseNo] => 
                    [state] => 
                    [countryN] => 528
                    [isoAlpha2] => NL
                    [isoAlpha3] => NLD
                    [zipCode] => 4693 CB
                    [city] => Poortvliet
                    [phone] => 
                    [fax] => 
                    [email] => 
                    [homepage] => 
                    [openingHours] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [weekday] => Monday
                                    [openMorning] => 00:00
                                    [closeMorning] => 00:00
                                    [closeAfternoon] => 00:00
                                    [openAfternoon] => 00:00
                                )

                            [1] => stdClass Object
                                (
                                    [weekday] => Tuesday
                                    [openMorning] => 09:00
                                    [closeMorning] => 12:30
                                    [closeAfternoon] => 17:30
                                    [openAfternoon] => 13:30
                                )

                            [2] => stdClass Object
                                (
                                    [weekday] => Wednesday
                                    [openMorning] => 09:00
                                    [closeMorning] => 12:30
                                    [closeAfternoon] => 17:30
                                    [openAfternoon] => 13:30
                                )

                            [3] => stdClass Object
                                (
                                    [weekday] => Thursday
                                    [openMorning] => 09:00
                                    [closeMorning] => 12:30
                                    [closeAfternoon] => 17:30
                                    [openAfternoon] => 13:30
                                )

                            [4] => stdClass Object
                                (
                                    [weekday] => Friday
                                    [openMorning] => 09:00
                                    [closeMorning] => 12:30
                                    [closeAfternoon] => 17:30
                                    [openAfternoon] => 13:30
                                )

                            [5] => stdClass Object
                                (
                                    [weekday] => Saturday
                                    [openMorning] => 09:00
                                    [closeMorning] => 12:00
                                    [closeAfternoon] => 16:00
                                    [openAfternoon] => 12:00
                                )

                            [6] => stdClass Object
                                (
                                    [weekday] => Sunday
                                    [openMorning] => 00:00
                                    [closeMorning] => 00:00
                                    [closeAfternoon] => 00:00
                                    [openAfternoon] => 00:00
                                )

                        )

                    [extraInfo] => 
                    [pickupByConsigneeAllowed] => 1
                    [returnAllowed] => 1
                    [expressAllowed] => 
                    [expressPickupTime] => 
                    [prepaidAllowed] => 1
                    [cashOnDeliveryAllowed] => 
                    [cashOnDeliveryPayment] => 0
                    [distance] => 0
                    [longitude] => 4.144035800000
                    [latitude] => 51.544402600000
                    [coordinateX] => 3956.24354736068
                    [coordinateY] => 286.643504856477
                    [coordinateZ] => 4994.65755441347
                )

            [1] => stdClass Object
                (
                    [parcelShopId] => NL10199
                    [company] => DE BLOEMENSTAL
                    [street] => Dorpsstraat 73-K
                    [houseNo] => 
                    [state] => 
                    [countryN] => 528
                    [isoAlpha2] => NL
                    [isoAlpha3] => NLD
                    [zipCode] => 4661 HM
                    [city] => Halsteren
                    [phone] => 
                    [fax] => 
                    [email] => 
                    [homepage] => 
                    [openingHours] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [weekday] => Monday
                                    [openMorning] => 08:00
                                    [closeMorning] => 12:00
                                    [closeAfternoon] => 20:00
                                    [openAfternoon] => 12:00
                                )

                            [1] => stdClass Object
                                (
                                    [weekday] => Tuesday
                                    [openMorning] => 08:00
                                    [closeMorning] => 12:00
                                    [closeAfternoon] => 20:00
                                    [openAfternoon] => 12:00
                                )

                            [2] => stdClass Object
                                (
                                    [weekday] => Wednesday
                                    [openMorning] => 08:00
                                    [closeMorning] => 12:00
                                    [closeAfternoon] => 20:00
                                    [openAfternoon] => 12:00
                                )

                            [3] => stdClass Object
                                (
                                    [weekday] => Thursday
                                    [openMorning] => 08:00
                                    [closeMorning] => 12:00
                                    [closeAfternoon] => 20:00
                                    [openAfternoon] => 12:00
                                )

                            [4] => stdClass Object
                                (
                                    [weekday] => Friday
                                    [openMorning] => 08:00
                                    [closeMorning] => 12:00
                                    [closeAfternoon] => 20:00
                                    [openAfternoon] => 12:00
                                )

                            [5] => stdClass Object
                                (
                                    [weekday] => Saturday
                                    [openMorning] => 08:00
                                    [closeMorning] => 12:00
                                    [closeAfternoon] => 18:00
                                    [openAfternoon] => 12:00
                                )

                            [6] => stdClass Object
                                (
                                    [weekday] => Sunday
                                    [openMorning] => 00:00
                                    [closeMorning] => 00:00
                                    [closeAfternoon] => 00:00
                                    [openAfternoon] => 00:00
                                )

                        )

                    [extraInfo] => 
                    [pickupByConsigneeAllowed] => 1
                    [returnAllowed] => 1
                    [expressAllowed] => 
                    [expressPickupTime] => 
                    [prepaidAllowed] => 1
                    [cashOnDeliveryAllowed] => 
                    [cashOnDeliveryPayment] => 0
                    [distance] => 0
                    [longitude] => 4.269707400000
                    [latitude] => 51.525706700000
                    [coordinateX] => 3957.23036015473
                    [coordinateY] => 295.441690478196
                    [coordinateZ] => 4993.36296246989
                )

        )

)