logo P4D

The P4D API: GetInsurance

 
Currently all of our delivery services include free insurance up to the value of £50. This function returns the additional insurance cover options we have.

Input Fields

Field Name Required? Description Example
ShipAction YES This tells our system which function you require GetInsurance
Username YES You must specify your username joebloggs
APIKey YES This is available from your Shipping Manager account page HJ1E6DOTRDXAOLB
InsuranceCode   If you would like to get details for only one insurance option then specify the InsuranceCode here. IN_0

Output Fields
 

Field Name Description Example
ShipAction Confirmation of the function used GetInsurance
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
InsuranceInfo An array containing all of the insurance options we have -
InsuranceCode The code to represent this insurance option IN_1
LevelName Description of the level of cover available Up to 100 GBP
LevelAmount The amount of cover in GBP 100
Price The price this insurance option costs 2.00

Example Input

Array
(
    [ShipAction] => GetInsurance
    [Username] => joebloggs
    [APIKey] => HJ1E6DOTRDXAOLB
    [InsuranceCode] => IN_0
)

Example Output
 
Array
(
    [ShipAction] => GetInsurance
    [Status] => Success
    [RequestDate] => 2008-07-06 02:06:38
    [Username] => joebloggs
    [InsuranceInfo] => Array
        (
            [0] => Array
                (
                    [InsuranceCode] => IN_1
                    [LevelName] => Up to 100 GBP
                    [LevelAmount] => 100.00
                    [Price] => 2.00
                )

        )

)