logo P4D

The P4D API: CollectionTimes

 
If you would like to view all the available collection dates and times for a specific QuoteID/ItemID combination then use this function. If you call the PlaceBooking function without specifying a collection date and time then the earliest available will be selected by default.

Input Fields

Field Name Required? Description Example
ShipAction YES This tells our system which function you require CollectionTimes
Username YES You must specify your username joebloggs
APIKey YES This is available from your Shipping Manager account page HJ1E6DOTRDXAOLB
QuoteID   The QuoteID obtained from the GetQuote function QUOTESSWIRHSIX6EXH
ItemID   The ItemID obtained from the GetQuote function 925

Output Fields
 

Field Name Description Example
ShipAction Confirmation of the function used CollectionTimes
Status Either Success or Error Success
RequestDate The date your request was received (yyyy-mm-dd hh:mm:ss) 2008-01-10 12:15:31
Username The username used to make the request joebloggs
CollectionTimes An array containing all the available collection slots -
CollectionDate The date of collection - yyyy-mm-dd 2008-06-10
ReadyFrom The time of the day the parcel will be ready from (n.b. collections will be made between ReadyFrom and 17:30) 09:00
Formatted The CollectionDate and ReadyFrom fields combined in a human readable format See example ..
SameDayCutOff The time on CollectionDate up to which sameday collections can be booked 12:00

Example Input

Array
(
    [ShipAction] => CollectionTimes
    [Username] => joebloggs
    [APIKey] => HJ1E6DOTRDXAOLB

    [QuoteID] => QUOTESSWIRHSIX6EXH
    [ItemID] => 632
)

Example Output
 
Array
(
    [ShipAction] => CollectionTimes
    [Status] => Success
    [RequestDate] => 2008-07-06 02:00:15
    [Username] => joebloggs
    [CollectionTimes] => Array
        (
            [0] => Array
                (
                    [CollectionDate] => 2008-07-07
                    [ReadyFrom] => 09:00
                    [Formatted] => Mon 7 Jul 08 between 9am and 5.30pm
                    [SameDayCutOff] => 12:00
                )

            [1] => Array
                (
                    [CollectionDate] => 2008-07-08
                    [ReadyFrom] => 09:00
                    [Formatted] => Tue 8 Jul 08 between 9am and 5.30pm
                    [SameDayCutOff] => 12:00
                )

            [2] => Array
                (
                    [CollectionDate] => 2008-07-09
                    [ReadyFrom] => 09:00
                    [Formatted] => Wed 9 Jul 08 between 9am and 5.30pm
                    [SameDayCutOff] => 12:00
                )

            [3] => Array
                (
                    [CollectionDate] => 2008-07-10
                    [ReadyFrom] => 09:00
                    [Formatted] => Thu 10 Jul 08 between 9am and 5.30pm
                    [SameDayCutOff] => 12:00
                )

            [4] => Array
                (
                    [CollectionDate] => 2008-07-11
                    [ReadyFrom] => 09:00
                    [Formatted] => Fri 11 Jul 08 between 9am and 5.30pm
                    [SameDayCutOff] => 12:00
                )

        )

)